4 Answers, 1 is accepted
0
Accepted
Princy
Top achievements
Rank 2
answered on 05 May 2009, 09:51 AM
Hello Syed,
You can try out the following code to hide a column on a button click:
c#:
Thanks
Princy.
You can try out the following code to hide a column on a button click:
c#:
protected void Button1_Click(object sender, EventArgs e) |
{ |
RadGrid1.MasterTableView.GetColumn("ColumnUniqueName").Display = false; |
} |
Thanks
Princy.
0
Mark Galbreath
Top achievements
Rank 2
answered on 04 Feb 2010, 09:50 PM
How would that be done on the client, Princy?
0
Princy
Top achievements
Rank 2
answered on 05 Feb 2010, 05:14 AM
Hi Mark,
Here's the client side code to hide columns on a button's click event:
js:
Thanks
Princy.
Here's the client side code to hide columns on a button's click event:
js:
function btnClick() |
{ |
var colindex = $find("RadGrid1").get_masterTableView().getColumnByUniqueName("UniqueName").get_element().cellIndex; |
$find("RadGrid1").get_masterTableView().hideColumn(colindex); |
} |
Thanks
Princy.
0
Mark Galbreath
Top achievements
Rank 2
answered on 05 Feb 2010, 01:22 PM
Wierd. I have
which is the equivalent of what you wrote, Princy, and it doesn't work.
Cheers!
Mark
var tableView = $find('<%= radGrid1.ClientID %>').get_masterTableView(); |
tableView.HideColumn( tableView.getColumnByUniqueName( uniqueColumnName ).get_element().cellIndex ); |
Cheers!
Mark