Hello guys,
I am totally new in Talerik Radgrid, so please bare with me. I have Raggrid inside one of the page. i am using Advance Binding (need data source) to bind my data. which is working perfectly fine.
now my problem is, I want to customize the columns. Here what i want to do.
1. How can i change the Column Header
2. How can i remove Filter box from some of my columns.
3. How can i Hide some column to display in grid.
4. How can i customize Sorting. in specific columns.
And also, can anyone please explain me the concept of UniqueName. Thanks.
Here what i do to bind the data.
.xaml page.
.cs page
I am totally new in Talerik Radgrid, so please bare with me. I have Raggrid inside one of the page. i am using Advance Binding (need data source) to bind my data. which is working perfectly fine.
now my problem is, I want to customize the columns. Here what i want to do.
1. How can i change the Column Header
2. How can i remove Filter box from some of my columns.
3. How can i Hide some column to display in grid.
4. How can i customize Sorting. in specific columns.
And also, can anyone please explain me the concept of UniqueName. Thanks.
Here what i do to bind the data.
.xaml page.
<telerik:RadGrid runat="server" ID="RadGrid2" AllowPaging="True" AllowSorting="true" OnNeedDataSource="RadGrid2_NeedDataSource" AllowFilteringByColumn="True" Skin="Sunset"> <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling> </ClientSettings> </telerik:RadGrid>.cs page
protected void RadGrid2_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { (sender as RadGrid).DataSource = GetDataTable(); } public DataTable GetDataTable() { string str1 = (string)(Session["UserName"]); string query = "select Acer_Status,No_Of_Vouchers,Acer_Actual_Balance ,Zero_To_Thirty_Days , Thirtyone_To_Sixty_Days ,Sixtyone_To_Ninety_Days ,Ninetyone_Days_Plus from ACER_AR_SUMMARY1 where Practice_Short_Name ='" + str1 + "'"; String ConnString = ConfigurationManager.ConnectionStrings["conn"].ConnectionString; SqlConnection conn = new SqlConnection(ConnString); SqlDataAdapter adapter = new SqlDataAdapter(); adapter.SelectCommand = new SqlCommand(query, conn); DataTable myDataTable = new DataTable(); conn.Open(); try { adapter.Fill(myDataTable); } finally { conn.Close(); } return myDataTable; }