Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
465
Dynamically binding to a table when the structure is unknown at runtime
posted

I am posting this for another team member so I hope I get this right.  We are trying to use the WebGrid control to edit and update SQL tables.  The user will select a table from a list, and then be able to view and edit the data in the WebGrid control.  Since there are multiple tables to be edited, the structure of the selected is unknown at runtime.  Is there a way to bind the control to the table at runtime when the table structure is unknown?  

  • 235
    posted

    Hi,

    If i got u right, u can set the AutoGenerateColumns property of grid to true(true by default)

    and UltraGrid1.DataSource = selectedTable;

            UltraGrid1.DataBind();