Grid messages
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Grid messages
How do you validate data entered in a cell of a grid?
Re: Grid messages
Hi.
When you say "validate", do you mean to check beforehand whether the data to be entered is a number, say, or perhaps a date, so that later functionality can expect to see the data in a format that will not generate an error?
How is your data entered? is it via an editable field in a datagrid or table field? Or is it via an "ask" dialog or somesuch?
The methods to check are different. In the first instance, you must check the data via messages that are sent either during typing or after closing a field or cell. In the second, you can validate under script control before the data is actually loaded.
Write back with details. You will get answers almost instantly.
Craig Newman
When you say "validate", do you mean to check beforehand whether the data to be entered is a number, say, or perhaps a date, so that later functionality can expect to see the data in a format that will not generate an error?
How is your data entered? is it via an editable field in a datagrid or table field? Or is it via an "ask" dialog or somesuch?
The methods to check are different. In the first instance, you must check the data via messages that are sent either during typing or after closing a field or cell. In the second, you can validate under script control before the data is actually loaded.
Write back with details. You will get answers almost instantly.
Craig Newman
Re: Grid messages
If I can get a message that a cell is being closed and replace its contents with validated data, that would be ideal. I don't see any message -- like a closefield -- for a cell (close cell?)
I am fairly new to livecode, but have a lot of experience in the past with HyperCard/SuperCard/Toolbook
I am fairly new to livecode, but have a lot of experience in the past with HyperCard/SuperCard/Toolbook
Re: Grid messages
John - welcome to the forum.
When you say "grid" are you talking about a datagrid control?
Update: and if so, you might want to check out the following lessons. The datagrid is a pretty specialized control and acts a bit differently from other controls (it's actually a group of groups with a behavior library).
http://lessons.runrev.com/s/lessons/m/d ... r-Editing-
http://lessons.runrev.com/s/lessons/m/d ... -Behavior-
http://lessons.runrev.com/s/lessons/m/d ... a-Grid-API
When you say "grid" are you talking about a datagrid control?
Update: and if so, you might want to check out the following lessons. The datagrid is a pretty specialized control and acts a bit differently from other controls (it's actually a group of groups with a behavior library).
http://lessons.runrev.com/s/lessons/m/d ... r-Editing-
http://lessons.runrev.com/s/lessons/m/d ... -Behavior-
http://lessons.runrev.com/s/lessons/m/d ... a-Grid-API