PDA

View Full Version : Include menu on row in grid?



nightowl
20 Jan 2009, 12:20 AM
Still building my first app using Ext. Still struggling with how I want to structure the user interaction.


I have a grid, with a list of participants (first name, last name, city). On one hand, I want to allow the user to edit the details. That should open a form, which includes a lot more information about the person (address, telnr, ...), not included in the grid. On the other hand, I also want to give the user access to a detail page of the participant - which shows the events he participated in, his pending payments etc.

Formerly, I'd go like this:



<table>
<tr><td>first name</td><td>last name</td><td>[ <a href="editdata.php">Edit</a> ][<a href="viewdetails.php">]</td></tr>
...
</table>
Now, I created the grid to resemble the table (but much better, of course). I already added a rowselectionmodel, that redirects on click to the detail page... but that is only half of the story.



I guess I could bind one to "click once", and one to "doubleclick", but this is far from clear to the user and probably not the best way to handle it.

I guess I could also have the rowselection model, allow to select 1 row, add 2 buttons to the bbar ("edit" and "view detail"). Is this the best way? It seems more cumbersome - it's having 2 clicks instead of 1 previously ...


How should I integrate the 2 menu-options?
What is the approach you take for this?
And would you refresh the whole page (document.location...), or would you put all info somewhere on 1 screen?

20 Jan 2009, 3:11 AM
search this site for rowcontextmenu

nightowl
20 Jan 2009, 8:49 AM
Thx - didn't know I was supposed to look for the events. I was looking at config options.

By searching I found what I was actually looking for:
http://rowactions.extjs.eu/

Great!

20 Jan 2009, 8:55 AM
http://unsportsmanlikecomment.files.wordpress.com/2008/02/ace-ventura.jpg
"aaaaaaall righty then..."