Re-binding/Refreshing Grid Grouping Control
Hello,
I have a scenario where I have a GridGrouping control bound to a Forms.BindingSource. The binding source data changes, but the GridGrouping control does not show the changes. Therefore what I would like to do in this case is to re-bind the data source to the grid, effectively refreshing it. I try gridGroupingControl1.DataSource = null, and then gridGroupingControl1.DataSource = bindingSource. However, the data in the grid does not change. How can I do this?
Thanks,
-Mike
I have a scenario where I have a GridGrouping control bound to a Forms.BindingSource. The binding source data changes, but the GridGrouping control does not show the changes. Therefore what I would like to do in this case is to re-bind the data source to the grid, effectively refreshing it. I try gridGroupingControl1.DataSource = null, and then gridGroupingControl1.DataSource = bindingSource. However, the data in the grid does not change. How can I do this?
Thanks,
-Mike
SIGN IN To post a reply.
8 Replies
HA
haneefm
Syncfusion Team
May 22, 2007 05:09 PM UTC
Hi Mikeo,
Here is a forum thread that discuss with the simillar issue and let me know if this helps.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=56040
Best regards,
Haneef
Here is a forum thread that discuss with the simillar issue and let me know if this helps.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=56040
Best regards,
Haneef
MO
Michael Offner
May 22, 2007 11:07 PM UTC
Hi Haneef,
Thank you for your quick response to my question!
I implemented a rebind method per the link. However, I still have the problem that prompted me to write to you.
I have a Forms.BindingSource, of which, the GridGrouping control is bound to. The problem occurs when records are added to the binding source. So if I add 2 records, then click anywhere on the grid control, the grid control adds an additonal record. So the binding source will have 5 records, but the grid will have six. The extra record is an empty record.
Would you by any chance have an idea what this could be? I have a simple demo of this if you would like too.
Thanks,
-Mike
>Hi Mikeo,
Here is a forum thread that discuss with the simillar issue and let me know if this helps.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=56040
Best regards,
Haneef
Thank you for your quick response to my question!
I implemented a rebind method per the link. However, I still have the problem that prompted me to write to you.
I have a Forms.BindingSource, of which, the GridGrouping control is bound to. The problem occurs when records are added to the binding source. So if I add 2 records, then click anywhere on the grid control, the grid control adds an additonal record. So the binding source will have 5 records, but the grid will have six. The extra record is an empty record.
Would you by any chance have an idea what this could be? I have a simple demo of this if you would like too.
Thanks,
-Mike
>Hi Mikeo,
Here is a forum thread that discuss with the simillar issue and let me know if this helps.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=56040
Best regards,
Haneef
HA
haneefm
Syncfusion Team
May 22, 2007 11:53 PM UTC
Hi Mikeo,
If you want to remove the AddNewRow(Blank Row) in the top section of the group, you can set the ShowAddNewRecordBeforeDetails and ShowAddNewRecordAfterDetails property to false. Here is a code snippet
//For Main Groups
this.grid.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.grid.TopLevelGroupOptions.ShowAddNewRecordAfterDetails = false;
//For Main Groups
this.grid.NestedTableGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.grid.NestedTableGroupOptions.ShowAddNewRecordAfterDetails = false;
//For Child Groups
this.grid.ChildGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.grid.ChildGroupOptions.ShowAddNewRecordAfterDetails = false;
Best regards,
Haneef
If you want to remove the AddNewRow(Blank Row) in the top section of the group, you can set the ShowAddNewRecordBeforeDetails and ShowAddNewRecordAfterDetails property to false. Here is a code snippet
//For Main Groups
this.grid.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.grid.TopLevelGroupOptions.ShowAddNewRecordAfterDetails = false;
//For Main Groups
this.grid.NestedTableGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.grid.NestedTableGroupOptions.ShowAddNewRecordAfterDetails = false;
//For Child Groups
this.grid.ChildGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.grid.ChildGroupOptions.ShowAddNewRecordAfterDetails = false;
Best regards,
Haneef
MO
Michael Offner
May 23, 2007 02:12 PM UTC
Thank you Haneef! Those two lines allow me to hide the insertion row.
However, I have one more issue: When I insert a row into my DataBinding source, I get an exception on the grid grouping control. My code is extremely simple. I have nothing but a GCC bound to a Forms.BindingSource. I call BindingSource.AddNew() a few times, and get the exception.
Here is the exception dialog contents:
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in Syncfusion.Shared.Base.dll
Additional information: Count = 2 FilteredRecordCount = 0 YAmountCount = 2 ElementCount = 0 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0 out of range Count = 0 FilteredRecordCount = 0 YAmountCount = 0 ElementCount = 0 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0
Thanks for your help on this!
-Mike
>Hi Mikeo,
If you want to remove the AddNewRow(Blank Row) in the top section of the group, you can set the ShowAddNewRecordBeforeDetails and ShowAddNewRecordAfterDetails property to false. Here is a code snippet
//For Main Groups
this.grid.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.grid.TopLevelGroupOptions.ShowAddNewRecordAfterDetails = false;
//For Main Groups
this.grid.NestedTableGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.grid.NestedTableGroupOptions.ShowAddNewRecordAfterDetails = false;
//For Child Groups
this.grid.ChildGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.grid.ChildGroupOptions.ShowAddNewRecordAfterDetails = false;
Best regards,
Haneef
However, I have one more issue: When I insert a row into my DataBinding source, I get an exception on the grid grouping control. My code is extremely simple. I have nothing but a GCC bound to a Forms.BindingSource. I call BindingSource.AddNew() a few times, and get the exception.
Here is the exception dialog contents:
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in Syncfusion.Shared.Base.dll
Additional information: Count = 2 FilteredRecordCount = 0 YAmountCount = 2 ElementCount = 0 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0 out of range Count = 0 FilteredRecordCount = 0 YAmountCount = 0 ElementCount = 0 RecordCount = 0 CustomCount = 0 VisibleCustomCount = 0
Thanks for your help on this!
-Mike
>Hi Mikeo,
If you want to remove the AddNewRow(Blank Row) in the top section of the group, you can set the ShowAddNewRecordBeforeDetails and ShowAddNewRecordAfterDetails property to false. Here is a code snippet
//For Main Groups
this.grid.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.grid.TopLevelGroupOptions.ShowAddNewRecordAfterDetails = false;
//For Main Groups
this.grid.NestedTableGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.grid.NestedTableGroupOptions.ShowAddNewRecordAfterDetails = false;
//For Child Groups
this.grid.ChildGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.grid.ChildGroupOptions.ShowAddNewRecordAfterDetails = false;
Best regards,
Haneef
HA
haneefm
Syncfusion Team
May 23, 2007 06:37 PM UTC
Hi Mikeo,
Please follow the below thread for more details.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=61341
Best regards,
Haneef
Please follow the below thread for more details.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=61341
Best regards,
Haneef
PW
Perry Way
October 30, 2008 07:22 PM UTC
Hi,
I am using web GGC in asp.net2.0 environement. I too had the same issue, but I fixed it like Haneef said.
Now I have another issue with summary rows. My grid has summary row and I am changing grid's datasource at run-time. To re-produce this issue:
Step 1: When I bind DataTable with some/one row(s) as datasource for grid, its showing data with summary row.
Step 2: Next when I bind "null" as datasource for grid, its showing "no records to display". That's correct.
Step 3: Next when I try to bind DataTable with some/one row(s) as datasource for grid, its showing data only. But summary row is missing :(
Can you please let me know, what I am missing? Please find the attached file for more details
Thanks,
Perry
Grid with Summary Rows Export Error_7122606e.zip
I am using web GGC in asp.net2.0 environement. I too had the same issue, but I fixed it like Haneef said.
Now I have another issue with summary rows. My grid has summary row and I am changing grid's datasource at run-time. To re-produce this issue:
Step 1: When I bind DataTable with some/one row(s) as datasource for grid, its showing data with summary row.
Step 2: Next when I bind "null" as datasource for grid, its showing "no records to display". That's correct.
Step 3: Next when I try to bind DataTable with some/one row(s) as datasource for grid, its showing data only. But summary row is missing :(
Can you please let me know, what I am missing? Please find the attached file for more details
Thanks,
Perry
Grid with Summary Rows Export Error_7122606e.zip
PW
Perry Way
October 30, 2008 07:29 PM UTC
Hi,
I attached wrong file in my previous post. Sorry. Please refer this attached file for more details about the issue.
Thanks,
Perry
>Hi,
I am using web GGC in asp.net2.0 environement. I too had the same issue, but I fixed it like Haneef said.
Now I have another issue with summary rows. My grid has summary row and I am changing grid's datasource at run-time. To re-produce this issue:
Step 1: When I bind DataTable with some/one row(s) as datasource for grid, its showing data with summary row.
Step 2: Next when I bind "null" as datasource for grid, its showing "no records to display". That's correct.
Step 3: Next when I try to bind DataTable with some/one row(s) as datasource for grid, its showing data only. But summary row is missing :(
Can you please let me know, what I am missing? Please find the attached file for more details
Thanks,
Perry
Grid with Summary Rows Export Error_7122606e.zip
Summary Row is Gone Error_7fe7fd83.zip
I attached wrong file in my previous post. Sorry. Please refer this attached file for more details about the issue.
Thanks,
Perry
>Hi,
I am using web GGC in asp.net2.0 environement. I too had the same issue, but I fixed it like Haneef said.
Now I have another issue with summary rows. My grid has summary row and I am changing grid's datasource at run-time. To re-produce this issue:
Step 1: When I bind DataTable with some/one row(s) as datasource for grid, its showing data with summary row.
Step 2: Next when I bind "null" as datasource for grid, its showing "no records to display". That's correct.
Step 3: Next when I try to bind DataTable with some/one row(s) as datasource for grid, its showing data only. But summary row is missing :(
Can you please let me know, what I am missing? Please find the attached file for more details
Thanks,
Perry
Grid with Summary Rows Export Error_7122606e.zip
Summary Row is Gone Error_7fe7fd83.zip
RS
Rajarajeswari S
Syncfusion Team
November 3, 2008 09:43 AM UTC
Hi Perry,
The following Forum has been updated for the above mentioned issue:
http://www.syncfusion.com/support/forums/message.aspx?MessageID=77425
Could you please follow-up with the above to get more information on this.
Regards,
Raji
The following Forum has been updated for the above mentioned issue:
http://www.syncfusion.com/support/forums/message.aspx?MessageID=77425
Could you please follow-up with the above to get more information on this.
Regards,
Raji
SIGN IN To post a reply.
- 8 Replies
- 4 Participants
-
MO Michael Offner
- May 22, 2007 04:48 PM UTC
- Nov 3, 2008 09:43 AM UTC