Page 1 of 1
Data Grid - Consecutively Numbered Controls
Posted: Wed Nov 18, 2009 3:06 am
by johnmiller1950
Greetings All,
I notice in some examples that the data grid has consecutively numbered fields (i.e. Name00001, Name 00002, Name 00003, etc)
In my data grid I have multiple fields all named the same thing which makes it difficult to determine the contents of a field in a selected row.
How does one go about getting fields, images, buttons, etc to be numbered consecutively in their name within the data grid?
Thanks for your help.
John Miller
Posted: Thu Nov 19, 2009 10:39 am
by hliljegren
Maybe I don't understand your question but if you set your datagrid to "Form"-mode you can add any field you like and set the name as you like.
Data Grid - Consecutively Order Controls
Posted: Thu Nov 19, 2009 1:54 pm
by johnmiller1950
The thing I don't understand is this: When I set up the datagrid template, I rename the default field "Label" to "Name". Then when I populate the grid, runtime makes a row template for each entry. The row templates are numbered consecutively Row Template 0001, Row Template 0002, Row Template 0003, etc.
However, the field in each row always has the same name which is "Name." So, if I have twenty rows, I have 20 fields, all called the same thing. In some of the examples I have downloaded, those fields are called "Name 0001, Name 0002, Name 0003, etc, corresponding to the numbering scheme of the row template.
Is their a trick to doing this?
Thanks,
John
Posted: Thu Nov 19, 2009 3:14 pm
by hliljegren
I think the trick with the datagrid is to NOT bother with the internals if you are using it in table mode. You can in table mode set a column behavior if you want to display your data in a specific manner. You then use the column behavior code to set / change your data.
If you on the other hand have set the datagrid to "Form"-mode you define the complete layout for every row, by adding fields, buttons, etc to the row template and then set the data with the Row behavior code. Have a look at the examples at
the manual at screenstepslive.com and maybe it will be clearer how the datagrid is glued together.
Or ask again of course...
BTW I have never seen the thing you are describing. Where does it show up? And what did you do to get there?