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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Reducing Number of Columns When Changing Query.

Thread ID:





19387 Sep 24,2004 02:17 PM UTC Sep 24,2004 05:43 PM UTC WinForms 2
Tags: GridControl
Steven Domingue
Asked On September 24, 2004 02:17 PM UTC

I have a GridDataBoundGrid that is bound to a .mdb using a DataAdapter and DataSet. When I first start the program the grid is filled with data properly. I then change the select command and refill the DataSet. The change to the query is to remove one column that is returned. For example: before SELECT a, b, c, d FROM x after SELECT a, b, c FROM x The proper rows are displayed but I still get a column labeled d. The column d has empty data. How to I get the grid to stop displaying column d, short of manually removing the column. There will be instances where the query is typed in by the user and can be sonewhat freeform. Thanks

Administrator [Syncfusion]
Replied On September 24, 2004 03:25 PM UTC

I think calling Binder.ResetHierarchyLevels() should do it, but check out also that thread: http://www.syncfusion.com/support/forums/message.aspx?MessageID=10185 Stefan

Steven Domingue
Replied On September 24, 2004 05:43 PM UTC

Nope. That didn''t work. After looking to it better I found that I had to: a) make a NEW OleDbDataAdapter with the new command string, b) clear the dataset, c) fill the dataset from the new adapter with a new table name, d) set the datamember of the grid to the new table. The grid would then refresh properly


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon