I have a grid with columns `start` and `end`. I have a template for the start column that shows the two integers concatenated as a range. E.g., "1 - 2". I put a custom editor on this templated column and want to be able to parse the range and set both start and end. Where should I perform this parsing logic? I tried to do it on the datasource change event but calling .set() on the dataitem ends up re-calling the event.
5 Answers, 1 is accepted
0
Hello Ryan,
I am not sure if understand correctly the needed functionality but it should not be necessary to parse the template or manually change the value in the data if you wish to show the inputs for both fields in the same column. You should just include inputs with the editor that are bound to the corresponding items. I created a small jsBin example that demonstrates this scenario. If this is not the functionality that you are looking for then please clarify to what and when should the start and end value be set.
Regards,
Daniel
Telerik
I am not sure if understand correctly the needed functionality but it should not be necessary to parse the template or manually change the value in the data if you wish to show the inputs for both fields in the same column. You should just include inputs with the editor that are bound to the corresponding items. I created a small jsBin example that demonstrates this scenario. If this is not the functionality that you are looking for then please clarify to what and when should the start and end value be set.
Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Ryan
Top achievements
Rank 1
answered on 17 Apr 2014, 06:48 PM
That's great and will work for me but in my case when I hit tab it doesn't tab to the next input. I don't understand why. http://trykendoui.telerik.com/IFed/2
0
Ryan
Top achievements
Rank 1
answered on 17 Apr 2014, 07:07 PM
I found that setting navigatable to false will allow me to tab but then the enter key doesn't save the row.
0
Ryan
Top achievements
Rank 1
answered on 22 Apr 2014, 01:37 PM
Can you suggest an approach for the problem with tab?
0
Hello again Ryan,
I am afraid that this behavior is not supported by the built-in navigation. The navigation will always move the focus to the next cell when the tab key is pressed. In order to avoid this and save the value on enter I can suggest to disable the navigation and implement the needed logic on enter e.g.
Regards,
Daniel
Telerik
I am afraid that this behavior is not supported by the built-in navigation. The navigation will always move the focus to the next cell when the tab key is pressed. In order to avoid this and save the value on enter I can suggest to disable the navigation and implement the needed logic on enter e.g.
var
grid = $(
"#grid"
).kendoGrid({
...
navigatable:
false
}).data(
"kendoGrid"
);
grid.table.on(
"keydown"
,
"input"
,
function
(e) {
if
(e.keyCode == 13) {
$(
this
).blur();
grid.closeCell();
}
});
Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!