Steve Palm
Top achievements
Rank 1
Steve Palm
asked on 15 Aug 2012, 12:27 AM
Hi,
How can I set focus on my added new row?
In my case, I insert new row at the bottom..
Thanks...
How can I set focus on my added new row?
In my case, I insert new row at the bottom..
Thanks...
6 Answers, 1 is accepted
0
Hi Steve,
I am not sure if I understand you correctly - by design the focus is on the newly inserted row in Kendo UI Grid. Could you please provide more detailed information or even best send a small but runnable project which illustrates your current implementation? This way I will be able advice you further and provide the most appropriated solution if such is possible. Thank you in advance for your cooperation.
Regards,
Iliana Nikolova
the Telerik team
I am not sure if I understand you correctly - by design the focus is on the newly inserted row in Kendo UI Grid. Could you please provide more detailed information or even best send a small but runnable project which illustrates your current implementation? This way I will be able advice you further and provide the most appropriated solution if such is possible. Thank you in advance for your cooperation.
Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Steve Palm
Top achievements
Rank 1
answered on 16 Aug 2012, 02:01 AM
Hi Iliana ,
I don't have much time to create a sample project for you.. BUT you can try this at your "Kendo.Mvc.Examples" project..
Kindly check my screenshot for more details..
Thanks...
I don't have much time to create a sample project for you.. BUT you can try this at your "Kendo.Mvc.Examples" project..
Kindly check my screenshot for more details..
Thanks...
0
Hello Steve,
I tried to reproduce your issue but to no avail. Please check the video link below:
http://screencast.com/t/TuvRMo4qR
Do we miss something on our side? Also did you try with the latest version?
Regards,
Petur Subev
the Telerik team
I tried to reproduce your issue but to no avail. Please check the video link below:
http://screencast.com/t/TuvRMo4qR
Do we miss something on our side? Also did you try with the latest version?
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!
0
Steve Palm
Top achievements
Rank 1
answered on 22 Aug 2012, 12:40 AM
Hi Petur,
Yes, it will work at Inline editing but not at Batch Editing..
Here's a code snippet.. :)
Thanks..
Yes, it will work at Inline editing but not at Batch Editing..
Here's a code snippet.. :)
Kendo().Grid...........................
.Editable(editable => editable.Mode(GridEditMode.InCell).CreateAt(GridInsertRowPosition.Bottom))
.Sortable()
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.Batch(
true
)
.ServerOperation(
false
)
.Events(events => events.Error(
"error_handler"
))
.Model(model =>
{
model.Id(p => p.ProductID);
model.Field(p => p.ProductName).Editable(
false
);
})
.Create(
"Editing_Create"
,
"Grid"
)
.....................
Thanks..
0
Hi Steve,
Basically the grid tries to put the first cell into edit mode. You can move that column so the first column becomes editable or you can work-around this with the following logic executed on the Change event of the dataSource.
All the best,
Petur Subev
the Telerik team
Basically the grid tries to put the first cell into edit mode. You can move that column so the first column becomes editable or you can work-around this with the following logic executed on the Change event of the dataSource.
function
OnDSChange(e){
var
cell = $(
'#Grid'
).find(
'tbody tr:eq('
+e.index+
') td:eq(1)'
);
// or different cell
$(
'#Grid'
).data(
'kendoGrid'
).editCell(cell);
}
All the best,
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!
0
Steve Palm
Top achievements
Rank 1
answered on 12 Sep 2012, 12:32 AM
Hi,
I bind this at "edit" event and it seems that "e.index" is not getting the right row.. but it works if I input a number...
Thank...
I bind this at "edit" event and it seems that "e.index" is not getting the right row.. but it works if I input a number...
var grid1 = $('#BalanceSheetRowsRowComponentGrid').data("kendoGrid");
grid1.bind("dataBound", function (e) {
var cell = $('#BalanceSheetRowsRowComponentGrid').find('tbody tr:eq(' + e.index + ') td:eq(1)');
$('#BalanceSheetRowsRowComponentGrid').data('kendoGrid').editCell(cell);
});
Thank...