editable datagrid
Posted: 1/5/2006 11:19:02 AM
By: Comfortably Anonymous
Times Read: 2,062
0 Dislikes: 0
Topic: Programming: Web Applications
I have an editable datagrid which has textboxes in which values are entered. I want to show some units eg. %, $, days, etc. beside those textboxes. The data in the textboxes is provided by the user but the  units remain unchanged.
Please help me in doing this.
Rating: (You must be logged in to vote)
Discussion View:
Replies:

editable datagrid
Posted: 1/5/2006 11:19:02 AM
By: Comfortably Anonymous
Times Read: 2,062
0 Dislikes: 0
Topic: Programming: Web Applications
Are you creating your columns manually, or going with the default 'Create columns automatically at run time'? (I don't know of any way to add descriptions when using 'Create Automatically...')

The way to do this is to create the needed columns manually, then turn the columns that you want to add the descriptions to into 'Template Columns', then use the Template Editor to add the descriptors to the needed cells.

To create the columns manually: (This is a quick runthru, if you get lost, ask...)

- Right-click on your datagrid, select Property Builder...  
- Select the Columns tool on the left-side of the dialog that pops up.
- Turn OFF the checkbox for 'Create columns automatically at run time'.
- Create a Bound Column for each data field you are going to display.
- For the columns you wish to add descriptors to, select the column, then click the 'Convert this column into a Template Column'
- Click OK

- Right-click on the datagrid again, this time pick Edit Template, then the first column you wish to add the descriptor to.
- This will pop up a weird little thing, with the Head, Item, EditItem, and Footer templates. For the ItemTemplate (and possibly the EditItemTemplate, depending on what you want), next to the Label (in ItemTemplate) or the Textbox (in EditItemTemplate), add another label with the description text you want in it.
- Right-click on the 'weird little thing' and select 'End Template Editing'
- Do this for each of the columns you need descriptions next to.
Rating: (You must be logged in to vote)