HI all,
I getting an issue here...i have created on table table and in that table i m adding a row using table.Row.Add(rowname)....now in that row im adding cells using for loop...Now issue is that if i want to hide any of the row by checking the condition of cell.text.....what to do can anyone help??
Any help would be appriciated....
Note:Table is creating dynamically and have to hide or show on checkbox's checked or unchecked condition.....
Hiding table row in C#
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sam HobbsRank #107 · 20.5K reputationPosted Nov 17, 2011, 9:22 AM EST
If you actually mean that you need to hide a row in a grid that shows the data, then please clarify what you mean.
Pravin MoreRank #1,419 · 1.2K reputationPosted Nov 17, 2011, 10:09 PM EST
You can try 1 simple way... write simple Linq query on table like below.....depending on value selected in combobox
string combovalue=combobox1.SelectedValue();
var result = (from DataRow trow in table.Rows select trow).Except(from DataRow trow1 in table.Rows where col1=combovalue select trow);
it will work i think,
Thanks,
Pravin.