We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Two GridGroupingControls bound to the same strongly typed dataset

Thread ID:

Created:

Updated:

Platform:

Replies:

119745 Jul 28,2015 03:34 AM UTC Aug 3,2015 12:48 PM UTC WinForms 4
loading
Tags: GridGroupingControl
Andrew Sullivan
Asked On July 28, 2015 03:34 AM UTC

Hello,

I have an extended dataset that is created using the visual studio tools. and it has numerous tables. I'm trying to bind two different gridgroupingcontrols as per the following:

DataAccess.DispatchDataset dispatchDS = new DataAccess.DispatchDataset();
private BindingSource bindingSourceAssignVW = new BindingSource();
private BindingSource bindingSourceAssign = new BindingSource();

// Fill dispatch dataset
session.dispatch.LoadDataSet(ref dispatchDS);

// Bind grids to dispatch dataset
bindingSourceAssignVW.DataSource = dispatchDS;
bindingSourceAssignVW.DataMember = "ASSIGNMENTS_VW";
gridGroupingControlAssignVW.DataSource = bindingSourceAssignVW;

bindingSourceAssign.DataSource = dispatchDS;
bindingSourceAssign.DataMember = "ASSIGNMENTS";
gridGroupingControlAssign.DataSource = bindingSourceAssign;

Unfortunately, when I run the application, the gridGroupingControlAssignVW fills correctly, but gridGroupingControlAssign does not (no data in the table). The application is rendered in a glitchy manner, and some other application function stop working (like exiting the application). I'm not sure what I'm doing wrong, because if I use a standard windows forms datagridview in place of gridGroupingControlAssign, everything seems to work fine.

Do you know what is happening here?

Vinish Kumar K [Syncfusion]
Replied On July 29, 2015 04:30 AM UTC

Hi Andrew,

Thank you for the interest in Syncfusion products.

We have checked the reported issues with the provided codes. We are unable to get the issue with the provided details. So could you please  provided the sample which is reproduce the issue in your end along with some more details. Please refer the sample of data source from our Dashboard. It may help you to assign the data source to gridgroupingcontrol properly.

Sample path : C:\Users\<name>\AppData\Local\Syncfusion\EssentialStudio\<version>\Windows\Grid.Grouping.Windows\Samples\Data Sources

Please let me know if you have any queries.

Regards,
Vinish K.

Andrew Sullivan
Replied On July 31, 2015 03:41 AM UTC

Hi Vinish,

Thank you for your reply. The dashboard samples that you linked to are not bound to a strongly-typed dataset, so I don't think they are directly relevant. I re-wrote my code a bit so you can see all the steps. To rehash, I'm trying to bind two different gridgroupingcontrols (gridGroupingControlAssign & gridGroupingControlAssignVW) to two different tables in my dispatchDS dataset. This dataset was automatically created using the visual studio tools after pointing it to two of tables in my MS SQL database.

I've attached a zip file with images of what happens when I try to run my application with the below code. Capture1 shows the problems, and Capture2 shows what the application should look like. As you can see, I'm just simply trying to use two gridgroupingcontrol side by side on one form.

            DataAccess.DispatchDataset dispatchDS = new DataAccess.DispatchDataset();
            private BindingSource bindingSourceAssignVW = new BindingSource();
            private BindingSource bindingSourceAssign = new BindingSource();

  gridGroupingControlAssignVW.DataSource = bindingSourceAssignVW;
            gridGroupingControlAssign.DataSource = bindingSourceAssign;
            
            DataAccess.DispatchDatasetTableAdapters.ASSIGNMENTSTableAdapter AssignmentsAdapter = new DataAccess.DispatchDatasetTableAdapters.ASSIGNMENTSTableAdapter();
            DataAccess.DispatchDatasetTableAdapters.ASSIGNMENTS_VWTableAdapter AssignmentsVWAdapter = new DataAccess.DispatchDatasetTableAdapters.ASSIGNMENTS_VWTableAdapter();

            AssignmentsAdapter.Fill(dispatchDS.ASSIGNMENTS);
            AssignmentsVWAdapter.Fill(dispatchDS.ASSIGNMENTS_VW);

            // Bind gridgroupingcontrols to dispatch dataset
            bindingSourceAssignVW.DataSource = dispatchDS;
            bindingSourceAssignVW.DataMember = "ASSIGNMENTS_VW";

            bindingSourceAssign.DataSource = dispatchDS;
            bindingSourceAssign.DataMember = "ASSIGNMENTS";

Attachment: Captures_eb000a2b.zip

Andrew Sullivan
Replied On August 1, 2015 07:13 PM UTC

Frustratingly, this was a problem with the dataset, not the code I posted. I remade the dataset using the designer, and the problem no longer occurs... Oh well, at least it's gone.

Vinish Kumar K [Syncfusion]
Replied On August 3, 2015 12:48 PM UTC

Hi Andrew

Thanks for your update.

We are happy to hear the issue is resolved in your side. Please let me know if you have any further queries on this. We will provide the proper details or suggestion to you.

Regards,
Vinish K.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;