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

[Solved] Title for EditForm Template

1 Answer 203 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jones
Top achievements
Rank 1
Jones asked on 27 Jun 2009, 10:29 AM
How to set the Title for Edit Form Popup Template during edit and adding new record?

Regards,
Jones

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 29 Jun 2009, 05:10 AM
Hello Jones,

You can try out the following code to display different captions for the popup edit form, for Edit and Insert modes respectively:
c#:
 protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) 
    {          
         if (e.CommandName == "Edit"
         { 
             RadGrid1.MasterTableView.EditFormSettings.CaptionDataField = "ContactName"
             RadGrid1.MasterTableView.EditFormSettings.CaptionFormatString = "Edit This Record : {0}"
         } 
         else if (e.CommandName == "InitInsert"
         { 
             RadGrid1.MasterTableView.EditFormSettings.CaptionDataField = ""
             RadGrid1.MasterTableView.EditFormSettings.CaptionFormatString = "New Record"
 
         }       
    } 

Thanks
Princy.
Tags
Grid
Asked by
Jones
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or