copy functionality with radgrid using radwindow

Posted by Arun11 under ASP.NET on 7/27/2011 | Points: 10 | Views : 2136 | Status : [Member] | Replies : 1
Hi,

I have the below itemcommand event of radgrid for copying a record based on ID.

if (e.CommandName == "Copy")
{
SHTemplateUI copyTemplate = new SHTemplateUI();
copyTemplate.CopyTemplateByIdUI(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["StudentHistoryTemplateID"]));
this.LoadTemplateList();
}
This copies the record with the same name.

Now i want to make some changes.when i click on copy it should popup a radwindow and ask for the new file name.Once i enter the file name it should check whether the file name already exists.If not copy record with the new file name.

Can anybody help please?




Responses

Posted by: A4u_6178 on: 7/27/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,
Try this to open a RadWindow in Itemcommand event.

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)


{

if (e.CommandName == "Copy")

{

//opening window

RadWindow newWindow = new RadWindow();

newWindow.ID = "RadWindow1";

newWindow.NavigateUrl = "Window1.aspx";

newWindow.VisibleOnPageLoad = true;

RadWindowManager1.Windows.Add(newWindow);

//check for the condition here

}

}


Thanks & Regards,

Arun11, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response