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

SQL collection into radGridView

2 Answers 141 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Michael Bouhuys
Top achievements
Rank 1
Michael Bouhuys asked on 11 Jun 2018, 05:30 PM

Being new to Telerik controls I'm struggling to get RadGridView to populate automatically with SQL query collection.
I have some questions to understand what can and cannot be done and go from there:
I have a SQL query result collection contains over 4,000 records is there a way to set dump the datatable directly into the RadGridView with "AutoGenerateColumns="True"",
or do i have to iterate through all the rows?
Secondly I have the RadGridView in a tab of a RadPaneGroup. Which action should I use to only call the RadGridView population when its tab is selected?

2 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 14 Jun 2018, 12:45 PM
Hello Michael,

I will try to address your questions in the same order as from your enquiry.

1. First of all, I want to ask you what do you mean with "SQL query collection"? If you mean some kind of in-memory collection please take a look at the first reply of this forum thread. If you have anything else in mind, please provide more detailed information on the matter. You can also take a look at our populating with data Overview article where you can find similar information on the matter.

2. To achieve the desired behavior you can set the Content property of RadPane to be RadGridView when the SelectionChanged event of RadPaneGroup is fired.

Regards,
Martin Vatev
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Michael Bouhuys
Top achievements
Rank 1
answered on 22 Jun 2018, 02:25 PM
Cancel this post. There was a typo in my code I was not calling the binding correctly.
Tags
GridView
Asked by
Michael Bouhuys
Top achievements
Rank 1
Answers by
Martin
Telerik team
Michael Bouhuys
Top achievements
Rank 1
Share this question
or