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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GGC Adding/Removing datasource columns

Thread ID:





42353 Mar 27,2006 08:39 PM UTC Mar 28,2006 07:04 AM UTC WinForms 1
Tags: GridControl
Chris Wescott
Asked On March 27, 2006 08:39 PM UTC

HI, I am using the GridGroupingControl and I have a basic 2 level hierarchy. I have a checkbox column in both the parent and child dataview. I am using the grid''s dataview manager to get the view and then removing the checked column in the parent dataview. Then I am adding back in this column and changing it value. It is faster than looping through the view and changing all the values. I have 2 problems. 1. When I remove the Checked Column and add it back, I can''t change the checkbox state. It is like it is locked on disabled. Here''s the code I am using to remove the checked column from the dataview GridGroupingControl1.BeginUpdate() Dim MyGridDV As DataView Dim DV As New DataView Dim MyDS As New DataSet MyGridDV = GridGroupingControl1.DataSource MyDS = MyGridDV.DataViewManager.DataSet Dim i As Integer DV = MyDS.Tables(0).DefaultView Try DV.Table.Columns.Remove("Checked") DV.Table.Columns.Add("Checked", System.Type.GetType("System.Boolean"), "DIGITAL_DATA_EXIST = 1") Catch ex As Exception End Try GridGroupingControl1.DataSource = MyGridDV GridGroupingControl1.EndUpdate(True) 2. When I add/remove the columns the grid closes any open grids. Ie if a parent is expanded and I add/remove columns the parent closes. Any help would be great.

Administrator [Syncfusion]
Replied On March 28, 2006 07:04 AM UTC

Hi Chris, 1) Setting the Expression property of a DataColumn to anything other than an empty string automatically sets the ReadOnly property of the column to true and it can not be changed. If you are trying to set the value depending upon other column value in the row then please refer this KB article to see if that helps. 2) Adding/ removing columns don’t seem collapsing any expanded parent/child table in the grid, in version Let me know if you have any further queries. Regards, Calvin.


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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