Dialog editor, change "Details of" field

Hello,

I am using the grid to show a list of countries... I have a CountryID field and a CountryDescription field.  The CountryID field is currently set as the primary in the grid, but it is a hidden field.  CountryDescription has been set as an identity.

Currently, if I edit an item in the grid, it works fine.  What I am having issues with however is that it says "Details of<CountryID>" where <CountryID> is the ID, used to associate to the database.  I would like to have it say "Details of <CountryDescription>" instead.  If I set the CountryDescription field primary, it does so, but then it becomes uneditable.  

Any suggestions for this are appreciated!

Thanks
Paul

3 Replies

GV Gowthami V Syncfusion Team April 6, 2015 11:11 AM UTC

Hi Paul,

Thanks for using Syncfusion products.

Based on your requirement we have created a sample and the same can be downloaded from the following link.

Sample Link: Sample.zip

In the above sample we have changed the title of the dialog using “title” property of the ejDialog in the ActionComplete event of the grid as follows.

<ej:Grid ID="EmployeesGrid" runat="server" AllowPaging="true" >

<ClientSideEvents ActionComplete="complete"></ClientSideEvents>

</ej:Grid>

<script type="text/javascript">

function complete(args) {


if (args.requestType == "beginedit") {

var currentRow = args.model.currentViewData[args.rowIndex];

$("#EmployeesGrid_dialogEdit").ejDialog({ title: "Details of " + currentRow.ShipCountryDesc });

}

}
</script>


Please try the above snippet and let us know if you have any queries.

Regards,
Gowthami V.


PY Paul Yanzick April 9, 2015 02:59 PM UTC

Hello, that worked great.. thank you!


GV Gowthami V Syncfusion Team April 10, 2015 03:20 PM UTC

Hi Paul,

Thanks for your update.

Please get back to us if you need further assistance. We will happy to assist you.

Regards,
Gowthami V.

Loader.
Up arrow icon