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

Autogenerated columns not updating

1 Answer 25 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Radek
Top achievements
Rank 1
Radek asked on 29 Oct 2008, 07:23 PM
This is the code I am using to generate my grid with data.

    Private Sub LoadGrid(ByVal sSql As String)
        BindingSource1.DataSource = c_External.GetRequestedData(sSql)
        With RadGridView1
            .DataSource = BindingSource1
            .MasterGridViewTemplate.BestFitColumns()
        End With
    End Sub

Basically I am making two passes with this code.  The first pass the sql statement is asking for 2 columns to be returned.  The 2 columns return just fine.  The second time the sql statement is requesting 14 columns worth of data to be returned.  The correct data is being returned but the grid is still only showing 2 columns.  How can I get the grid to re-autogenerate the remainder of the columns?

1 Answer, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 04 Nov 2008, 08:30 AM
Hi Radek,

Thank you for your question.

We do not provide a solution for attaching two data sources because this is not the purpose of the Presentation Layer. You may use SQL union statement to get a single table, or you may use YourDataTable.Merge(...) method.

 
Greetings,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Radek
Top achievements
Rank 1
Answers by
Nick
Telerik team
Share this question
or