Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Bound Grid with a unbound checkbox Column?
Tue, Nov 29 2016 3:27 AMPermanent Link

kentersoft

Search document, the bound grid can has unbound column,
<
The TGrid component allows you to to mix bound and un-bound columns within the same grid
control.
>

In a bound grid, I want to add a unbound checkbox let user select row, but seems not success,
seems checked status not saved, and call Grid1.Rows[R][C] also generate List index 2 out of bounds
error, anyone success make something like this, or somewhere my mistake?

thanks!
Tue, Nov 29 2016 3:16 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< Search document, the bound grid can has unbound column,  >>

Where did you see this ?  I think that's a mistake in the documentation.  There was an original goal of allowing that functionality, but it didn't happen because there were issues with mixing the grid rows with the dataset rows.

To do what you want, just create a new column in your dataset, give it a name, and then use it like it was a normal column.  It won't get populated during load operations, and will simply be ignored on the server-side.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Nov 29 2016 7:49 PMPermanent Link

kentersoft

Tim Young [Elevate Software] wrote:

<
Where did you see this ?  I think that's a mistake in the documentation.  There was an original goal of allowing that functionality, but it didn't happen because there were issues with mixing the grid rows with the dataset rows.
>

In pdf document, Page 195 (Internal Page 179),

<
To do what you want, just create a new column in your dataset, give it a name, and then use it like it was a normal column.  It won't get populated during load operations, and will simply be ignored on the server-side.
>

I test this, there have two problem,
1). Can not set the default value of the add field
2). Since we need the Database's AutoTransactions(=true) function, when use click the checkbox, browse will auto send Transactions to server, then server will have error(because the new add column not exist )

TDataColumn has Calculated Column, but don't have such as TClientDataSet's InternalCal Column,
also TDataColumn absent such as  LogChange property, if have this, then we can control which column
send change to server.

thanks!
Image