I have a 2-Level hierarchy grid binding with ObjectDataSource.
In the child grid I have a ASP Button in a template column.
How do I wire the button to that when it is clicked it does a partial postback to update or rebind the child grid or itself.
I have tried it like this but no luck.
Or using this:
Thanks
In the child grid I have a ASP Button in a template column.
How do I wire the button to that when it is clicked it does a partial postback to update or rebind the child grid or itself.
I have tried it like this but no luck.
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) |
{ |
if (e.Item is GridDataItem) |
{ |
GridDataItem dataItem = e.Item as GridDataItem; |
Button Button1 = (Button)(dataItem["TemplateColumn"]).FindControl("Button1"); |
Button1.OnClientClick = String.Format(@"{0}.__doPostBack(""{1}"",""{2}"");return false;", RadAjaxManagerProxy1.ClientID, Button1.UniqueID, Button1.CommandArgument); |
} |
} |
Or using this:
GridTableView tableView = e.Item.OwnerTableView; |
GridTableView detailView = tableView.Items[e.Item.ItemIndex].ChildItem.NestedTableViews[1]; |
Thanks