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

How to create a custom DataRow

1 Answer 9 Views
This is a migrated thread and some comments may be shown as answers.
Hakan
Top achievements
Rank 1
Hakan asked on 06 Apr 2020, 06:10 PM

   Hello,

I have project where I need to create a table with 2 Rows

The first row has to be filled with Comboboxes with Options to choose , the second Row I get from a Database.

The ammount of Columns will change every time so i have to do it dynamically

What would be my best approach? i attached a screenshot thats shows what I want


1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 09 Apr 2020, 12:49 PM

Hello Hakan,

To achieve your requirement, you can use RadGridView control with two items in its ItemsSource. The columns are automatically generated by default, so if you replace the ItemsSource with a data set containing different fields, the columns will be generated accordingly. Also, you can customize the cells so that the first row has comboboxes and the second one simple text field, by using the CellTemplateSelector property of the columns. You can get the automatically generated columns in order to set their selector via the AutoGeneratingColumns event of RadGridView. Here are some resources that you can check:

Regards,
Martin Ivanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Asked by
Hakan
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or