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

Traverse Buttons with Tabulator

1 Answer 218 Views
Grid
This is a migrated thread and some comments may be shown as answers.
IT-Consol
Top achievements
Rank 1
IT-Consol asked on 26 Feb 2013, 11:08 AM
Hi, i have three questions:
1)
i have a grid as follows:

Html.Kendo().Grid<CustomerModel>()
 .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.Name);
        columns.ForeignKey(p => p.StateId, (IEnumerable)ViewData["States"], "Id", "Name").Filterable(true).Title("State");
        columns.Command(command => { command.Edit(); command.Destroy(); });// edit/insert and delete buttons
    })

I want to be able to to trigger all actions by keyboard. While it works on the input fields, it seems i cannot use the Tabulator Key to traverse my buttons.

2)
 I want to be able to save rows by hitting the "enter" key on my keyboard. This should work when the cursor is somewhere in the row. This is a problem when i have controls like combobox or datepicker inside my row because there you use the "enter" key to select entries. Is there a way to only bubble the keyup event to the row when the dropdownbox'/datepicker's state is != open? (it should only bubble the event when the enter key is hit while i am not selecting a value).

3)
The above mentioned column for the stateID is of type long? (nullable). I already found out that there is a problem when i want to insert a new line because the combobox tries to set the value to the whole object - not only the null value. Is there an official solution to this problem, because like this, the control is not really useable .... (even though you said in another thread that this is the intended behaviour).

best regards,
daniel

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 28 Feb 2013, 09:29 AM
Hello Daniel,

I posted a replay in the support ticket that you opened for reference I will paste it here too.

-------------------------------------------------------------------------------------------------------------------------------------------



  1. If you have enabled the Navigatable option then you should be able to reach the edit/delete buttons by navigating with the arrows and pressing Enter. Here is a link to a screencast I captured on my side using the version 1315. Basically you can even if you are have not navigated to the Edit button , pressing Enter will put the row into edit mode
  2. I am not sure what exactly you are trying to achieve basically what you described is supported out-of-the-box. With the Enter key I can save the row when I navigate to the Update button or open the DatePicker when it is focused.
    http://screencast.com/t/YLuBJW9Yb
  3. The behavior is discussed multiple times on the forums. What we suggest is to use default value for that nullable field.
    e.g.
    Copy Code
    .DataSource(dataSource => dataSource
        .Ajax()               
        .Model(model=>{
            model.Id(m=>m.Id);
            model.Field(f => f.StateId).DefaultValue(0);
        })
    Another option that you might use to to manually update that field with the help of the save event. Similar question is covered here.


Feel free to continue our conversation here or in the support ticket that you opened.

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