karen
Posts: 99
|
| Posted: 07/14/2009, 4:34 AM |
|
I have an editable grid and I would like the focus to be set on the textbox amount field after selecting the value of the listbox. So I used the Client - Onchange event of the listbox and selected Action - Set Focus to the textbox. However, this doesn't do anything. The On Change event fires but I think the Set Focus code isn't working for the editable grid. I have a record form on the same page and that action works for the record form.
I'm sure I have read abt this somewhere before or have even asked abt it but I can't seem to find it after searching many times. I hope someone can shed some light on this. Thanks in advance!
|
 |
 |
feha
Posts: 712
|
| Posted: 07/14/2009, 6:20 PM |
|
each row in editable grid has unique id and name , it depends where you want to set a focus ...
_________________
Regards
feha
www.vision.to
feedpixel.com |
 |
 |
karen
Posts: 99
|
| Posted: 07/14/2009, 10:10 PM |
|
Hi feha, thanks for your response. Basically, I want it to set focus on the next field in the row, i.e., it should happen for each row after I select the value of the first field (listbox), then move to the textbox. At the moment, the focus just stays on the current field.
I've tried to use getElementById to reference the textbox (2nd field) but what happened was that whenever the listbox of any row has been changed, it will just set focus on the 2nd field (textbox) of the first row. Anyway, I don't think that was the right code but I didn't know what else to do becoz the CCS Action is not effective.
Is there a way to set focus to the next field when the first field of the same row is changed? By the way, I'm using CCS 3.2. Could be fixed in other versions. Or I could do custom code too if someone can point me to it as I'm not well-versed with javascript. I've managed so far with the help from forums. Look forward to some ideas, thanks!
|
 |
 |
karen
Posts: 99
|
| Posted: 07/15/2009, 9:57 PM |
|
Ok, I've figured out how to reference the editable grid fields properly after reading this post. http://forums.codecharge.com/posts.php?post_id=84001&s_keyword=getRowID
The only weird thing I discovered was that I had to subtract 1 from the rowid or the field jumps one row ahead. I looked at the source code and noted that the row ids do start at 1 so that's weird. But it's working now. Still would love to hear if anyone knows why the rowid is one less from that obtained from the current field. Would be interesting to know and would also be good in case another mystery turns up later on :)
|
 |
 |
|