Telerik Forums
UI for ASP.NET MVC Forum
0 answers
220 views

I have a Kendo Grid MVC with columns that need to get their unique list of multi-filter values from the server. So, I am trying to call an MVC controller method passing the field name and a set of filters.


columns.Bound(c => c.SalesRepName)

                    .Filterable(ftb => ftb.Multi(true).Search(true).DataSource(ds => ds.Custom().Transport(t => t.Read(r => r.ContentType("application/json").DataType("json").Type(HttpVerbs.Post).Action("Portfolio_Read_Filter", "Contract").Data("() => getGridFilterParameters('SalesRepName', 'portfolioGrid')")))));

No matter what I do, the datasource sends the request parameters as form instead of sending the parameters as json

How to force Kendo dataSource to send request parameters as JSON?

Thank you for you help!

Evgueni
Top achievements
Rank 1
Iron
 asked on 22 Jun 2022
0 answers
316 views

I am currently implementing Kendo UI for ASP.Net MVC.

My application has detected a vulnerability with the latest version of JQuery so there is no version to move to to resolve this vulnerability.

As Kendo comes with JQuery in the package is there work on-going to work with the JQuery community to fix this issue?

Paul
Top achievements
Rank 1
 asked on 22 Jun 2022
16 answers
1.7K+ views
We have the below action in a controller for Kendo grid data population

1.public ActionResult GetCompanyDetails([DataSourceRequest] DataSourceRequest request)
2.{
3.    var companyDetails = BusinessLayer.GetCompaniesDetail();
4.    return Json(companyDetails.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
5.}

While running checkmarx scan the above method was identified for Reflected XSS vulnerability.

Method GetCompanyDetails at line 1 of wxy/xyz/Controllers/ABCController.cs gets user input for the request element. This element’s value then flows through the code without being properly sanitized or validated and is eventually displayed to the user in method GetCompanyDetails at line 4 of wxy/xyz/Controllers/ABCController.cs. This may enable a Cross-Site-Scripting attack.

How to sanitize the DataSourceRequest request object to fix this XSS issue?
Jack
Top achievements
Rank 1
Iron
Iron
 answered on 16 Jun 2022
1 answer
137 views

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?

Yanislav
Telerik team
 answered on 16 Jun 2022
0 answers
106 views

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?

Azhar
Top achievements
Rank 1
Iron
 asked on 16 Jun 2022
0 answers
157 views

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"?>
<configuration>
  <solution>
    <add key="disableSourceControlIntegration" value="true" />
  </solution>
  <packageSources>
    <add key="nuget.telerik.com" value="https://nuget.telerik.com/v3/index.json" />
  </packageSources>
  <packageSourceCredentials>
    <nuget.telerik.com>
      <add key="Username" value="myemail" />
      <add key="ClearTextPassword" value="mypassword" />
    </nuget.telerik.com>
  </packageSourceCredentials>
</configuration>
Martin
Top achievements
Rank 1
Iron
 asked on 13 Jun 2022
1 answer
146 views

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;
        }

Eyup
Telerik team
 answered on 13 Jun 2022
1 answer
127 views

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.

Anton Mironov
Telerik team
 answered on 09 Jun 2022
1 answer
218 views
Doesn't look like Exportable is available in GridColumnSettings. I'm using the LoadSettings feature on a Grid and I want to set some columns to not be exported to Excel. Exportable is a setting when using the column binding but I don't see it in the GridColumnSettings class.
Yanislav
Telerik team
 answered on 08 Jun 2022
0 answers
113 views

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

Kendo version: 2022.2.510
Jquery version: 3.6.0

Please advise.
Thank you.
Joseph
Top achievements
Rank 1
 asked on 06 Jun 2022
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
DateTimePicker
TimePicker
StockChart
RadialGauge
ContextMenu
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?