Página 1 de 1

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 9:47 am
por ignacio
Oleg,
OnExit returning false prevents the change of focus to another GridEdit
control when more than one column is edited. But it does NOT stop the
editing process if you click outside the Gridedits controls, for example.
As yo can see TBrowse editing is not (and will never be) modal, just like
Excel, for example. If you need that behaviour you should use a modal dialog
instead of editing directly on the browse.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:[email=464355da@ozsrv2.ozlan.local...]464355da@ozsrv2.ozlan.local...[/email]
> Hi all!
>
> On my form I have TDBFBrowse with 1 numeric column.
> I want to deny user to enter values other than 1 to 100.
>
> How can I make so that the user did not leave oGridEdit (in TDBBrowse)
> until he enters the valid value or cancels the changes?
>
> In Xailer's documentation I see that appropriate event is
> TBrwColumn:OnExit
> or TGridEdit:OnExit. These events are fired, but when I return .F. (Do not
> Exit), the editing is always finished (with exit from oGridEdit).
>
> See attached sample.
>
> Thank you. Oleg.
>
>
>
>
>
>
>

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 9:47 am
por NoName
Oleg,
OnExit returning false prevents the change of focus to another GridEdit
control when more than one column is edited. But it does NOT stop the
editing process if you click outside the Gridedits controls, for example.
As yo can see TBrowse editing is not (and will never be) modal, just like
Excel, for example. If you need that behaviour you should use a modal dialog
instead of editing directly on the browse.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:[email=464355da@ozsrv2.ozlan.local...]464355da@ozsrv2.ozlan.local...[/email]
> Hi all!
>
> On my form I have TDBFBrowse with 1 numeric column.
> I want to deny user to enter values other than 1 to 100.
>
> How can I make so that the user did not leave oGridEdit (in TDBBrowse)
> until he enters the valid value or cancels the changes?
>
> In Xailer's documentation I see that appropriate event is
> TBrwColumn:OnExit
> or TGridEdit:OnExit. These events are fired, but when I return .F. (Do not
> Exit), the editing is always finished (with exit from oGridEdit).
>
> See attached sample.
>
> Thank you. Oleg.
>
>
>
>
>
>
>

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 10:52 am
por Oleg
Ignacio,
thank you for the explanation.
I do not need modal behaviour, I need to control the process of changing
focus.
Is it possible to make so that if OnExit return .f. do not change focus from
GridEdit
(in case of only one GridEdit) (maybe in the next releases)?
Thank you. Oleg.

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 10:52 am
por Oleg
Ignacio,
thank you for the explanation.
I do not need modal behaviour, I need to control the process of changing
focus.
Is it possible to make so that if OnExit return .f. do not change focus from
GridEdit
(in case of only one GridEdit) (maybe in the next releases)?
Thank you. Oleg.

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 12:07 pm
por ignacio
Oleg,
No, I am afraid it will not be possible, sorry.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:[email=46442f05@ozsrv2.ozlan.local...]46442f05@ozsrv2.ozlan.local...[/email]
> Ignacio,
>
> thank you for the explanation.
>
> I do not need modal behaviour, I need to control the process of changing
> focus.
> Is it possible to make so that if OnExit return .f. do not change focus
> from GridEdit
> (in case of only one GridEdit) (maybe in the next releases)?
>
> Thank you. Oleg.
>
>

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 12:07 pm
por NoName
Oleg,
No, I am afraid it will not be possible, sorry.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:[email=46442f05@ozsrv2.ozlan.local...]46442f05@ozsrv2.ozlan.local...[/email]
> Ignacio,
>
> thank you for the explanation.
>
> I do not need modal behaviour, I need to control the process of changing
> focus.
> Is it possible to make so that if OnExit return .f. do not change focus
> from GridEdit
> (in case of only one GridEdit) (maybe in the next releases)?
>
> Thank you. Oleg.
>
>

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 1:20 pm
por Oleg
Ignacio!
>> No, I am afraid it will not be possible, sorry.
Sorry to hear it, such GridEdit's behaviour would be more logical.
But it's OK. You can accept or do not accept users' proposals because you
are developer.
But can you answer how to validate incorrect user entry with current
TDBFBrowse?
For example, numeric values in the range 1..100 from my sample? What another
way?
Thank you. Oleg.

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 1:20 pm
por Oleg
Ignacio!
>> No, I am afraid it will not be possible, sorry.
Sorry to hear it, such GridEdit's behaviour would be more logical.
But it's OK. You can accept or do not accept users' proposals because you
are developer.
But can you answer how to validate incorrect user entry with current
TDBFBrowse?
For example, numeric values in the range 1..100 from my sample? What another
way?
Thank you. Oleg.

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 1:51 pm
por jfgimenez
Oleg,
> But can you answer how to validate incorrect user entry with current
> TDBFBrowse?
> For example, numeric values in the range 1..100 from my sample? What
> another way?
You may use the OnPostEdit event from either TBrowse or TBrwCol
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 1:51 pm
por jfgimenez
Oleg,
> But can you answer how to validate incorrect user entry with current
> TDBFBrowse?
> For example, numeric values in the range 1..100 from my sample? What
> another way?
You may use the OnPostEdit event from either TBrowse or TBrwCol
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 2:07 pm
por Oleg
Jose,
> You may use the OnPostEdit event from either TBrowse or TBrwCol
I know it, it is used in my sample project (first message in this thread).
For example, I can post unmodified value if modified value is incorrect.
But is there any way from this event to continue editing in GridEdit if
modified value is incorrect?
I could not find it.
Thank you. Oleg.

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 2:07 pm
por Oleg
Jose,
> You may use the OnPostEdit event from either TBrowse or TBrwCol
I know it, it is used in my sample project (first message in this thread).
For example, I can post unmodified value if modified value is incorrect.
But is there any way from this event to continue editing in GridEdit if
modified value is incorrect?
I could not find it.
Thank you. Oleg.

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 2:33 pm
por ignacio
Oleg,
Sorry but If we do not implement that behaviour is becauses we believe is a
bad programming practice that results to a terrible user interface. For
example, Would you admit that Excel completely retains you on a spreadsheet
cell if you enter a incorrect value? I am sure you don't.
> But is there any way from this event to continue editing in GridEdit if
> modified value is incorrect?
On the OnPostEdit event return its original value or delete the complete
row.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:[email=46445cbc@ozsrv2.ozlan.local...]46445cbc@ozsrv2.ozlan.local...[/email]
> Jose,
>
>> You may use the OnPostEdit event from either TBrowse or TBrwCol
>
> I know it, it is used in my sample project (first message in this thread).
> For example, I can post unmodified value if modified value is incorrect.
> But is there any way from this event to continue editing in GridEdit if
> modified value is incorrect?
> I could not find it.
>
> Thank you. Oleg.
>

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 2:33 pm
por NoName
Oleg,
Sorry but If we do not implement that behaviour is becauses we believe is a
bad programming practice that results to a terrible user interface. For
example, Would you admit that Excel completely retains you on a spreadsheet
cell if you enter a incorrect value? I am sure you don't.
> But is there any way from this event to continue editing in GridEdit if
> modified value is incorrect?
On the OnPostEdit event return its original value or delete the complete
row.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:[email=46445cbc@ozsrv2.ozlan.local...]46445cbc@ozsrv2.ozlan.local...[/email]
> Jose,
>
>> You may use the OnPostEdit event from either TBrowse or TBrwCol
>
> I know it, it is used in my sample project (first message in this thread).
> For example, I can post unmodified value if modified value is incorrect.
> But is there any way from this event to continue editing in GridEdit if
> modified value is incorrect?
> I could not find it.
>
> Thank you. Oleg.
>

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 3:03 pm
por Oleg
Jose, Ignacio!
> Sorry but If we do not implement that behaviour is becauses we believe is
> a bad programming practice that results to a terrible user interface. For
> example, Would you admit that Excel completely retains you on a
> spreadsheet cell if you enter a incorrect value? I am sure you don't.
I understand and respect your opinion. We may not discuss it further.
I have a different opinion, I think that any control for data entry must
have a possibility to check
the user data entry (as variant, in form of interactive user dialog).
Microsoft Excel has possibility to check cell values, i.e. the same
behaviour that I want to achieve
(I do not know Spanish version of Excel - in Russian version of Excel 2000
or XP it can be found
in menu item 'äÁÎÎÙÅðÒÏ×ÅÒËÁ' (DataCheck - submenu 7, item 5)).
I do not think that Excel is a bad programming practice :)
Regards, Oleg.

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 3:03 pm
por Oleg
Jose, Ignacio!
> Sorry but If we do not implement that behaviour is becauses we believe is
> a bad programming practice that results to a terrible user interface. For
> example, Would you admit that Excel completely retains you on a
> spreadsheet cell if you enter a incorrect value? I am sure you don't.
I understand and respect your opinion. We may not discuss it further.
I have a different opinion, I think that any control for data entry must
have a possibility to check
the user data entry (as variant, in form of interactive user dialog).
Microsoft Excel has possibility to check cell values, i.e. the same
behaviour that I want to achieve
(I do not know Spanish version of Excel - in Russian version of Excel 2000
or XP it can be found
in menu item 'äÁÎÎÙÅðÒÏ×ÅÒËÁ' (DataCheck - submenu 7, item 5)).
I do not think that Excel is a bad programming practice :)
Regards, Oleg.

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 7:20 pm
por ignacio
Oleg,
One thing is to check cell values and another thing is to visually hang the
complete Excel application until you input a correct value on a cell.
I think my point of view is enough clear. Thread closed by mi side If you do
not mind.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:[email=464469b0@ozsrv2.ozlan.local...]464469b0@ozsrv2.ozlan.local...[/email]
> Jose, Ignacio!
>
>> Sorry but If we do not implement that behaviour is becauses we believe is
>> a bad programming practice that results to a terrible user interface. For
>> example, Would you admit that Excel completely retains you on a
>> spreadsheet cell if you enter a incorrect value? I am sure you don't.
>
> I understand and respect your opinion. We may not discuss it further.
> I have a different opinion, I think that any control for data entry must
> have a possibility to check
> the user data entry (as variant, in form of interactive user dialog).
> Microsoft Excel has possibility to check cell values, i.e. the same
> behaviour that I want to achieve
> (I do not know Spanish version of Excel - in Russian version of Excel 2000
> or XP it can be found
> in menu item 'äÁÎÎÙÅðÒÏ×ÅÒËÁ' (DataCheck - submenu 7, item 5)).
> I do not think that Excel is a bad programming practice :)
>
> Regards, Oleg.
>
>

