Posts

Showing posts from September, 2008

Expand TOLAPGrid Items on call back (Radar-soft MSAS Cube)

Image
URL: http://radar-soft.com/products/radaraspnet_MSAS.aspx Today I found some interesting event for TOLAP Grid. I had requirement like When user clicks on Parent item, I need to expand all available child items for that parent item. In above TOLAPGrid I have Three Rows, BusinessType Description, Region Name, NDC Number. When Page is loading I need to show all available Business Types and associated Regions & NDC Numbers with collapsed mode. By Deafault TOLAPGrid is providing a functionality as when you click on Parent, its showing immediate child item. But some times the requirement would be when you click on parent Item we need to show all available childs for that selected parent. Practically it seems I need to do write some logic on onCallback event. Because when you click on Parent's item Page is not postbacking, its just callback is happening. But unfortunately I am not able to find any event data in this call. But we have another event as OnGridEv

LINQ 101 Samples

Good URL for LINQ 101 Examples: Click Me

Returns List of Customers from Northwind DB, and Displays Customer uisng LINQ

using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Data.SqlClient; namespace ConsoleApplication2 { class Customer { public string CustomerId { get ; set ; } public string CompanyName { get ; set ; } public string ContactName { get ; set ; } public string Address { get ; set ; } public string City { get ; set ; } public string Country { get ; set ; } public static List < Customer > getCustomers() { using ( SqlConnection objcon = new SqlConnection ( "Data source=(local);Initial Catalog=northwind;user id=sa;password=sa" )) { SqlCommand objcmd = new SqlCommand ( "Select CustomerId, CompanyName, ContactName, Address, City, Country from Customers" , objcon); SqlDataAdapter objAda = new SqlDataAdapter (objcmd);

LINQ Query Syntax

Define Two Classes as Person & Alternate Person class person { public string FirstName { get ; set ;} public string LastName { get ; set ; } public int Age { get ; set ;} } class alternateperson { public string FullName { get ; set ; } public int Age { get ; set ; } } class Program { static void Main( string [] args) { List < person > people = new List < person > { new person {FirstName = "Venu" , LastName = "Pavuluri" , Age = 28}, new person {FirstName = "Babu" , LastName = "Pav" , Age = 30}, new person {FirstName = "Victor" , LastName = "Serbin" , Age = 35} }; IEnumerable < alternateperson > results = from p in people select new alternateperson {FullName = p.FirstName + " " + p.LastName, Age = p.Age}; /*people