
I have a rad view to which I am assigning data source from a SQL table which as 2 rows in it. But when I assign the data source the data is
.
If oSQL.IsConnected Then
Try
ds = oSQL.GetDataSet("Select * from compliance_calculation_runs_hist order by cc_calc_id", CommandType.Text)
If ds.Tables(0).Rows.Count > 0 Then
ds.Tables(0).TableName = "getSavedCalc"
RadGridView1.MasterGridViewTemplate.AutoGenerateColumns = False
RadGridView1.DataSource = ds
RadGridView1.DataMember = "getSavedCalc"
End If
Catch ex As Exception
End Try
End If
5 Answers, 1 is accepted
Are you leaving the grid to generate the columns or are they added at design time? If the columns are added at design time please make sure that the FieldName property of each column is properly set.
I hope this will be useful. Let me know if you have additional questions.
Regards,
Dimitar
Telerik by Progress

Thanks, Dimitar.
As you can see I have set the AutoGenerateColumns to False.
Also, I have set the FieldName property of each column. I am fetching columns from SQL and the grid already contains an exact number of columns as in the SQL table columns. And SQL Table Columns names are exactly the same as FieldName property. But I still see blank rows with no data in it. I am still confused where I am going wrong.

I am glad that this is working fine now. Do not hesitate to contact us if you have other questions.
Dimitar
Telerik by Progress
