Hi all I have one checkbox and one grid in my page. I want to hide one column of the grid when check box is checked. I have binded data at pageload. This checkbox is just to make columns visible or invisible. Whenever i check this checkbox its firing an event which loads my page again. Is there any way to hide that column without doing whole page load.
Any suggestions will be highly appreciated.
Thanks for your reply.....It works for me.....But there is something wrong in your code. You have written parenthesis bracket. It should be box bracket instead of parenthesis. And the boolean value will come as a argument inside setHidden() method.
My Code
function hideColumn() {
var grid = igtbl_getGridById("<%= UltraWebGrid1.ClientID %>");
grid.Bands[0].getColumnFromKey("CategoryName").setHidden(true);
}
Thanks again. I appreciate your help.
Hello,
You can use the CSOM (client-side object model of the grid) and do something like that:
<input type=checkbox onclick="hideColumn()" ... /><script type="text/javascript">function hideColumn(){ var grid = igtbl_getGridById("<%= UltraWebGrid1.ClientID %>"); grid.Bands(0).getColumnFromKey("ColumnKey").setHidden();}</script>
More info can be found in our online help
http://help.infragistics.com
in the CSOM section of the grid.
I am still looking for solution to this problem. Is anyone there knows how to implement javascript for this event?
Thanks
Thanks for your response. Could you please send me some sample code. I have tried to inculde Javascripfile and trying to hide the column in the grid at OnClick = HideColumn(). But still its not working.
I am not good in JavaScript. Here is my sample code
<
asp:CheckBox ID="SprayBoothCheckBox" runat="server" Text="Spray Booth" onclick="hideColumn()" />
function
onclick() {
ManagementDetailsUltraWebGrid.Columns.FromKey(
"spraybooth").Hidden = true;
Thanks in advance
Sure, sorry for that.
This is the link.