Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

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 - Confused ). 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()
 
Read Message
Read Message
Read Message
Previous Topic: ArrayCtrl and FileSel.ExecuteOK
Next Topic: GridCtrl and WhenMenuBar
Goto Forum:
  


Current Time: Tue Apr 16 13:17:06 CEST 2024

Total time taken to generate the page: 0.02042 seconds