I am working on tooptip edit in RadGrid. I am facing a problem whenever i am editing something on tooltip and call button event it close the tooptip and client side and later it binds only single row in Radgrid on which i edit the tooltip other data loose.
see the code..
Tooltip code:
protected void Swap_Click(object sender, EventArgs e)
{
DataSet ds1 = (DataSet)Cache[dKey];
DataView dv = ds1.Tables[0].DefaultView;
string preLink2 = "<A href='MainAction.aspx?mode=ComponentInfo&suppliedComponentID=" +suppliedComponentID.ToString() + "'>";
string postLink2 = "</A>";
dv.RowFilter =
string.Format("BlockID={0}", ProductID);
dv[0][
"SuppliedComponentID"] = suppliedComponentID;
dv[0][
"ReservationStatusID"] = reservationStatusID;
dv[0][
"ConfirmationSize"] = confirmedAllocation;
dv[0][
"SupplierPlain"] = AssociatesList.SelectedItem.Text;
dv[0][
"SupplierID"] = suppliedComponentID;
dv[0][
"SupplierName"] = preLink2 + AssociatesList.SelectedItem.Text + postLink2;
Cache[dKey] = ds1;
//Close the active ToolTip.
ScriptManager.RegisterClientScriptBlock(
this.Page,
this.GetType(),
"WebUserControlSript",
"CloseActiveToolTip('" + this.ProductID + "')",
true);
}
On Control Page :
/
SCRIPT>
<script type="text/javascript">
function CloseActiveToolTip(supplierID) {
var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();
if (tooltip) tooltip.hide();
var grid = $find("<%=RadGrid1.ClientID %>").get_masterTableView();
grid.rebind();
}
</script>
IN Code behind file
I am binding
protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
if (!e.IsFromDetailTable)
{
DataSet ds = new DataSet();
ds = (Cache[dKey] !=
null) ? (DataSet)Cache[dKey] : ds;
RadGrid1.DataSource = ds.Tables[0];
//DataTable ds = new DataTable();
//ds = (Cache[dKey] != null) ? (DataTable)Cache[dKey] : ds;
//RadGrid1.DataSource = ds;
}
}
but it only display the row which i edit in tooptip
and same thing happen in paging also.
plz help me