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

Using Radgrid with normalized table structure

3 Answers 72 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 12 Feb 2012, 03:48 PM
This is a basic design question on using radgrid with normalize table structures from sql server. This is a basic enough question it seems that I should have already solved the problem, but I seem to be having trouble coming up with the answer.

I have a table that has fields that are smallint type that contain Key values from a lookup table.
When in edit or insert mode I use a radcombobox to display the text from the lookup and with the valueField being the lookupID
When in view mode, I don't want to display the smallint values as they are meaningless to to the user. I have gotten around my problem by displaying the radcombo box disabled to get the display values I want but is not visually appealing.

How have others solved this problem using normalized tables as the datasource.

3 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 14 Feb 2012, 10:29 AM
Hi Jeff,

I am sending you a small sample that demonstrates two approaches to achieving your requirement - one uses a GridTemplateColumn and the other a GridDropDownColumn. The columns in question are SupplierID and CategoryID.

Hope it helps.
 
All the best,
Tsvetoslav
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Olle
Top achievements
Rank 1
answered on 11 Dec 2014, 06:44 AM
Hi!

I have the same question but I am using Entity Framwork 6. What is the best approach then?

/Olle
0
Konstantin Dikov
Telerik team
answered on 15 Dec 2014, 11:26 AM
Hello Olle,

You can use the same approach that is demonstrated with SqlDataSource, but with the EntityDataSource instead. I should only mention that with Entity Framework 6 you need to use the new EntityDataSource that was introduced recently.

In the following article you could find detailed information for the new EntityDataSource:
Hope this helps.


Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Jeff
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Olle
Top achievements
Rank 1
Konstantin Dikov
Telerik team
Share this question
or