Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Inline Editing : Dynamic Select
16/12/2009
16:44
Avatar
Jason
Guest
Guests

Let me first explain a sample scenario:

I have 6 columns of data.(A, B, C, D, E, F)

I have my jqGrid setup for inline editing. Each of these columns performs a dataUrl in the editoptions param.

Column A is a standard lookup, however the remaining columns depend on the select:value of column A. Right now I am using beforeEditCell to capture the rowID of the selected/edited row and I call $.getJSON and pass that rowID to my controller to identify the value of Column A and then perform the lookup for Columns B, C, D, E, F depending on what column's cell the user is trying to edit.

Is there a better way to do this? Perhaps a way when a user goes to edit a cell I can tell the grid to get the value of Column A and pass that to the lookup call?

18/12/2009
20:11
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

You can use a dataEvent object to define a event for every select.

More you can find here:

http://www.trirand.com/jqgridw.....ditoptions

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

18/12/2009
22:54
Avatar
Jason
Guest
Guests

Tony:

Yes, I understand that. However in the dataEvent, I would have to pass the value of ColumnA into the dataEvent for columnB so that my results from that dataEvent would be filtered based on the value of ColumnA.

This was pretty critical and I had to abandon this. Right now I limit the grid display to a specific ColumnA value so that all my other lookup columns can already know what the id of my old ColumnA.

Thanks though!

22/12/2009
09:22
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Look here:

http://www.trirand.com/blog/?p.....t-dropdown

The trick is maybe if you change the select in A to be to set additional attribute in B which is the value from A and etc.

Best Reagrds

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

22/12/2009
15:12
Avatar
Jason
Guest
Guests

As I understand it, a lot of the form elements are generated 'live'/dynamically. Is the form element for the additional columns even available in the DOM for me to attach a change event on columnA?

26/12/2009
12:05
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello

Using dataEvents you can attach what you want to what you want if I understand the problem ok.

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

30/12/2009
22:17
Avatar
Jason
Guest
Guests

Thanks for your help Tony. We ended up modifying the way the grid on this page is displayed and auto-setting a filter for ColumnA, that way all the other columns will know to load only the data related to the value for ColumnA.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
61 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information