Validating column value in TDBFBrowse

Publicado: Vie May 11, 2007 7:20 pm
por NoName
Oleg,
One thing is to check cell values and another thing is to visually hang the
complete Excel application until you input a correct value on a cell.
I think my point of view is enough clear. Thread closed by mi side If you do
not mind.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:[email=464469b0@ozsrv2.ozlan.local...]464469b0@ozsrv2.ozlan.local...[/email]
> Jose, Ignacio!
>
>> Sorry but If we do not implement that behaviour is becauses we believe is
>> a bad programming practice that results to a terrible user interface. For
>> example, Would you admit that Excel completely retains you on a
>> spreadsheet cell if you enter a incorrect value? I am sure you don't.
>
> I understand and respect your opinion. We may not discuss it further.
> I have a different opinion, I think that any control for data entry must
> have a possibility to check
> the user data entry (as variant, in form of interactive user dialog).
> Microsoft Excel has possibility to check cell values, i.e. the same
> behaviour that I want to achieve
> (I do not know Spanish version of Excel - in Russian version of Excel 2000
> or XP it can be found
> in menu item 'äÁÎÎÙÅðÒÏ×ÅÒËÁ' (DataCheck - submenu 7, item 5)).
> I do not think that Excel is a bad programming practice :)
>
> Regards, Oleg.
>
>