PDA

View Full Version : Grid expand on data Clicked



AtulDawkhare
2 Feb 2012, 5:18 AM
Hi ,
I have a Grid with say 10 rows and 5 columns. suppose the first column is "Name"
So the data would be some thing like


Name
abc
xyz
pqr


Now My query is, I want to Expand the Row on "abc" click, i.e. on "Name" columns data click.
And wanted to show the data of the other columns from the same row.

Please suggest me the direction to achieve this.

Farish
2 Feb 2012, 6:55 AM
I didnt understand what you are trying to achieve. what do you mean by expanding a row?

AtulDawkhare
2 Feb 2012, 7:08 AM
31289Hi
I have attached the image , Hope this will clear my requirement.

In the image it is shown that, the RowExpander, we can make the row expandable. I wan the same functionality but not on click the Plus image, but on the name of the first column. i.e. from the above image when user clicks on "3m Co" from the company column. the Row should get expanded. i.e. what currently displayed in the image.

Hope this time i am able to explain well.

Farish
2 Feb 2012, 7:23 AM
Yes you have explained it very well but unfortunately, i havent tried this expand row plugin. you can add a listener to the grid for itemclick and then somehow cause the row to expand like the plus button does.

AtulDawkhare
2 Feb 2012, 9:42 PM
Thanks for the reply.

But the item click will be applicable for all the items present on the Grid, But I want for only first column's data click.

Also for this I need to put lot many if,else to get the first column , it should be only itemclick not the itemcontext etc

So it there any way to handle this situation in Good way?
Also Can we do the same by putting some image just like the plus, but inside the Name column's data
i.e. [image.gif] 3mCo

and on click the image.gif , we should be able to expand the row.