I found a related question and answer,
https://www.telerik.com/forums/kendo-date-picker-selection-by-class-name-with-jquery
That solution indeed works for datepickers, put the nesting of the drop down is different and I am unable to figure out what class references are required.
-Corey
On this site:
https://demos.telerik.com/aspnet-mvc/map/remote-marker
...you get us a nice example of using remote data in a map.
In this provided method you return a json file. How is this structured? I connot find any example.
public
ActionResult _StoreLocations()
{
return
Json(MapDataRepository.StoreLocations());
}
Hi,
I'm experimenting with the following grid and want to know if its possible to change the editor assosiated with the UserInputString column when the Field column value changes.
That is the Field column consists of a drop down list for example containing "Job Number", "Client", "Product" and other items. When the user selects, for example, Job Number the UserInputString editor is to be a TextBox. If Product is selected, the input will be a product auto complete text box, if 'Is Invoiced' is selected it will be a check box etc.
Is this possbile?
@(Html.Kendo().Grid<S3Web.Models.AdvancedSearchModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.AndOrString);
columns.Bound(p => p.StartBracketString);
columns.Bound(p => p.Field).Width(180);
columns.Bound(p => p.OperatorString);
columns.Bound(p => p.UserInputString);
columns.Bound(p => p.EndBrackerString);
columns.Command(command => command.Destroy()).Width(150);
})
.ToolBar(toolBar =>
{
toolBar.Create();
toolBar.Save();
})
.Editable(editable => editable.Mode(GridEditMode.InCell))
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
.ServerOperation(false)
.Events(events => events.Error("error_handler"))
.PageSize(20)
.Read(read => read.Action("AdvancedSearch_Read", "Jobs"))
.Create(create => create.Action("AdvancedSearch_Create", "Jobs"))
.Update(update => update.Action("AdvancedSearch_Update", "Jobs"))
.Model(model =>
{
model.Id(p => p.Field);
})
)
)
namespace MDT.Models
{
public class Vehicle
{
[Key]
public int VehicleID { get; set; }
public int UserID { get; set; }
[Required]
[StringLength(50)]
public string Name { get; set; }
public int MakeID { get; set; }
public int ModelID { get; set; }
[DisplayName("Color")]
public int ColorID { get; set; }
[Required]
[StringLength(4)]
public string StickerKey { get; set; }
[DefaultValue(true)]
public Boolean IsActive { get; set; }
public virtual CarColor CarColor { get; set; }
}
}
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Edit(Vehicle vehicle)
{
if (ModelState.IsValid)
{
db.Entry(vehicle).State = EntityState.Modified;
db.SaveChanges();
return RedirectToAction("Index");
}
return View(vehicle);
}
<
div
class
=
"editor-label"
>
@Html.LabelFor(model => model.ColorID)
</
div
>
<
div
class
=
"editor-field"
>
@*@Html.EditorFor(model => model.ColorID)*@
@Html.ValidationMessageFor(model => model.ColorID)
@(Html.Kendo().DropDownListFor(model => model.ColorID)
.BindTo(ViewData["CarColors"] as SelectList)
.Name("kendocarcolor")
.Value(Model.ColorID.ToString())
.OptionLabel("Select a Color")
)
</
div
>
Hi,
I used Kendo dialog, everything work fine, except the position. it seems that it doesn't impact. I changed the values in Percentages or in pixels but this is not working and it always appears in the same place.
What is the problem?
this is my code:
myWindowConfirmTransaction = $("#ConfirmTransactionWindow");
myWindowConfirmTransaction.kendoDialog({
width: "40%",
height: "65%",
title: "",
closable: true,
modal: true,
visible: false,
content: formHtmlData,
actions: [
{ text: 'Edit', action: onCancel },
{ text: 'Continue', primary: true, action: onContinue }
],
position: {
top: 10,
left: "25%"
},
animation: {
open: {
effects: "slideIn:down fadeIn",
duration: 1000
},
onCancel: {
effects: "slide:down fadeOut"
}
}
});
}
myWindowConfirmTransaction.data("kendoDialog").open().center();
thanks!
Accessing the Selected DataText and DataValue
Please help...
@(Html.Kendo().ListBox()
.HtmlAttributes(new { title = "Accounts"})
.Name("ListAccounts")
.DataTextField("AccountName")
.DataValueField("AccountID")
.BindTo(Model)
.Events(events => events.Change("onChange"))
)
<script>
function onChange(e) {
var
value =
$("#ListAccounts").data("kendoListBox").dataSource._data[$("#ListAccounts").data("kendoListBox").selectedIndex].value;
GetFleetAssets(value);
}
</script>
How can i get the DataValueField "AccountID" for the selected item within an Event Script? I can see that the data is loaded by viewing the source.
script above does not function
I'm putting together a grid which displays results for a document search. In the grid itself, instead of showing the row Id, I have a checkbox. What I'd like to do is twofold:
1. Add a check box column header that'll select all rows when checked (I've seen examples that use a specific boolean field, which my grid doesn't have nor use... I just want to go through each row displayed and check the checkbox, but it is not dependent upon any other column.
2. Get all the selected row IDs to pass into a controller. Not really pertinent, but what that controller will do is look for corresponding rows in the database, extract the document information in order to zip them all up together.
Any help would be greatly appreciated...
I have a page where one grid has to have the possibility to add/remove rows on the client before saving all the changes to the server.
The grid is created like this
@(Html.Kendo().Grid(Model.AssignedObjects)
.Name("AssignedGrid")
.Columns(columns =>
{
columns.Select().Width(35);
columns.Bound(p => p.Description);
})
.Pageable(p => p.PageSizes(true)
.ButtonCount(5))
.Sortable()
.Scrollable()
.HtmlAttributes(new { style = "height: 450px;" })
.DataSource(dataSource => dataSource.Ajax()
.ServerOperation(false)))
The remove is done using the below javascript code
function
removeSelected() {
var
grid = $(
'#AssignedGrid'
).data(
'kendoGrid'
);
var
dataSource = grid.dataSource;
var
rows = grid.select();
var
data = rows.map(
function
() {
return
grid.dataItem($(
this
));
});
for
(
var
i = 0; i < data.length; i++) {
dataSource.remove(data[i]);
}
grid.clearSelection();
}
On the remove function I had also had a code to go to the first page ( dataSource.page(1) ) but if I remove all the data going to page 1 would display the initial data. Now without the code to go to the first page it works by going to page 0 and displaying no items.
However I still have a problem when I change the number of records on a page I get again to the first page and the initial data. Is there a way to really remove the data, so regardless what actions I do (), not to get the initial data?
I need just one simple thing. I need to change the color from the barely visible half transparent close icon on grouping headers to actually be visible. I have tried setting a multitude of classes to try and get this damn thing to show up. I've actually ended up screwing up my entire grid just trying to find this one simple thing. When oh when will you people make overriding these damn classes and styles easy. ARGH!!!
Sorry about that, just a bit frustrated. So what do I need to do to get this damn icon to show up?