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

Issue Getting RadGrid to Display Data as Required

1 Answer 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Casey
Top achievements
Rank 1
Casey asked on 06 Nov 2009, 08:34 PM
Hello,

I'm populating a RadGrid off an Oracle table. The RadGrid will contain information regarding requests entered by users. The columns of the RadGrid will be: Time, First Name, Last Name and System(s) Requested. The first three columns are GridBoundColumns and I am having no trouble with getting them to show the correct data; however, I want the System(s) Requested column to be a GridTemplateColumn with a RadComboBox that shows all of the systems requested by that person, at that time.

So basically, instead of the following:

Time            First Name    Last Name    System(s) Requested
1:00 PM       John              Smith            System1
1:00 PM       John              Smith            System2
1:00 PM       John              Smith            System3


I want to see 1 row for John Smith at 1:00 PM, and I want a RadComboBox in the System(s) Requested column that has 3 values in the dropdown (like below). I'm having some difficulties doing this because I don't know what event I would need to use to pass the value of the First Name column to the SQL DataSource so that when the RadGrid loads the RadComboBox displays all requests for that person.

Time            First Name    Last Name    System(s) Requested
1:00 PM       John              Smith            System1
                                                              System2 <-- will appear when dropdown is clicked.
                                                              System3 <-- will appear when dropdown is clicked.

Any assistance on how to achieve this functionality would be great!

Thanks!
Casey

1 Answer, 1 is accepted

Sort by
0
Accepted
Sebastian
Telerik team
answered on 10 Nov 2009, 11:31 AM
Hi Casey,

The proper event for this purpose would be the ItemDataBound server event of RadGrid. At this stage the items in the grid are bound to data as explained in this article.

Therefore, you can take the implementation from here as basis (replacing the regular MS DropDownList with RadComboBox) and modify/expand it to fit in your custom schema.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Casey
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or