Dynamic data binding

3 posts, 0 answers
  1. MAQ MA
    MAQ MA avatar
    6 posts
    Member since:
    Sep 2004

    Posted 07 Apr 2012 Link to this post


    I am using RadGridView for dynamic data binding. I have used Silverlight Enabled WCF service, which returns me IEnumerable<Dictionary<string, object>>

    When I add watch on the service method I can see the proper datatable (Put a watch on table variable in GetData() method). The problem here is very typical I cannot see the data visible in the cells of the gridview except for the first column. Though if I see the filters on the columns I can see the relevant data on it and the grid is filtered also accordingly. So I assume the grid is binded correctly but then why I am not seeing the data.
    Also I would like to know how can I apply conditional style cell selectors when my grid columns are getting generated at the runtime.
    Download the  file for the sample code. https://skydrive.live.com/embed?cid=E4A632AEF706BBF7&resid=E4A632AEF706BBF7!270&authkey=ADQzUM7yDkLzadE
    The project uses the database so first please create the database called MyQTest and then execute the script file (also in the zip). This file will create the require tables along with the data.
    Also please change the connectionstring in the web.config accordingly.

  2. Pavel Pavlov
    Pavel Pavlov avatar
    2039 posts

    Posted 07 Apr 2012 Link to this post

    MAQ MA

    In case you see the correct number of rows, but blank cells , you need to setup the DataMemberBindings for the columns properly .

    In case you need a sample project reviewed by us , I would strongly advise to use the standard workflow  - opening a support ticket and attaching the runnable project to it

    Pavel Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. MAQ MA
    MAQ MA avatar
    6 posts
    Member since:
    Sep 2004

    Posted 08 Apr 2012 Link to this post

    thanks for your response. I am using the sample code which i downloaded from this blog post http://blogs.telerik.com/vladimirenchev/posts/11-09-28/dynamic-binding-for-your-silverlight-applications.aspx 

    If you see the code it does not uses explicitly data binding of columns but just set the ItemsSource property. As this grid will bind completely dynamic manner. I cannot presume how many columns will be there in that grid , what will be the column names etc etc.
    Hence there is no design time xaml involved over here. Hence I am not sure how will i do data member binding to the columns. I request you to glance my code once and suggest me if i am going wrong somewhere.


Back to Top