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

GridView DataBind What am I missing?

1 Answer 83 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 26 Oct 2011, 06:50 PM
First let me say I am a web programmer, but I have a need for a small utilities app that needs a data grid.  I load the form, user selects several options and clicks button.  On click I generate a DataSet and call gridview1.DataSource = datasetname;

The datasource has data, and the gridview is set to autogeneratecolumns = true.

Nothing changes and no data is shown.  What am I missing here?

Thanks!

Jeff

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Petrov
Telerik team
answered on 28 Oct 2011, 12:51 PM
Hi Jeff,

Thank you for writing.

You need to take a couple more steps to make this scenario work. You have to set the AutoGenerateHierarchy property to true and you have to set the DataMember property, which is the parent table for your hierarchy. You can find more information on auto generated hierarchy grid in our product documentation - Binding to Hierarchical Data Automatically.

I hope this will help you. If you have further questions, I would be glad to assist you.

All the best,
Ivan Petrov
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

Tags
GridView
Asked by
Jeff
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Share this question
or