Telerik Forums
Kendo UI for jQuery Forum
7 answers
1.3K+ views
I currently have beforeSend implemented for all four transports (read, update, create and destroy) and they all make the same call. Is it possible to define beforeSend on the transport once so every request uses the same one.

Joel
Top achievements
Rank 1
 answered on 29 Aug 2018
1 answer
3.8K+ views

I develop an application asp.net mvc core 2.1.

I have this:

--------------------------------------------------------------------------------------------------------------------------------
@model Dto
@{
    ViewBag.Title = "PrincipalView";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

...

<div class="page-container hidden-on-narrow row">
    <partial name="partialView" model="Model" />
</div>

...

<button class="btn btn-submit btn-block" onclick="getPDF('.pdf-page');">Print Receipt</button>

...

--------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------

function getPDF(selector) {
    kendo.drawing.drawDOM($(selector)).then(function (group) {
        kendo.drawing.exportPDF(group/*, { paperSize: "A5", landscape: true }*/).done(function(data) {
            kendo.saveAs({
                dataURI: data,
                fileName: "partialview.pdf"
            });
        });
    });
}

--------------------------------------------------------------------------------------------------------------------------------

With the above code, I can export a partial view and save it, but I don't want that approach.

I want to export that partial view to PDF and open it in another tab or a new browser window.

Could you guys point me to the correct path?

Guillermo
Top achievements
Rank 1
 answered on 29 Aug 2018
1 answer
954 views

Hello,

I've got multiple numeric textbox that gets rendered inside a gride via SPA architecture with MVVM binding and templates. I've posted this on stackoverflow before but have gotten no response hopefully I'll get one here. Stackoverflow link

My main issue was the numeric textboxes are editable and onchange/onspin I'd like whichever textbox's font that got changed to change color so lets say red in my case. It only works for whichever one is selected, so if I changed the first textbox and then I click somewhere on my page to focusout of the textbox and then I try to change the 2nd textbox and focusout the first textbox styles gets reverted back to it's default and doesn't keep its red font color and only the 2nd textbox does. I want all changed textboxes to keep its font color change.

 

My code:

<script type="text/x-kendo-template" id="numericEditableTemplate">
    <input id="#= UserId##= UserCode#"
         class="#= UserId##= UserCode#"
         data-role="numerictextbox"
         step="0.25"
         data-min="1.5"
         data-bind="value: CreditHours, events: { spin: onNumericEditChangeOrSpin, change: onNumericEditChangeOrSpin }"
    />
</script>

 

<script type="text/x-kendo-template" id="GridTemplate">
<div id="infoGrid"
     data-role="grid"
     data-bind="source: gridData, events: { dataBinding: onDataBinding }"
     data-filterable="true"
     data-sortable="true"
     data-columns="[
        {
          'field': 'UserId',
          'title': 'User Id'
        },
        {
          'field': 'EmailAddress',
          'title': 'Email Address'
        },
        { 'field': 'PersonName',
          'title': 'Name'
        },
        { 'field': 'Hours',
          'title': 'Credit Hours',
          'template': $('#numericEditableTemplate').html(),
          'editable': true
        },
        { 'field': 'MatchedUserId',
          'title': 'Matched User ID',
          'template': $('#userIdEditableTemplate').html(),
          'editable': true
        }
     ]">
</div>
</script>

 

My viewmodel function that handles the changing of the colors:

onNumericEditChangeOrSpin: any = function (e) {
    var target = e.sender;
    var inputClass = target.element[0].class;
    $("." + inputClass).find("input").css("color", "red");
};

 

Preslav
Telerik team
 answered on 29 Aug 2018
3 answers
188 views

We are utilizing the datasource for some spreadsheet editing, and there is a possibility that the user can potentially update 1000s of rows at once. In batch mode everything works great but we are running into a reasonable upper limit of the request size to the server per sync.

Is there a way to chunk the batch mode so it limits each request to a certain number of changes?

If not can you think of a strategy or place to begin looking functionality-wise?

Nencho
Telerik team
 answered on 29 Aug 2018
4 answers
348 views

Is there a way to add commands to the SpreadSheet toolbar?

I am especially thinking about the enable/disable range button.

In a template/document scenario, one would want:

- to build templates where some cell ranges have to be disabled;

- to make documents based on such templates where disabled ranges (possibly including formulas) cannot be changed.

In case this is an oversight (enable/disable seems to be the only range property that cannot be set via the toolbar), please log a defect for a fix in a future version.

 

Emanuele
Top achievements
Rank 1
 answered on 29 Aug 2018
1 answer
284 views

Hello,

I have problems getting draggable to work in IE 11.

Example here:

https://dojo.telerik.com/OVeseMiQ/6

It is working in the latest version of Firefox and Chrome and also Edge.

Not sure if it's a kendo issue or maybe a JQuery problem.

Can you help ?

 

Ivan Danchev
Telerik team
 answered on 29 Aug 2018
5 answers
1.1K+ views

I have a remote binding grid that is used to access several different external tables. I have a button that can apply a users saved options for the grid using the setOptions method. The issue I'm having is trying to get the grid to apply the users options when the data is loaded; ie the user clicks to a different table and the grid auto applies the options. My first attempt was using the dataBound event to call my setOptions method to apply the configuration, however this does not fire and is actually listed as not being possible in the documentation here: https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/methods/setoptions 

 

How can I get around this to have the setOptions method be called on a grid loading? 

 

Thanks.

Preslav
Telerik team
 answered on 28 Aug 2018
3 answers
2.1K+ views

 Hi,

  I have tried looking through documentation and searching online, but have not found an answer to this.

  Taking the example at:  https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.selectable

  How could I change the code to satisfy these two requests:

    1.  Show a title in the header "Select Rows"

    2.  If the name is "John Doe", the row should not be selectable, and instead of the checkbox, I would like to see the name "John Doe".

 

Thanks.

 

 

Georgi
Telerik team
 answered on 28 Aug 2018
1 answer
188 views

Hello,

 

I get data from ajax call,i have two fields which are Boolean   and want to apply the filter on these two fields:

 

  $.ajax({
          dataType: "json",
          type: "POST",
          url: "@Url.Action("fnction", "Dashbrd")",
          contentType: "application/json; charset=utf-8",
          data: JSON.stringify({ "regionalManager": dtDrpVals.drpValue, "dtFrom": dtDrpVals.fromDate}),
          success: function (result) {
          var dataSource = new kendo.data.DataSource({
          data:result,      
          filter:[{
         "logic": "and",
         "filters": [{
         "field": "m_grid",
         "operator": "eq",
         "value": false},
         {"field": "crew_present",
          "operator": "eq",
          "value": false}]},]      
      });

 

the result has 40 records,if the filter i set works,must give me 10 records

Neli
Telerik team
 answered on 28 Aug 2018
1 answer
472 views
i want post form and grid data ,
i have sample like this
https://dojo.telerik.com/OZUsIzIw/4

i want try post to my url with format json
http://10.0.8.212:81/api/ArPumPd/create

how to do that? thank you.
Viktor Tachev
Telerik team
 answered on 28 Aug 2018
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?