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

RowData not visible in telerik gridview

5 Answers 84 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gowtama Krishna
Top achievements
Rank 1
Gowtama Krishna asked on 17 Jan 2017, 04:46 PM

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

Sort by
1
Dimitar
Telerik team
answered on 18 Jan 2017, 12:36 PM
Hi  ,

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
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Gowtama Krishna
Top achievements
Rank 1
answered on 18 Jan 2017, 04:15 PM

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.

0
Gowtama Krishna
Top achievements
Rank 1
answered on 18 Jan 2017, 07:14 PM
your answer is right it works perfectly now. I missed had wrong unique names.
0
Dimitar
Telerik team
answered on 19 Jan 2017, 07:42 AM
Hi,

I am glad that this is working fine now. Do not hesitate to contact us if you have other questions.
 
Regards,
Dimitar
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Gowtama Krishna
Top achievements
Rank 1
answered on 19 Jan 2017, 03:12 PM
Sure.
Tags
GridView
Asked by
Gowtama Krishna
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Gowtama Krishna
Top achievements
Rank 1
Share this question
or