In the following code, grdInProcesDetails is a child grid of "grdInProces" parent grid, After doing the pagination of "grdInProces" grid,
in grdInProcesDetails_ItemCreated - parentItem.ChildItem is getting null, by which i am unable to find the childItem controls to add some attributes .... How do i find the child item controls here in this case.
protected void grdInProcesDetails_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
GridDataItem parentItem = ((sender as RadGrid).NamingContainer as GridNestedViewItem).ParentItem as GridDataItem;
if (parentItem != null && parentItem.ChildItem !=null)
{
string _employeeId = parentItem.GetDataKeyValue("Employee").ToString();
Label lblIPName = parentItem.FindControl("lblIPName") as Label;
Label lblReview = parentItem.ChildItem.FindControl("lblReview") as Label;
CheckBox chkIPReviewed = parentItem.ChildItem.FindControl("chkInProcessReviewed") as CheckBox;
}
}
}
Parent grid is getting rebind as well as child grid also getting rebinding when done pagination but syill iam getting null value.
Please give a advise as soon as possible
in grdInProcesDetails_ItemCreated - parentItem.ChildItem is getting null, by which i am unable to find the childItem controls to add some attributes .... How do i find the child item controls here in this case.
protected void grdInProcesDetails_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
GridDataItem parentItem = ((sender as RadGrid).NamingContainer as GridNestedViewItem).ParentItem as GridDataItem;
if (parentItem != null && parentItem.ChildItem !=null)
{
string _employeeId = parentItem.GetDataKeyValue("Employee").ToString();
Label lblIPName = parentItem.FindControl("lblIPName") as Label;
Label lblReview = parentItem.ChildItem.FindControl("lblReview") as Label;
CheckBox chkIPReviewed = parentItem.ChildItem.FindControl("chkInProcessReviewed") as CheckBox;
}
}
}
Parent grid is getting rebind as well as child grid also getting rebinding when done pagination but syill iam getting null value.
Please give a advise as soon as possible