Hi I have a grid with a edit pop up.All works as expected till the user puts a script in the edit fields.On lose focus this executes the script for some reason.I have even written my own custom validation which removes this from the field but when the validator returns it executes the payload(kk</script><img src=1 onerror='alert(223)'/>).What happens in the background of the editor on focus out because my validator changes do not make a difference
Any help would be greatly appreciated as I have tried everything but the alert still appears..Even when the text has been removed from the textfield
I have kendo mvc grid with inline edition. I want to edit my values in grid but when i click on combobox value and change it. It's not changing row value return old existing value
How can i solve this?
Here my grid and Templates
@(Html.Kendo().Grid<
MockUpForeNet.Controllers.CardDetailController.Limits
>()
.Name("limitgrid").AutoBind(true)
.DataSource(dataBinding => dataBinding.Ajax()
.Read("GridLimitBinding", "CardDetail",new { rule = rule }).Update("UpdateLimit", "Transaction")
.Model(keys =>
{
keys.Id(c => c.Id);
keys.Field(c => c.Id).Editable(false);
keys.Field("DurationType", typeof(string)).Editable(true);
keys.Field("DurationValue", typeof(string)).Editable(true);
keys.Field("ValueType", typeof(string)).Editable(true);
keys.Field("MaxValue", typeof(string)).Editable(true);
}).Batch(true).ServerOperation(false)
)
.Events(e => e.DataBound("hidecolumn1"))
.Editable(editing => editing.Mode(Kendo.Mvc.UI.GridEditMode.InCell))
.ToolBar(commands =>
{
commands.Create().Text(" ");
commands.Save().SaveText(" ").CancelText(" ");
})
.Columns(columns =>
{
columns.Bound(e => e.MaxValue).Width(200).Title("Limit").ClientTemplate("#= ValueType == 'Amount' ? Row(MaxValue) : RowLiters(MaxValue) #");
columns.Bound(e => e.ValueType).Width(200).Title("Type").EditorTemplateName("ValueType");
columns.Bound(e => e.DurationValue).Width(200).Title("Duration");
columns.Bound(e => e.DurationType).Width(200).Title("Duration Type").EditorTemplateName("DurationType");
columns.Bound(e => e.Id).Visible(false);
columns.Bound(e => e.Id).Width(80).ClientTemplate("<
img
src
=
'../../assets/images/icons/delete.svg'
id
=
'#=Id#'
/>").Filterable(false).IncludeInMenu(false).Title(" ");
})
//.Selectable()
.Sortable()
.Navigatable(configurator => configurator.Enabled(true))
///My editor templates
@(Html.Kendo().ComboBox()
.Name("cbvaltype")
.Items(i =>
{
i.Add().Text("Quantity").Value("Quantity");
i.Add().Text("Amount").Value("Amount");
})
)
@(Html.Kendo().ComboBox()
.Name("cmbdurationtype")
.Items(i =>
{
i.Add().Text("Hour").Value("Hour");
i.Add().Text("Day").Value("Day");
i.Add().Text("Week").Value("Week");
i.Add().Text("Month").Value("Month");
i.Add().Text("Year").Value("Year");
})
)
@(Html.Kendo().Scheduler<
SchedulerViewModel
>()
.Name("Scheduler")
.Date(DateTime.Today)
.AllDaySlot(true)
.Group(g => g.Resources("RoomID").Date(true))
.Editable(w => w.Update(false).Create(false).Destroy(false))
.Views(views =>
{
views.DayView(weekView => weekView.StartTime(06, 00, 00).EndTime(19, 00, 00).Selected(true));
views.WeekView(weekView => weekView.StartTime(06, 00, 00).EndTime(19, 00, 00));
})
.AutoBind(false)
.Resources(resource =>
{
resource.Add(m => m.RoomID)
.DataTextField("Text")
.DataValueField("Value")
.DataSource(d => d.Read(read => read.Action("GetRooms", "DataSource")));
})
.DataSource(d => d
.Model(m =>
{
m.Id(f => f.RoomID);
m.Id(f => f.Id);
m.Field(f => f.Start);
m.Field(f => f.End);
})
.Read(read =>
read.Action("GetCalendarSchedule", "DataSource")
)
))
)
I am asking if there is a tool for word processing files like word , i know that the default editor has many text manipulation options but i want the microsoft word interface with its tabs and page interface, with its ruler and so .
these are the main functionalities that i want to check if they are found in UI for ASP.Net MVC:
1- insert photo
2- modify margin
3- modify header and footer
4- word alike
5-insert file
thanks
have a simple grid that when I export to PDF the filter ros andboxes are on the PDF, How do I exclude these from the PDF document.
This is a MVC web app.
Thanks in advance
@(Html.Kendo().Grid< ShitTruckLibrary.Models.Contact>()
.Name("WorkGrid")
.ToolBar(tools => tools.Pdf())
.Pdf(pdf => pdf
.AllPages()
.AvoidLinks()
.PaperSize("A4")
.Scale(0.8)
.Margin("2cm", "1cm", "1cm", "1cm")
.Landscape()
.RepeatHeaders()
.TemplateId("page-template")
.FileName("Kendo UI Grid Export.pdf")
.ProxyURL(Url.Action("Pdf_Export_Save", "Grid"))
)
.Columns(columns =>
{
columns.Bound(c => c.id).Hidden();
columns.Bound(c => c.ForeName).Title("Forename").Filterable(ftb => ftb.Cell(cell => cell.ShowOperators(false)));
columns.Bound(c => c.SurName).Title("Surname").Filterable(ftb => ftb.Cell(cell => cell.ShowOperators(false)));
columns.Bound(c => c.CompanyName).Title("Customer").Filterable(ftb => ftb.Cell(cell => cell.ShowOperators(false)));
columns.Bound(c => c.Address1).Title("Address 1").Filterable(ftb => ftb.Cell(cell => cell.ShowOperators(false)));
columns.Bound(c => c.Address2).Title("Address 2").Filterable(ftb => ftb.Cell(cell => cell.ShowOperators(false)));
columns.Bound(c => c.Phone1).Title("Phone 1");
columns.Bound(c => c.Phone2).Title("Phone 2");
})
.HtmlAttributes(new { style = "height: 50vh;" })
.Scrollable()
.Filterable(ftb => ftb.Mode(GridFilterMode.Row))
.Sortable()
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5))
.DataSource(dataSource => dataSource
.Custom()
.PageSize(50)
.Transport(transport =>
{
transport.Read(read => read.Url("getwork").Data("getSearch").Type(HttpVerbs.Get));
})
)
)
Hi,
I want to be able to hide the category axis on a line chart that doesn't have any data. Please see the attached; as you can see, there are a lot of dates in the middle that don't have any data as there isn't a point plotted, yet the date is still shown in the category axis and there is space reserved for it in the actual graph.
This looks untidy so we need to be able to hide all of the dates that don't have any data/a point. So for example anything from the 9th of July to the 19th of August should be completely hidden from the chart. How can we achieve this?
The current code:
<code>
Html.Kendo().Chart(Model.OutletColdTemperatures)
.Name("OutletTemperatureMonitoringCold") // The name/ID.
.ChartArea(chartArea => chartArea.Background("#ADD8E6")) // Background colour.
.Title(title => title
.Text("Cold Temperatures") // Control the title at the top of the graph.
.Color("#2E5A78")
.Font("bold 24px Arial, Helvetica, sans-serif")
.Position(ChartTitlePosition.Top)
)
.DataSource(ds => ds
.Group(g => g.Add(d => d.SystemRef)) // This tells it to create a new/group each line by the System Ref.
.Sort(g => g.Add(d => d.SystemRef))
)
.SeriesDefaults(seriesDefaults => seriesDefaults
.Line().Style(ChartLineStyle.Smooth) // This controls the type of line shown.
)
.Series(series => series
.Line(value => value.Temp, date => date.Recorded) // This controls the line written out.
.Name("#: group.value #") // Control the value shown in the Key/Legend.
.Labels(labels => labels.Visible(false)) // Hide temperatures on the graph.
.MissingValues(ChartLineMissingValues.Interpolate) // Control how missing values are shown.
)
.CategoryAxis(axis => axis // This controls the category at the bottom. Currently shows the date.
.Title("Date")
.Type(ChartCategoryAxisType.Date)
.Categories(c => c.Recorded)
.Labels(labels => labels
.Rotation(-65) // Rotate the text around.
.Template("#: value.toLocaleDateString() #") // Format the date shown.
)
)
.ValueAxis(axis => axis // This controls the value at the left side. Currently shows the temperature.
.Numeric()
.Title("Temperature °C")
.PlotBands(p => p
.Add(10, 10.2, "#FF0000")
)
.Max(20) // Set the maximum value shown at the top of the graph.
)
.Legend(legend => legend // This controls the Key/Legend. Currently shows the Outlet System Ref.
.Visible(false)
.Position(ChartLegendPosition.Bottom)
.Labels(x => x.Font(font: "9px Arial, Helvetica, sans-serif").Template("#: text #"))
)
.Tooltip(tooltip => tooltip // Add a tooltip showing the Outlet details.
.Visible(true)
.Template(tooltipTemplate)
)
.Events(events => events
.DataBound("OnDataBound_OutletTemperatureMonitoring")
)
</code>
Any help would be appreciated. I think the same question has been answered here, however the response was a couple years ago: www.telerik.com/forums/hide-labels-on-date-axis-that-have-no-data#BFCuWHL3s0i8c7DX1uPcdw
Thanks
As pictured, I have 2 grids next to each other. On the left, I have a list of people who are in a group. On the right, I have a list of people who are not in the group but instead are candidates that could be added. I need to add people to the group by selecting one or multiple on the right grid then, on button press, all users should be should be added to the group. In the same way, those who are members of the group should be selectable in the same way and on button press, I should be able to remove all selected members.
Do you have a working example of this type of behavior? Where do I put the Add/Delete buttons? Must they be a custom button built into the grid or can they be separate from the grid? Must I perform a round-trip refresh after an Add/Delete action or can the control remain in play on the client?
Thanks in advance for your help,
Joel
Hello,
in my application I use a grid that works with client detail template via ClientDetailTemplateId property. In the client detail template I want to show a label with german umlauts like:
@Html.Label(
"olb_currentaccount_overdraftcommission"
,
"Überziehungsprovision"
,
new
{ @class =
"detail-label"
})
Whenever there is a german umlaut in the label text I receive an invalid template exception. The raw HTML code looks like this:
<
label
class
=
"detail-label"
for
=
"olb_currentaccount_overdraftcommission"
>&';220;berziehungsprovision</
label
>
Is there any way to use german umlauts for a HTML label in a client detail template?
Any help is appreciated.
Regards
Raphael