how to get a value or index of row and column from table when by selection cell??

6 Kommentare

Walter Roberson
Walter Roberson am 19 Dez. 2011
How does this differ from your other active question, http://www.mathworks.com/matlabcentral/answers/24318-uitable-in-gui-get-selected-index-of-row-or-get-selected-value
??
Image Analyst
Image Analyst am 19 Dez. 2011
I can't even understand what that means. Doesn't make sense to me, grammatically.
Aldin
Aldin am 19 Dez. 2011
How to get selected index from uitable???
Aldin
Aldin am 19 Dez. 2011
@Walter : Because there is not valid answer
Walter Roberson
Walter Roberson am 19 Dez. 2011
If it is the same question but the answers you have received in the existing questions do not work for you, then you should stay in that question and indicate the problems you are encountering rather than posting a new Question. New Questions are for new topics.
Aldin
Aldin am 19 Dez. 2011
ok

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 19 Dez. 2011

0 Stimmen

If you are asking how to get the row and column of the selected values when you are in a CellSelectionFcn callback, then the answer according to http://www.mathworks.com/help/techdoc/ref/uitableproperties.html#brhbsk0 is to examine the Indices structure field in the eventdata that is passed to the callback as the second parameter.

3 Kommentare

Walter Roberson
Walter Roberson am 19 Dez. 2011
Note: this will not work outside of a CellSelectionFcn callback. Outside of a callback, you need to use the Java methods.
Aldin
Aldin am 19 Dez. 2011
Walter, I'll apologize if I'm boring
Is that correct? : http://blinkdagger.com/matlab/matlab-gui-tutorial-uitable-part-2-how-to-access-table-data/
I quess it is solution to my problem
Walter Roberson
Walter Roberson am 19 Dez. 2011
The code there looks okay. It is, as I noted above, restricted to use within a CellSelectionFcn callback, and all it really does is access the Indices structure field of the eventdata, which is what I had indicated in my answer.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu App Building finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by