Sir ,
I am new for telerik. Am using the hierarchical radgrid. But causing error when enableviewstate=false.
NeedDataSource called before ItemCommand.So my grid not able to fetch the proper data as its not gets the parentid in NeedDataSource.
If enableviewstate=true my hierarchical radgrid working fine but the parent columns header goes disappers.
Am creating radgrid columns dynamically.
The main thing is that am not getting my parent ticket it first as NeedDatasource calling first than itemdatacommand.
Events are like this.
initializParentGrid()
protected void radrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
;;;;;;;;;;;;
bindGrid();
}
protected void radrid
_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName == "ExpandCollapse")
{
GridTableView gtv = radrid
.MasterTableView.Items[e.Item.ItemIndex].ChildItem.NestedTableViews[0];
Telerik.Web.UI.DataKey gdka = radrid
.MasterTableView.DataKeyValues[e.Item.ItemIndex];
hdnDetailTableIndex.Value = e.Item.ItemIndex.ToString();
if (gdka != null)
hdnParentTicketid.Value = gdka["ParentId"].ToString();
}
Please suggest.
I am new for telerik. Am using the hierarchical radgrid. But causing error when enableviewstate=false.
NeedDataSource called before ItemCommand.So my grid not able to fetch the proper data as its not gets the parentid in NeedDataSource.
If enableviewstate=true my hierarchical radgrid working fine but the parent columns header goes disappers.
Am creating radgrid columns dynamically.
The main thing is that am not getting my parent ticket it first as NeedDatasource calling first than itemdatacommand.
Events are like this.
initializParentGrid()
protected void radrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
;;;;;;;;;;;;
bindGrid();
}
protected void radrid
_ItemCommand(object source, GridCommandEventArgs e)
{
{
GridTableView gtv = radrid
.MasterTableView.Items[e.Item.ItemIndex].ChildItem.NestedTableViews[0];
Telerik.Web.UI.DataKey gdka = radrid
.MasterTableView.DataKeyValues[e.Item.ItemIndex];
hdnDetailTableIndex.Value = e.Item.ItemIndex.ToString();
if (gdka != null)
hdnParentTicketid.Value = gdka["ParentId"].ToString();
}
Please suggest.