editoptions:{value:liste_banque}
assuming liste_banque = {1:one;2:two}
If you combine “setColProp” with an event then you'll be able to do this I think. E.g, onSelectRow then set the new editoptions if they have changed?
It's case sensitive so you'll have to write “onSelectRow”, not “Onselectrow” ..
I did a simple test and it worked after replacing..
$(”#search”) with jQuery(”#search”)
and..
$(”#add”) with jQuery(”#add”)
The error is probably in your /paiement/traitement/server.php
I used local data to test..
You're mixing the usage of “jQuery” and “$”?
Perhaps try jQuery(”#search”) and the same for add.. ?
.. and remember there's nothing wrong with anything else here since it does work when I hard code the number, even if it's the very same number as I see when using alert on last_row. I know it should say # in front of 'grid' in the selector but I just wrote a simple example here (but it's tested.. ). last_row is also set = rowid at each execution..
Any idea when this will happen? I have great use for it within the next two weeks, but I can manage without of course. Would be extremely nice! 🙂
Nobody knows if this is possible?
I basically want to decide the value of the input showing up in the cell, and alter the value before saving it (last part should be OK I think..
onSelectRow: function(rowid) {…
or..
ondblClickRow: function(rowid) {…
Normally you'll have an ID somewhere in the row (get it by getRowData(rowid)), and you can then do whatever you want in the function..
Thanks Tony,
I understand this, but I want to decide the value of the input-element when the user clicks a cell, and also do something with when he saves. Example:
Value of cell
FYI I'm solving this using two spans in the cell, one for the content, and one for the footnotes. I have an beforeEditCell event dealing with this when editing. Using rightMouseUp to edit footnotes, writing to the other span.. this way I have two types of content in the same cell, editing one with left click, the other with right click (a dialog box where you can create new foot notes, reuse old ones etc).
I want to have one table where the rows are sortable within sections of it. There are already semantics in place where I know for certain that they don't want to sort one item among another group of items, and hence it would be user friendly to not allow it.
It's not a huge thing though, I can just let the users have that freedom and they can handle it 🙂
Isn't the point of having a key that it's the one thing we can expect to be unique? The value/name isn't necessarily unique, and in many cases it's user input. I agree that a user shouldn't — and perhaps should be allowed to — create two items with the same name, but I think it'll happen and there's a reason select-elements are built like they are.
It's a solution to do lookups the other way, but not sure if it's very bullet proof 🙂
I also posted in “Help”-forum that when using GridToForm the key is not sent there either. This is something I use to store data on the server, and I want to store the key of course since it's used for relations. I'm currently working around it by doing a lookup for the ID on the server side code before updating the DB.
Thanks
I've looked a bit at it, but getRowData() returns the content of each cell, which is a normal table. The content is not the select-element which only shows when you edit the cell. Actually, if the cell is being edited as you fetch its value, you'll get the HTML for the select-element, but still you don't know which one is selected of course. Not that it's an option that have all such cells being edited as you fetch their values 🙂
I'm not sure what to do, but since the items I have there are unique, I will simply send the value and find it's ID before saving it, and simply avoid the issue for now. Let me know if you find a solution to it! I'm saving my grid this way instead of going by a form. Perhaps that's where the mistake is?
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top