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