Welcome Guest Search | Active Topics | Sign In | Register

How do I determine the selected row index as a string in Java Options
Uncork
Posted: Saturday, August 13, 2011 4:05:17 AM
Rank: Member
Groups: Member

Joined: 7/13/2011
Posts: 13
Your documentation shows how to get the actual grid row, but I want it as a numeric string so I can display something in Java depending on the selected row number

This is what the doc shows (to raise an event when a row is selected)


Code: JavaScript
var item = grid.getSelectedItem();  //Get the selected item
    grid.raiseItemCommandEvent(item.getIndex(), "select");
eo_support
Posted: Monday, August 15, 2011 8:01:03 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You just call ToString to convert the item index to string.

Thanks
Uncork
Posted: Monday, August 15, 2011 6:53:39 PM
Rank: Member
Groups: Member

Joined: 7/13/2011
Posts: 13
Thanks - ToString did not work but the following did (note the case of toString)..

Code: JavaScript
var gridIndexString = item.getIndex().toString();


Thanks again
Brian
eo_support
Posted: Monday, August 15, 2011 7:30:20 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Yes. You are right. If you use C# you use ToString, if you use JavaScript, you use toString ---- we generally do not support such generic programming questions though. So please try to seek other resources if you have similar questions in the future.

Thanks
Uncork
Posted: Monday, August 15, 2011 7:38:07 PM
Rank: Member
Groups: Member

Joined: 7/13/2011
Posts: 13
I would not have posted the question if it was not specifically related to your grid

Brian
eo_support
Posted: Monday, August 15, 2011 7:52:01 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

I understand, but we do not believe your question about how to convert a number to a string has anything to do with us. I didn't mean to be rude, however the question would be like when you are trying to find a gas station while driving a car. The question arises while you are using the car but it's not a question to the car's vendor. Our position is similar, we do not answer generic programming questions even if the questions arises while using our product.

We usually don’t mind to point you to the right direction, but it’s important that you understand you cannot rely on us on such questions. So we would like to clearly point out to you that such questions are out of the scope of our support. We would like to help as much as we can, but we need to focus on our product so we simply cannot afford to answer generic programming questions. Hope you understand.

In the future if you have similar questions, you can try to generalize it first. If our product does not appear in the "generalized" version, then usually it's not a question for us. If after that you are still not sure whether it has to do with us or not, then you can still post here. We will then decide whether answer it or not. If you do not see it being answered within one business day, then usually it means we consider it out of the scope of our support.

Hope this helps. We appreciate your understanding.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.