EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   UI Developer Discussion (https://www.eq2interface.com/forums/forumdisplay.php?f=3)
-   -   Table question (https://www.eq2interface.com/forums/showthread.php?t=6252)

Deiussum 06-07-2006 04:31 PM

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?

Landiin 06-07-2006 04:47 PM

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.

Zonx 06-07-2006 05:45 PM

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.

Deiussum 06-07-2006 06:12 PM

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!

Deiussum 06-11-2006 09:02 PM

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.
  • First, all the names in the dropdown are colored with the con color the same way they are in the table, so I'm assuming that the value attribute has additional color code information. I'm assuming that this extra info is what is keeping my /who from working. I also tested with /say and nothing is said with that line of code, either...
  • Additionally, the table doesn't seem to have an OnSelect event to tie in to. Ideally, I would tie into that, then select the proper index in the dropdown (which would be hidden once I get everything working).

I'll keep on messing with this, though...


All times are GMT -5. The time now is 09:13 AM.

vBulletin® - Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© MMOUI