DataGrid - dgColumn problems
Posted: Fri May 27, 2011 2:11 pm
Hi,
I have created a datagrid and populated it with data. The user is able to edit the data and I wish to implement some form of range checking to stop illegal values being entered. The obvious place to place a call to range checking routine is from somewhere inside the "FieldEditor", so I have created a behavior script and assigned the FieldEditor to the script as described in the Datagrid documentation.
The problem I have encountered is that I need to pass the name of the column being edited along with its new contents to my external range checking routine. Unfortunately I am unable to get any result from the dgColumn property when called inside the FieldEditor or from the Datagrid group script. I have included the script I have been using from the datagrid group below:
The last 4 lines are copied from the datagrid documentation and show that Trevor uses the dgColumn property in the example script. i have also tried :
Can anyone help me out?
Thanks
Simon
I have created a datagrid and populated it with data. The user is able to edit the data and I wish to implement some form of range checking to stop illegal values being entered. The obvious place to place a call to range checking routine is from somewhere inside the "FieldEditor", so I have created a behavior script and assigned the FieldEditor to the script as described in the Datagrid documentation.
The problem I have encountered is that I need to pass the name of the column being edited along with its new contents to my external range checking routine. Unfortunately I am unable to get any result from the dgColumn property when called inside the FieldEditor or from the Datagrid group script. I have included the script I have been using from the datagrid group below:
Code: Select all
On CloseFieldEditor pFieldEditor
put cr & "From CloseFieldEditor PFieldEditor " & pFieldEditor & cr after fld"debug"
put "Column Name : " & the dgcolumn of me & cr after fld"debug" -- does not work
put "The text " & the text of pFieldEditor & cr after fld"debug"
put "The column : " & the dgColumn of pFieldEditor & cr after fld"debug" --does not work
put the dgColumn of me into theCol
put "Column Name : " & theCol & cr after field"debug" -- does not work
--put the dgindex of me into theindex
--put the dgDataOfIndex[theindex] of the dgcontrol of me into theDataA
--put the text of pFieldEditor into theDataA[the dgColumn of me]
--set the dgDataOfIndex[theindex] of the dgcontrol of me to theDataA
end CloseFieldEditor
Code: Select all
get the dgColumn of me
Put it into theCol
put "Column Name : " & theCol & cr after field"debug" -- does not work
Can anyone help me out?
Thanks
Simon