I have a WebHierarchicalDataGrid that has a row selected change event, on the event I want to see what grid level the row is on and hide rows in html table accordingly.
My event IS getting hit but nothing is changing on my page (I know the code works, because when I put it in page_load, the rows are hidden just fine)
Protected Sub WebGrid_RowChanged(sender as object, e as infragistics.we.ui.gridcontrols.selectedroweventargs) handles webhierarchicaldatagrid1.rowselectedchanged
select case sender.level
case 0
secondRow.visible=false
ThirdRow.visible = false
case 1
secondRow.visible=true
case 2
ThirdRow.visible = true
end select
End sub
I tried an UpdatePanel but that didn't work either
Hello DMandy,
Thank you for posting in our forum.
Assuming you have Activation, Selection and RowSelectors behaviors enabled into your grid you can get the current selection with OnRowSelectionChanged event.
Code Snippet:
protected void WebHierarchicalDataGrid1_RowSelectionChanged(object sender, Infragistics.Web.UI.GridControls.SelectedRowEventArgs e)
{
var cur_row = this.WebHierarchicalDataGrid1.GridView.Rows[e.CurrentSelectedRows[0].Index];
if (cur.row.Level > 0) {
// etc..
}
As for hiding a specific row you can use either the client side controls or if it is imperative for a back-end solution youth can assign a custom CSS class through the CssClass property that will hide it.
cur_row.CssClass = "custom_css_class_hiding_the_row";
this.WebHierarchicalDataGrid1.GridView.RequestFullAsyncRender();
You can update me with more information on your scenario and needs or a basic sample and I'll be happy to provide you with further assistance.