Hi,
I'm using a rad grid to show line items for an invoice. Each row has an image button column used to delete the row when clicked.
I prefer to do this on the client and everything works fine until I call rebind to update the grid. It just doesn't work.The results in my data store show's the row has been delete. I am using a content page if that makes a difference. Here is my code. Thanks for your help.
I'm using a rad grid to show line items for an invoice. Each row has an image button column used to delete the row when clicked.
I prefer to do this on the client and everything works fine until I call rebind to update the grid. It just doesn't work.The results in my data store show's the row has been delete. I am using a content page if that makes a difference. Here is my code. Thanks for your help.
function
DeleteRow() {
EstimateWebService.DeleteEstimateItems(rowId.Id, OnDeleteRowSucess)
}
function
OnDeleteRowSucess() {
$find(
"<%= RadAjaxManager1.ClientID %>"
).ajaxRequest(
"Rebind"
);
}
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
EnableViewState
=
"false"
onajaxrequest
=
"RadAjaxManager1_AjaxRequest"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"btnAddNewRow"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"grdEstimateItems"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadAjaxManager1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"grdEstimateItems"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"grdEstimateItems"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"grdEstimateItems"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
if (e.Argument == "Rebind")
{
//RadGrid1.MasterTableView.SortExpressions.Clear();
//RadGrid1.MasterTableView.GroupByExpressions.Clear();
grdEstimateItems.Rebind();
}
}