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

GridDropDownColumn replace ListTextField value

1 Answer 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marcel
Top achievements
Rank 1
Marcel asked on 17 Dec 2008, 05:26 PM
I am using a GridDropDownColumn which displays LastName, but I want it to display LastName + ", " + FirstName.
I am using an EntityDataSource so I cannot derive the new value using SQL.
How can I intercept the binding process to modify the displayed values in the dropdown? 
 
<telerik:GridDropDownColumn
 DataField="RefPerson.PersonID" DataSourceID="EntityDataSourceRefPerson"
 HeaderText="Personnel Name" ListTextField="LastName" ListValueField="PersonID"
 UniqueName="RefPerson"><ItemStyle Width="45%" /></telerik:GridDropDownColumn>
 
<asp:EntityDataSource ID="EntityDataSourceRefPerson" runat="server"
 ConnectionString="name=SWMEntities" DefaultContainerName="SWMEntities"
 EntitySetName="RefPerson"
 OrderBy="it.LastName,it.FirstName"
 Select="it.[PersonID], it.[LastName], it.[FirstName]">
</asp:EntityDataSource> 
 

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 18 Dec 2008, 03:39 PM
Hello Macrel,

Attached to this post you will find sample application demonstrating how you can attain such functionality using RadGrid bound via EntityDataSource control.

You just need to place Telerik.Web.UI.dll into project bin folder and run it.

I hope this helps.

Kind regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Marcel
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or