what API or property that I can use to hide a row in the grid? thanks.
Hello aschoi ,
You can try some custom logic in order to hide some of the rows you can try the following code snippets:
function hide() { $("#grid1").igGrid("allRows").each(function(index) { var id = $(this).attr("data-id"); if (id < 4) { $(this).css("display", 'none'); } });
this will iterate through the DOM and will hide all of the rows that have id less than 4. Another approach that you may try is by using our filtering functionality:
http://help.infragistics.com/Help/NetAdvantage/jQuery/2012.1/CLR4.0/html/igGrid_Filtering.html
If you need any additional assistance on this please do not hesitate to ask.
Hi Elena,
this function is not working for me
Please find below the code for my grid
$("#grid").igGrid({ autoGenerateColumns: false, width: "100%", height: "800px", columns: [ { headerText: "ModuleName", key: "PtientSDData", hidden: true, dataType: 'object', formatter: function (val) { return val.ModuleName; }, width: "38%" }, { headerText: "Description", key: "PtientSDData", dataType: 'object', formatter: function (val) { return val.Value1; }, width: "38%" }, { headerText: "Results", key: "ID", dataType: 'string', width: "38%" }, { headerText: "Results", key: "PtientSDData", dataType: 'object', formatter: function (val) { return val.Value2; }, width: "38%" }, { headerText: "Results", key: "PtientSDData", dataType: 'object', formatter: function (val) { return val.Value3; }, width: "38%" }, ], dataSource: sdData }); }
I want to use the condition on ModuleName {if ModuleName == 'Cars'}
Thanks
Aarti