I'm trying to change the column header. When I do this, it does not show Raghu at all. If I comment the code inside rdMain_PreRender, the grid looks fine. Am I doing something wrong?
& lt; Telerik: Allow RadGrid runat = "server" id = "rdMain" automatically generated column = "wrong" allow = "true" skin = "metro" onperendor = "rdMain_PreRender" datasource id = "monsource" invalid-upgrade = "true" permission GiveAnonymousMits = "True" & gt; & Lt; MasterTableView DataKeyNames = "ID" commandItemDisplay = "none" & gt; & Lt; Columns & gt; & Lt; Tele -rech: Grid Edit Commands Columns Button = "Image Button" /> & Lt; Telerich: Gridbound column datafilled = "location" header text = "location" read-only = "true" /> & Lt; Telerich: Gridbound column datafilled = "name" header text = "name" /> & Lt; Telerich: Gridbound column datafield = "Phone" header text = "phone" /> & Lt; Telerich: Gridbutan column confirmation = "Delete"? ConfirmDialogType = "RadWindow" ConfirmTitle = "Delete" ButtonType = "ImageButton" CommandName = "Delete" /> & Lt; / Column & gt; & Lt; EditFormSettings & gt; & Lt; EditColumn ButtonType = "ImageButton" /> & Lt; / EditFormSettings & gt; & Lt; / MasterTableView & gt; & Lt; PagerStyle mode = "Next up and numerical" /> & Lt; / Telerik: RadGrid> Protected Zero rdMain_PreRender (Object Sender, EventArgs E) {var masterTableView = rdMain.MasterTableView; Var column = masterTableView.GetColumn ("phone"); Column.HeaderText = "TelePhone"; MasterTableView.Rebind (); }
Set the unique name of the columns in the grid and try to use the next line Do the code in the prerender:
rdMain.Columns.FindByUniqueName ("phone"). HeaderText = "TelePhone";
Hope this works.
No comments:
Post a Comment