Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl: assign default value & WhenAcceptRow
Re: GridCtrl: assign default value & WhenAcceptRow [message #33542 is a reply to message #33541] |
Mon, 22 August 2011 10:32   |
|
forlano wrote on Mon, 22 August 2011 04:22 |
1) is there a way to assign a default value when creating a new row? With ArrayCtrl exists InsertValue(...), for axample:
array.AddColumn(COUNTRY,"Country").Edit(country).InsertValue(12);
Is there an equivalent/alternative way?
|
grid.AddColumn(COUNTRY, "Country").Edit(country).Default(12);
Quote: |
2) before the row is accepted I want to check its data and eventually refuse them and force the user to continue the edit task.
I used the WhenAcceptRow to perform the checking (as done with ArrayCtrl but there it is a Gate - ). Unfortunatly the row is always accepted.
Which is the suggested method with GridCtrl to validate the data?
This one works for ArrayCtrl but with GridCtrl complain about 'bool' returning value of the callback.
|
In WhanAcceptRow callback use grid.CancelAccept()
|
|
|
Goto Forum:
Current Time: Sun Aug 31 15:18:37 CEST 2025
Total time taken to generate the page: 0.05089 seconds
|