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

Populate cells from object[][]

1 Answer 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rémi
Top achievements
Rank 1
Veteran
Rémi asked on 21 May 2020, 06:36 PM

Hi,

I don't know how my data are organised, I can't create a class about it (this is CSV file import, any kind of file)

I want to display this is a grid.

<TelerikGrid Data="@datable.rows"
                     <GridColumns>
                        @{
                            for (int i = 0; i < datable.columns.Count; i++)
                        {
                            <GridColumn Field="@(i.ToString())">
                                <Template>
                                    @(((QFLib.DataRow)context)[i].ToString())  // How to evaluate i here ?
                                </Template>
                            </GridColumn>
                        }
                        }
                    </GridColumns>
                </TelerikGrid>

It doens't work because the template during code generation doesn't evaluate i

Is it possible ?

Another way of doing this ?

 

Sincerely,

Remi

 

1 Answer, 1 is accepted

Sort by
0
Svetoslav Dimitrov
Telerik team
answered on 22 May 2020, 07:31 AM

Hello Remi,

On our Feedback Portal there is a Feature Request (link: https://feedback.telerik.com/blazor/1418456-bind-to-datatable) regarding binding the Grid to a DataTable, which is scheduled for our 2.15.0 (next) release. I have added a Vote on your behalf. You can Follow the thread to receive email notification when the release is live and the feature is available.

Regards,
Svetoslav Dimitrov
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.
Tags
Grid
Asked by
Rémi
Top achievements
Rank 1
Veteran
Answers by
Svetoslav Dimitrov
Telerik team
Share this question
or