Page 1 of 1

DotConnect for oracle, column name.

Posted: Wed 07 Oct 2009 09:16
by Gregg
Hello, lately I straggle with such situation. I retrieve data from database (from one of views) and I bind this List of elements to gridcontrol (devExpress). Next, I want to hide one of the columns and here is the problem...I cannot hide the column without the knowledge about the column name...The column name is different than property name....(ex. TD_Table is changed to TdTable). Is there any possibility that the generated property name is the same as in database? or Can I obtain the list of columns names (I need this list in design time)?

Pleas help,
Greg

Posted: Fri 09 Oct 2009 12:44
by Shalex
I have tried dotConnect for Oracle 5.25.44 and DevExpress 9.2.6:
1) created a WinForms project;
2) generated typed Devart DataSet via DataSet Wizard (Tools | Oracle | DataSet Wizard);
3) placed DevExpress.XtraGrid.GridControl to Form Designer, assigned its DataSource property to the table from my DataSet;
4) GridControl's context menu -> Run Designer | selected the Columns section from the Main window and deleted the unnecessary column from the Columns list.

It works. This column is not displayed on GridControl anymore. Is that what you mean?

Posted: Mon 19 Oct 2009 09:35
by Gregg
I don't want to use designer...better choice is execute this in code ex.

Code: Select all

(gridView.MainView as GridView).Columns["columnName"].Visible=False;
Here I need a column name...In .net controls(for MSSQL) columnName is always the column name from database and in your product TD_Table is changed to TdTable...Is there any possibility to obtain the columnName for particular Property?
Greg

Posted: Mon 19 Oct 2009 11:09
by Shalex
Your code works fine with actual column names in my environment with DevExpress.XtraGrid.GridControl 9.2.6.0. Anyway, this is the DevExpress control. Please contact DevExpress support team.