c# 4.0 - How do you determine which row was selected in a Infragistics WebHierarchicalDataGrid when you have a Master Detail table configuration -
i have master table , 2 child detail tables under master. when user selects 1 of detail tables rowselection event fires. need determine table selected. if users selectes second detail table need obtain data specific field. code can put in place make determination. here code have far grab data, need build if statment around code.
string uploadindex; if (e.currentselectedrows.count > 0) { gridrecord orow = e.currentselectedrows[0]; uploadindex = orow.items[0].value.tostring(); }
tried got controlmain inaccessible due protection level. containergrid orowisland = webhierarchicaldatagrid1.gridview.rows[e.currentselectedrows[0].index].rowislands[0]; if (orow.owner.controlmain.id == '2') { uploadindex = orow.items[0].value.tostring(); }
use containergridrecord
type instead of gridrecord
when declaring orow, way have access orow.owner.controlmain
grid holds row. in debug determine id of grid you're interested in , can do
if (orow.owner.controlmain.id == '...id of second grid') { // profit }
or use other identifiable property of controlmain
grid in case assocciate second details.
Comments
Post a Comment