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

set default input on Kendo Grid to Numeric (on Ipad keyboard)

1 Answer 273 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Davin
Top achievements
Rank 1
Davin asked on 09 Jul 2013, 06:10 PM
I have a C# MVC project with a Kendo UI grid. When running it on an Ipad
I want the keybaord to default to numberic instead of alpha. Is there a
Kendo setting that accomplishes this? My grid code is below...

@(Html.Kendo().Grid<OPS.Models.LineProductWasteEntry>()
.Name("WasteGrid")
.Columns(columns =>
{

columns.Bound(p => p.Id).Hidden(true);
columns.Bound(p => p.BucketWeight).Hidden(true);
columns.Bound(p => p.LineCategoryId).Hidden(true);
columns.Bound(p => p.LineCategoryProduct).Hidden(true);
columns.Bound(p => p.LineProductId).Hidden(true);
columns.Bound(p => p.ShiftId).Hidden(true);
columns.Bound(p => p.SourceId).Hidden(true);
columns.Bound(p => p.UserId).Hidden(true);
columns.Bound(p => p.CategoryName);
columns.Bound(p => p.ProductName);
columns.Bound(p => p.Value);
columns.Bound(p => p.SourceName);
columns.Bound(p => p.Source);
columns.Bound(p => p.Weight);
columns.Bound(p => p.Weight2);
columns.Bound(p => p.Weight3);
})
.ToolBar(toolbar =>
{
toolbar.Save();
})
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Resizable(resize => resize.Columns(true))
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(p => p.Id);
model.Field(p => p.SourceName).Editable(false);
model.Field(p => p.CategoryName).Editable(false);
model.Field(p => p.ProductName).Editable(false);
model.Field(p => p.Value).Editable(false);
})
.Batch(true)
.ServerOperation(false)
.Events(events => events.Error("error"))
.Read(read => read.Action("Waste_Read", "LabourEntry")
.Data("Read_Data"))

.Update(update => update.Action("Waste_Update", "LabourEntry")
.Data("Update_Data"))
)


//.Sortable()
//.Scrollable()
.AutoBind(false)

)

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 11 Jul 2013, 04:02 PM
Hello Davin,

The behaviour occurs because by default the type of the numeric text box' input is set to text. Usually the numeric keyboard on iOS devices pops up for inputs of type number.

It is not possible to modify the input type of the numeric widget, but you may try to use this hack which should force iOS to display the numeric keyboard for text input.
In order to attach the pattern attribute you should use a custom editor function:

Regards,
Alexander Valchev
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
Davin
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or