This is a migrated thread and some comments may be shown as answers.

Grid Not work properly with key & editors

1 Answer 120 Views
Grid
This is a migrated thread and some comments may be shown as answers.
shailesh
Top achievements
Rank 1
shailesh asked on 12 Dec 2013, 09:05 AM
Hi,

I am new to kendo UI  Web.

My requirement are as follows with kendo grid:
  1. Grid Should be editable with tab key means user in a cell and edit some thing then press the tab key so next cell is selected 
             in edit mode and user can change the value. : According to the kendo documentation this will work if I set navigation property = true, but it's not working in my case . when I edit and hit the tab it's always move on first cell.
  2. I have two or more combo-box column in my grid user can select the value from up and down key  also auto append should work for that combo -box.(image attached)
  3. if user on last cell of last row and hit the tab key then new row added at bottom of grid and cursor in first cell of new row so that user can enter a new record.
  4. how to add image column and handle the click for that image cell.
  5. Cell only accept numbers in xx,xxx.xxx format with out showing spin (numeric) control.
basic grid project (with html & required scripts files ) with some functionality which I had done attached with this thread.
Please let me know if there is any possible scenario is available for above requirements.
Thanks in advance 

                                         

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 14 Dec 2013, 08:57 AM
Hello Shailesh,

To the points:

  1. Pressing the tab key makes the next cell into editor mode as you would expect and it is working the same way in the demo that you shared. Here is what I experience in Grid.Demo.html that you shared.
    http://screencast.com/t/cqyhWtr1jkIo
  2. I am afraid it is not possible to change this behavior, I do not find any feasible work-around which I can suggest you.
  3. You will have to attach an 'keydown' event handler similar to this:
    grid.tbody.on('keydown',function(e){
      if($(e.target).closest('td').is(':last-child') && $(e.target).closest('tr').is(':last-child')){
          grid.addRow();
      }
    })
    e.g.
    http://jsbin.com/eGUKEdis/3/edit
  4. Add class to the image tag, and attach click handler similar to the previous one (point 3).
    grid.tbody.on('click','.imgClass',function(e){
       var imgelement = $(e.target);
        /// your logic
    })
  5. Create custom editor to be a numeric text-box and set it spinners options to false. Also you might need to specify format




Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
shailesh
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or