The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I am using GridGroupingControl.When I bind the datatable to the grid.datasource, I get "Index was outside the bounds of array" error.
I am fetching dataset from the oracle database and create my own datatable from the dataset and binding it to the grid.
If I directly bind the dataset what I get from the database doesn''t give any error.But when I create my own table and bind it to grid, this throws an error.
Any help on this will be appreciated.
Thanx in advance.
Prathima
ADAdministrator Syncfusion Team May 4, 2005 07:25 AM UTC
Here is a sample that dynamically creates a DataTable and sets it to a GridGroupingControl.DataSource.
http://www.syncfusion.com/Support/user/uploads/GGC_DataTable_8aa440a7.zip
Does it work OK for you? If not, what version of our libraries are you using?
If the sample works and you cannot spot any differences with what you are doing, can you post a call stack from when you get the exception? Also, where are you trying to do this work, and what is the state of the GridGroupingControl when you try to set this datasource?
PVPrathima Venkobachar May 4, 2005 08:15 AM UTC
I am doing exactly what is done in the given sample.
But little bit different in the structure of the code.
I have created a user control where in I will have grid and set other properties related to the grid like RecordValueChanging,CellDoubleClicked etc.
I have a class to get the dataset from the oracle database.
I have a class to create a datatable structure which I require based on some criteria.
I have a class to load data from the Dataset to the datatable I have created.
Finally I have a class to build the grid and bind it to the datasource.This class I am also using to apply styles to the grid.
I pass the grid instance to class whereever required.
What do you mean by state of the gridgrouping control..?
I am using 3.0.1.0 version.
>Here is a sample that dynamically creates a DataTable and sets it to a GridGroupingControl.DataSource.
>
>http://www.syncfusion.com/Support/user/uploads/GGC_DataTable_8aa440a7.zip
>
>Does it work OK for you? If not, what version of our libraries are you using?
>
>If the sample works and you cannot spot any differences with what you are doing, can you post a call stack from when you get the exception? Also, where are you trying to do this work, and what is the state of the GridGroupingControl when you try to set this datasource?
PVPrathima Venkobachar May 4, 2005 08:40 AM UTC
Hi,
I have fixed the problem.
I was not setting the primary key for my newly created Datable.
But in my usercontrol I was setting primary key column which was comming null.
Thanx for the Reply.
Parthima