Can not dynamically populate telerik RadGridView with dynamic data.

4 posts, 0 answers
  1. Roland
    Roland avatar
    2 posts
    Member since:
    Jul 2012

    Posted 25 Sep 2013 Link to this post

    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



  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 26 Sep 2013 Link to this post

    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 >>
  3. DevCraft banner
  4. Roland
    Roland avatar
    2 posts
    Member since:
    Jul 2012

    Posted 26 Sep 2013 Link to this post

    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>

  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 27 Sep 2013 Link to this post

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