|
-
Sep 16th, 1999, 02:33 PM
#1
Thread Starter
Junior Member
Does anyone know how to set the format of a DataGrid column, where the DataGrid is bound to an ado recordset at runtime?
-
Sep 19th, 1999, 04:56 AM
#2
Frenzied Member
If it's anything like DAO, it's one of those things about bound controls that bother me.
With DAO, formatting (on the bound fields) is lost when the update method is issued. You need to re-format the bound fields after the ".update" occurs.
-
Sep 19th, 1999, 12:08 PM
#3
Thread Starter
Junior Member
The recordset is bound at run time (set datagrid.datasource = Rs). What I want to do is set the format of a particular column at run-time after the grid has been bound to the recordset.
-
Sep 20th, 1999, 12:31 PM
#4
Lively Member
Well, if your refering to column sizes etc...
The syntax is something along the lines of:-
dbgrid1.colums(0).width = 3000
dbgrid1.columns(0).caption = "Hello"
By default I don't think VB shows these properties with the auto-complete.
-
Sep 20th, 1999, 01:28 PM
#5
Thread Starter
Junior Member
I was actually refering to the column format, i.e Boolean, Short Date etc.
-
Sep 20th, 1999, 09:38 PM
#6
Frenzied Member
The answer, then, is most likely no. The data types of the columns are determined by the bindings. You might want to give some thought to having two grids, one bound, the other unbound that overlay one another.
-
Sep 21st, 1999, 12:09 PM
#7
Thread Starter
Junior Member
Unfortunately the recordsets I am dealing with are disconected and are bound at run-time. To bind a grid to a dataanvironment or data control would compomise the structure of the application.
-
Sep 29th, 1999, 08:18 PM
#8
New Member
try right clicking on the control in design time and bring up the properties box. There is a list of formats under the column tab and in the Number Format drop down box you can choose the format you want to put into your code. Remember to use quotes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|