Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
475
HOw to check which parent is expanded
posted

Hi,

how to get the value of parent expanded.because by using that i have to set the textbox field to editable.suppose if the first parent is expanded then i have to make the textbox2 as editable else if the second parent is expanded then i have to set the textbox3 as editable.Here is the code am using

 

if (WebHierarchicalDataGrid2.GridView.Rows[0].HasRowIslands)

 {

 ContainerGrid childGrid = this.WebHierarchicalDataGrid2.GridView.Rows[0].RowIslands[0];

 for (int i = 0; i < childGrid.Rows.Count; i++)

 {

//Hiding the column

childGrid.Rows[i].Items[3].Column.Hidden = true;

}

//changing the readonly property to Textbox

 (childGrid.Rows[0].Items[2].FindControl("Band_TB2") as TextBox).ReadOnly = false;

 }

 else if (WebHierarchicalDataGrid2.GridView.Rows[1].HasRowIslands)

 {

ContainerGrid childGrid = this.WebHierarchicalDataGrid2.GridView.Rows[1].RowIslands[0];

for (int i = 0; i < childGrid.Rows.Count; i++)

 {

 //Hiding the column

 childGrid.Rows[i].Items[1].Column.Hidden = true;

}

//changing the readonly property to Textbox

 (childGrid.Rows[0].Items[2].FindControl("Band_TB3") as TextBox).ReadOnly = false;

 }

regards,

hsakarp.

Parents
No Data
Reply Children
No Data