These are simple problems of a beginner...
I have an ADO DataGrid, into which I have loaded a number of records from a database. The datagrid is effectively 'bound' to the recordset at run-time through specifying a new value for the dataMember parameter.
I have two questions:
1. How do I resize the columns at run-time, so that they fit in the entire length of data or does this have to be done in advance? Do I resize the form in the same manner should that also need doing?
2. I need to get the value of Field1 for whichever record is selected when a cmdButton is pressed. (This has to work whichever field within the reocrd is selected when the button is pressed.) How do I go about this? I'm sure it must be possible as there are plenty of row/col functions - its just knowing what each one does and what type of value it returns!
Thank-you in advance!
I have an ADO DataGrid, into which I have loaded a number of records from a database. The datagrid is effectively 'bound' to the recordset at run-time through specifying a new value for the dataMember parameter.
I have two questions:
1. How do I resize the columns at run-time, so that they fit in the entire length of data or does this have to be done in advance? Do I resize the form in the same manner should that also need doing?
2. I need to get the value of Field1 for whichever record is selected when a cmdButton is pressed. (This has to work whichever field within the reocrd is selected when the button is pressed.) How do I go about this? I'm sure it must be possible as there are plenty of row/col functions - its just knowing what each one does and what type of value it returns!
Thank-you in advance!