I have dbgrid in form which is to view the records in the table, i'm using Data Control. It seems that ID field is not important to view. How can i hide ID Field Column in the DBGrid?
There are 2 easy approaches to this:
1. use a Flexgrid rather than a DBGrid and use ColWidth property
2. Use a query (SELECT Name, Address1 FROM myTable) instead of the table in your ADODC control
You'll need to look up VBHelp for details on using ADODC control with a query, but you will find it a valuable technique until you're ready for ADO code access to data
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'People who live in windowed environments shouldn't cast pointers.'
Where iColIndex is the index of the column starting with 0.
You may need that unique ID field later, so leave it in your query. [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
<G>
Thanks CCLINT,
As I was saying, there are THREE easy....
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'People who live in windowed environments shouldn't cast pointers.'
[/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.