This is a migrated thread and some comments may be shown as answers.

Need to prompt message when RadGrid item is edited or inserted

1 Answer 44 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Manoj
Top achievements
Rank 1
Manoj asked on 10 Apr 2012, 04:48 AM
I have clicked edit button of an item(Radgrid).

Now the particular row is in edit mode.

When i click the submit button.It should prompt me to save the edited row.

How can i achieve it.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 10 Apr 2012, 05:51 AM
Hello Manoj,

Try the following code.
C#:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
 if (e.Item is GridEditableItem && e.Item.IsInEditMode &&!e.Item.OwnerTableView.IsItemInserted)
 {
  GridEditableItem itm = (GridEditableItem)e.Item;
  LinkButton updateButton = (LinkButton)itm.FindControl("UpdateButton");
  updateButton.Click += new EventHandler(updateButton_Click);
 }
}
void updateButton_Click(object sender, EventArgs e)
{
 RadWindowManager1.RadPrompt("please save", "promptCallBackFn", 330, 160, null, "RadPrompt", "0");
}
JS:
function promptCallBackFn(arg)
{
 alert("Successfully saved");
}

Thanks,
Princy.
Tags
General Discussions
Asked by
Manoj
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or