How to create a custom DataRow

2 posts, 0 answers
  1. Hakan
    Hakan avatar
    1 posts
    Member since:
    Mar 2020

    Posted 06 Apr Link to this post

       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


  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2425 posts

    Posted 09 Apr Link to this post

    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.
Back to Top