Table question
I know I can use the Table.SelectedRow property to get the index number of a selected item in a table, but has anyone found a way to get the text of that row?
|
I have not been able to figure tables out at all. Like you, I've only been able to get the index of the selected row.
Really even that is not any good because if you have more then one column you would need the r,c matrix index to get a real value from the table but I have seen no info on the column. |
Data object renderers that include a SelectedItemIndex property can be used to reference data as described in THIS article.
So far I've not discovered any way to extract data using renderers that don't include SelectedItemIndex. If you must use something without SelectedItemIndex (like a table) for display, you should be able to also include a hidden renderer (like a dropdownmenu) that references the same data source and gets passed the table's selectedRowIndex. With the two properly linked, you should be able to extract identicle info from the hidden renderer as is displayed in the visible rederer. This may not work with Data Sources dynamically updated by the server. Haven't tested it, but I suspect the hidden object wouldn't update properly when the Data Source values change. |
Thanks for the replies. The specific table I want to pull info from is on the tracking window, whose DataSource is dynamically updated by the server so the dropdown idea might not work. I will definitely test it out when I get time, though!
|
I partly got this idea working. I added a new dropdown with the same DataSource as the table and managed to figure out that if I change the row template to read the "value" attribute instead of the "text" attribute, I can get a dropdown that dynamically gets filled in with the same list as in the table.
This seems like a step in the right direction for me and it seems that it should be easy to next get the name from my new dropdown. However, there are a couple of snags I've run into so far still.
I'll keep on messing with this, though... |
All times are GMT -5. The time now is 02:08 PM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI