1.
public
ActionResult GetCompanyDetails([DataSourceRequest] DataSourceRequest request)
2.
{
3.
var companyDetails = BusinessLayer.GetCompaniesDetail();
4.
return
Json(companyDetails.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
5.
}
Hi,
we recently updated out project from Telerik 2019 to Telerik 2022.
Now our grids behave differently (without error) when we use getOptions() and setOptions() to keep the grids state; the column headers seem to change.
Here is a column header before we restore the state:
<th class="k-header" data-field="Prioritaet" data-index="6" data-title="Priorität" id="03b46289-2aba-487e-ba2e-e4aa67dae464" scope="col" data-role="columnsorter"><a class="k-link" href="/inoTerminal/Fremdpanzer/Read?fremdpanzerTable-sort=Prioritaet-asc">Priorität</a></th>
Here is a the same column header after we restore the state:
<th scope="col" role="columnheader" data-field="Prioritaet" rowspan="1" data-title="Priorität" data-index="6" headers="undefined" id="03b46289-2aba-487e-ba2e-e4aa67dae464" class="k-header" data-role="columnsorter"><span class="k-cell-inner"><span class="k-link"><span class="k-column-title">Priorität</span></span></span></th>
Visibly this produces these results:
Before:
After:
Otherwise the functionality seems to be the same.
We're using the MVC-Helpers to generate the grid...
Update:
To clarify, the difference in visible style comes through the css we implemented for the headers:
.k-grid-header th.k-header > .k-link {
font-weight: bold;
color: #2fa4e7;
height: auto;
}
After restoring the grid state the hierarchy of elements in the headers has changed. And because we use the direct child selector (>), the styles are not applied anymore. We solved this now by omitting the direct child selector.
So the issue is not a severe one, but I'm still curious if it is expected behaviour, that the header markup changes after getOptions/setOptions?
I have an existing grid which works fine.
Now I need to introduce a dropdown in toolbar for filtering in a column.
The column in question already has filtering implemented. However the client requires a dropdown in toolbar for ease of use as there are many columns and have scroll horizontally each time.
In short this dropdown has to do exactly what a column filter does, but it should be placed in toolbar along with search bar.
Is this possible? how to implement it?
How do I get the encrypted credentials for my account?
And how do I make it work?
Previously one guy tried to do it and failed, so now I'm going in for a new attempt. Clean slate.
This is what the config looks like right now (without username and password) :
<?xml version="1.0" encoding="utf-8"?>I have a number of grids that use the Endless scroll with the scrollable height set to 500 (see helper code below) with a default page size of 10. Sometimes the vertical scollbar doesn't appear on the grid even though it indicates that there are more records then are being shown (pages).
If i set the height to something else, for instance 472 it seems to show the scroll bar, but i am worried this is driven by the size of the rows and won't be durable.
public static GridBuilder<T> EndlessScrollDefault<T>(this GridBuilder<T> gridBuilder, string emptyMsg = "There are no records to show.", int? height = 500) where T : class
{
var rVal = gridBuilder.Pageable(page =>
{
page.Enabled(true);
page.PageSizes(false);
page.Input(false);
page.Numeric(false);
page.PreviousNext(false);
page.Refresh(true);
page.Messages(message => message.Empty(emptyMsg));
})
.Scrollable(s => s.Endless(true));
if (height != null)
{
rVal = rVal.Scrollable(s => s.Height(height.Value));
}
return rVal;
}
how to set NumericTextBox format dynamically like below. I tried this but its not working.
var dynamicValue = "###,###.000";
@(Html.Kendo().NumericTextBox<double>()
.Name("Amount")
.Spinners(false).Format("dynamicValue")
.Decimals(3)
.HtmlAttributes(new { style = "width: 100%; height: 27px;", tabindex = "6" })
.Events(e => e.Change("OnAmountChange"))
)
dynamicValue is set as the response of GET API call.
I have a problem with kendo DateTimePicker when setting component type to modern. The control has a weird behavior and does not have an exact pattern to reproduce the problem, only that sometimes when making the transition from the date view to the time view or vice versa, the time view gets stuck and loses buttons.
You could replicate the issue on the telerik demo page, https://demos.telerik.com/aspnet-mvc/datetimepicker/component-type
I am trying to customize the Marker of a ScatterLine chart. If the data is of type A then show ChartMarkerShape.Triangle otherwise show ChartMarkerShape.Circle?
This is my current code
@(Html.Kendo().Chart(Model.DosageUnitsOfInsulin)
.Name("DosageTotal")
.Title("Total Series")
.Series(series => {
series.ScatterLine(model => model.DosageDate, model => model.DosageTotal).Width(4).ColorHandler("getColor");
})
.SeriesDefaults(seriesDefaults => seriesDefaults
.ScatterLine().Markers(markers => markers.Size(20).Type(ChartMarkerShape.Circle)).Color("#47AADF")
)
.XAxis(x => x
.Date()
.BaseUnit(ChartAxisBaseUnit.Days)
.Title(title => title.Text(""))
.Labels(m => m.DateFormats(v => v.Days("M/d/yyyy") ))
.Min(new DateTime(2021,2,7))
.Max(new DateTime(2021, 9, 28))
.MinorGridLines(m => m.Visible(true))
.MajorGridLines(m => m.Visible(true))
)
.YAxis(y => y
.Numeric()
.Title(title => title.Text("Units of Insulin"))
.Min(65)
.Max(110)
.AxisCrossingValue(-5)
)
.Theme("sass").Legend(leg => {
leg.Position(ChartLegendPosition.Bottom);
})
.Tooltip(tooltip => tooltip
.Format("{0:d}, {1}")
.Visible(true)
)
.Events(events => events.Render("onRender"))
.Zoomable()
.Pannable()
)
Is it possible to dynamically change the marker when the chart is rendered? I have subscribed to the Visual event like the Custom Visual example. However, I just want the standard Telerik circle and sometimes triangle visual not a custom image.
Thanks,
Tim
Hello,
We have a specific scenario reported from our client with the "Clean Formatting" tool in the editor button.
Copy the Strikethrough text from MS word & paste it in Editor.
Expectation here is clean formatting tool should remove the Strikethrough & text should become normal. It works fine when we copy the text from "Google Doc".
I know that "clean formatting" tool removes all the styles associated.
When the text is copied from "Google Doc", it will have the "Span" element with the css associated. hence the clean formatting option will be able to remove the css & make it as normal text.
Strikethrough
When the text is copied from "MS Word", it will have the "<s>" element without any css associated. hence the clean formatting option will NOT be able to make the text normal since there are no associated css.
Strikethrough
Please let me know if you have any idea to achieve this functionality ?
Thanks & Regards, Puru