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

Can not dynamically populate telerik RadGridView with dynamic data.

3 Answers 51 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Roland
Top achievements
Rank 1
Roland asked on 25 Sep 2013, 09:00 PM

I have a silverlight MMVM application that administers few lookup tables.

The application goes out to the database and gets the list of Lookup tables and populates the first grid control so far so good.

I clicked one of the table lookup from the list and it goes out to the database and it gives me the schema for that table.

Initially I have a second RadGridView with no columns and rows that I need to pupulate:

<telerik:RadGridView x:Name="grdMain"
Grid.Row="2"
ShowGroupPanel="False"
RowIndicatorVisibility="Collapsed"
AutoGenerateColumns="False"
CanUserFreezeColumns="False"
CanUserInsertRows="False"
GridLinesVisibility="Both"
ScrollViewer.VerticalScrollBarVisibility="Auto"
IsReadOnly="True"
Margin="5,0,5,5"
SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
SelectionMode="Single"
IsSynchronizedWithCurrentItem="True"
CurrentItem="{Binding Path=SelectedItem}" >

<telerik:RadGridView.Columns>
</telerik:RadGridView.Columns>

</telerik:RadGridView>

I was able to dynamically add/populate the columns with headers for that partricular table based on that schema that I initially have.
I am using a telerik RadGridView control.
So now I have I RadGridView with nothing in it but the Column titles.

The apps goes out to the database again and gets all the record for that particular lookup table.

So I got the table Schema and table records for the said table lookup and tried to populate the RadGridView programatically.

But I can't find away to programatically populate my RadGridView with my dynamic table schema with my dynamic list of record for that said table.

Please help,

Roland



3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 26 Sep 2013, 03:33 PM
Hello,

I cannot see where do you set the ItemsSource for RadGridView. You can refer to our online documentation on how to configure the Data Bindings.
There are also different topics on populating data from various data sources.

Does this help?

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Roland
Top achievements
Rank 1
answered on 26 Sep 2013, 04:05 PM
It was there i just forgot to include itin  my post because I was playing with the code. So it is still not working.

<telerik:RadGridView x:Name="grdMain"
Grid.Row="2"
ShowGroupPanel="False"
RowIndicatorVisibility="Collapsed"
AutoGenerateColumns="False"
CanUserFreezeColumns="False"
CanUserInsertRows="False"
GridLinesVisibility="Both"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ItemsSource="{Binding Path=LookupRecord, NotifyOnValidationError=False}"
IsReadOnly="True"
Margin="5,0,5,5"
SelectedItem="{Binding Path=SelectedItem, Mode=TwoWay}"
SelectionMode="Single"
IsSynchronizedWithCurrentItem="True"
CurrentItem="{Binding Path=SelectedItem}" >

<telerik:RadGridView.Columns>
< /telerik:RadGridView.Columns>

< /telerik:RadGridView>

0
Dimitrina
Telerik team
answered on 27 Sep 2013, 02:40 PM
Hi Roland,

Do you have any data in the LookupRecord collection?
Unfortunately, having the information provided, I am not sure what the problem would be. You can also test on our online demos.

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Roland
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Roland
Top achievements
Rank 1
Share this question
or