Page 1 of 1

Datagrid AUTOTAB property

Posted: Mon Sep 28, 2009 4:55 am
by chris9610
In the documentation for the data grid it states you can set the autotab property for pField to true.

Does anyone know how to do this?

TIA

Posted: Tue Sep 29, 2009 8:07 pm
by chris9610
Well I know how to set the autoTab of a field but how can I set the autoTab of all fields in a dataGrid group?

While editing a cell I would like to TAB key to the next cell. Or shift TAB to the Previous Cell.

Reading the documents it states the autoTab must be true to do this.

So far I have not figured how to set the autoTab of all the fields in the dataGrid. Does anyone have a clue?

Posted: Tue Sep 29, 2009 8:08 pm
by trevordevore
Can you point to the place in the documentation that you are referring to?

Posted: Tue Sep 29, 2009 8:09 pm
by trevordevore
Just saw your second post. A Data Grid table should tab back and forth between fields by default. A Data Grid form does not however. You would have to program that logic yourself. Are you working with a form or table?

Posted: Tue Sep 29, 2009 9:07 pm
by chris9610
I am only working with tables to date.

In this scenarios CloseFieldEditor pFieldEditor and ExitFieldEditor pFieldEditor are still sent. The difference is that after CloseFieldEditor is sent to pField the contents of pFieldEditor are saved in the dgData. If for any reason you do not want the data to be saved then you can return "cancel" from CloseFieldEditor.

Note: If the user presses the tab key while editing and the autotab property of pField is true then the message OpenNextFieldEditor pDirection is sent to pField. If you don't handle this message and the data grid is a table then the data grid automatically opens the next cell for editing. For data grid forms you can handle this message in order to open another field for editing. You could call EditKeyOfIndex for example.

Note 2: The default behavior for pFieldEditor is located in button "Field Editor" of stack "revDataGridLibrary". If you want to override this behavior then you can assign the behavior of pFieldEditor to another button in the preOpenFieldEditor message.
This is from the BlueMango documentation anid it is also on page 171 of the Revolution Data Grid Documentation.

Posted: Tue Sep 29, 2009 9:10 pm
by chris9610
BTW by default normally a field autotab property is false as stated in the Revolution Dictionary.

Posted: Tue Sep 29, 2009 9:27 pm
by chris9610
Trevor:

OK I checked the autotab of the fields in a newly created datagrid and the value is true. So the autotab is not the issue.

So when I tried to edit a cell and tab to edit the next cell, the open cell closes but the next cell does not go into the edit mode.

So I am missing something in the setup.

Posted: Wed Sep 30, 2009 2:43 pm
by trevordevore
I just did the following test and tabbing between cells in a row worked fine. Can you see if this test works and then we can look at how your Data Grid is different.

1) Create stack
2) Drag Data Grid onto stack
3) Use the Contents tab of the property inspector to set the content of the Data Grid to:

Test[tab]This
Test[tab]That

where [tab] specifies that you use the tab key.

4) Activate Browse tool and double-click on Test in column 1 row 1. Field editor should open up.
5) Press tab key. Field editor swiches to This in column 2 row 1.

Does that test work for you?

Posted: Wed Sep 30, 2009 11:12 pm
by chris9610
Sorry Trevor:

Not working here.

This is the exact procedure I used to test the datagrid. The link below is a copy of the test stack.

http://dl.getdropbox.com/u/653964/test%20datagrid.rev

Posted: Wed Sep 30, 2009 11:16 pm
by trevordevore
Your test stack works on my end (Windows XP Rev 3.5 gm-2). What do you see in the message box if you execute the following:

Code: Select all

put the uRIP["version"] of stack revdatagridlibrary && "build" && the uRIP["buildnumber"] of stack revdatagridlibrary

Posted: Wed Sep 30, 2009 11:28 pm
by chris9610
1.0.0 build 2

Posted: Wed Sep 30, 2009 11:37 pm
by trevordevore
You need to update to 3.5 gm-2. You are running 3.5 gm-1. After updating test again and see if it works.

Posted: Thu Oct 01, 2009 12:54 am
by chris9610
Thanks Trevor:

That did the trick.

Tab key moves the edit cell to the next cell.