Telerik Forums
Kendo UI for jQuery Forum
1 answer
657 views
I want to integrate the gantt chart with our ERP System. I want to send the base64 of the exported pdf to a javascript function.Neither POST to a server url or save it localy. Is there any way to just get the base64 of the pdf file without exporting/saving the file? 
Bozhidar
Telerik team
 answered on 27 Jan 2016
5 answers
2.0K+ views

I have a grid with Inline batch editing mode on. I am trying to display dropdownlist inside the grid and enable user to select values from the dropdown. The issue i am running into right now is, by default it shows null value, when clicked on that cell it shows all the dropdown values and you can select to different dropdown value. But as soon as you click outside the grid cell, it reverts the text to 'null' again. When clicked on the cell back again, it changes from 'null' to previously selected value.

ViewModel: 

 

public class CreateAsnRequestViewModel
{
    [Display(Name = "UPC UOM")]
    public string UPCUOM               { get; set; }      
      
    public string UserDefinedCode      { get; set; }      
}
 
public class CommonDetailsCommonProperties
{
    public string ProductCode          { get; set; }
    public string UserDefinedCodes     { get; set; }
    public string UserDefinedCode      { get; set; }
    public string CombinedValuesToSave { get; set; }
}
 
public class UOMItem : CommonDetailsCommonProperties
{
    public string UOM                  { get; set; }
}
 
public class CommonDetailsViewModel
{
    public List<UOMItem> UOMs          { get; set; }
}

Controller:

CommonDetailsViewModel commonDetailsViewModel = commonService.InvokeGetCommonDetails(flag);
ViewData["UOMList"] = commonDetailsViewModel.UOMs;

Views:

EditorTemplate: _UOMDropDownList.cshtml

@using System.Collections
@using Kendo.Mvc.UI;
 
@(Html.Kendo().DropDownList()
.BindTo((IEnumerable)ViewData["UOMList"])
    .DataValueField("UserDefinedCode")
    .DataTextField("UserDefinedCode")
    .Name("UPCUOM")
)

Main Razor View:

@(Html.Kendo().Grid<SupplierPortal.ViewModels.CreateAsnRequestViewModel>()
      .Name("GridViewOpenPOSelected")
      .Columns(columns =>
      {
          columns.Bound(p => p.UPCUOM).HtmlAttributes(new { @class = "editableFiled" }).EditorTemplateName("_UPCUOMDropDownList").ClientTemplate("#:UserDefinedCode#").Width(180);
      })
    .Editable(editable => editable.Mode(GridEditMode.InCell).DisplayDeleteConfirmation(false))
    .AutoBind(false)
    .Navigatable()
    .DataSource(dataSource => dataSource
                .Ajax()
                .Batch(true)
                .PageSize(10)
                .Read(read => read.Action("GetSelectedPO",   "Asn").Data("GetSelectedPOParameters"))
                .ServerOperation(false)
                .Model(model =>
                {
                    model.Id(p => p.Id);
                }))
    .Events(events => events.DataBound("gridDataBound"))
    .Events(events => events.DataBinding("gridDataBinding"))
    .Events(events => events.Edit("onEdit"))
)

 

Any help will be appreciated.

Thanks. 

 

 

 

 

 

 

Kiril Nikolov
Telerik team
 answered on 27 Jan 2016
7 answers
320 views

I'm experimenting with the Kendo UI grid, data source, and AngularJS on the front end, and ASP.NET Web API on the back end.  So far, everything is working well, except for a couple of issues creating new records.  I have a Contact page, and on that page I have an Activities grid displaying various activities related to the contact. 

My first issue is that I need to populate the contactID client-side when creating a new record.  I am doing that using transport.create.data, but the contactID is always zero when sent to the server.  I have worked around this by changing the case of the property to "ContactID" (capital C), so that it no longer matches the schema.  This adds it to the list of parameters (so I have "ContactID" and "contactID") and Web API accepts it, but I must be doing this wrong.  What is the correct way to handle it?

The second issue is that after a successful POST, the client-side row that was sent to the server is added to the grid.  I got the impression that the JSON returned from the server after a successful POST is supposed to get added.  It contains some properties (such as the activityID) that are populated server-side.  How is this supposed to work?

Here's the data source code:

$scope.activityGridData = function() {
    return {
        type: "webapi",
        transport: {
            read: {
                url: "api/Activities"
            },
            update: {
                url: "api/Activities"
            },
            create: {
                url: "api/Activities",
                data: { ContactID: $scope.contact ? $scope.contact.contactid : "" }
            },
            destroy: {
                url: "api/Activities"
            }
        },
        serverPaging: true,
        serverFiltering: true,
        pageSize: 20,
        filter: { field: "ContactID", operator: "eq", value: $scope.contact ? $scope.contact.contactid : 0 },
        "sort": [{
            "field": "isComplete",
            "dir": "asc"
        }, {
            "field": "activityID",
            "dir": "desc"
        }],
        "schema": {
            "data": "data",
            "total": "total",
            "errors": "errors",
            "model": {
                "id": "activityID",
                "fields": {
                    "activityID": {
                        "type": "number"
                    },
                    "contactID": {
                        "type": "number"
                    },
                    "activityType": {
                        "type": "number"
                    },
                    "activityTypeList": {
                        "editable": false,
                        "type": "object"
                    },
                    "activityTypeName": {
                        "editable": false,
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "notes": {
                        "type": "string"
                    },
                    "location": {
                        "type": "string"
                    },
                    "startTime": {
                        "type": "date",
                        "defaultValue": null
                    },
                    "endTime": {
                        "type": "date",
                        "defaultValue": null
                    },
                    "isAllDay": {
                        "type": "boolean"
                    },
                    "isComplete": {
                        "type": "boolean"
                    }
                }
            }
        }
    };
};

Kiril Nikolov
Telerik team
 answered on 27 Jan 2016
1 answer
112 views

I have to give export option in PDF and Excel,outside  of grid toolbar.how can i achieve using dropdwon  or button.

can anyone suggest me for same.

 

Viktor Tachev
Telerik team
 answered on 27 Jan 2016
3 answers
455 views

I've been working on getting my Kendo grid to persist across page navigation. I was able to get that to work, but when I set the initial sort to a computed field, the grid will throw an error:

  • Uncaught TypeError: d.GetStatus is not a function

d.GetStatus is a computed field, so the error doesn't really surprise me, but I'm not sure how to handle this so that I can set the initial sort to a field that isn't in the original dataSource (without directly modifying the DB response to include the computed value as its own property).

{
   dataSource: {
     schema: {
       model: {
         fields: {
           'AmountDue': {...},
           'AmountPaid': {...},
           'Name': {...},
           ...
         },
         // Computed Fields
         'GetStatus': function() {
           return this.AmountPaid >= this.AmountDue ? 'Paid' : 'Due';
         }
       }
     },
     sort: {
       dir: "asc",
       field: "GetStatus()"
     }
   },
   columns: [
     ...
     {
       title: 'Status',
       field: 'GetStatus()'
     }
   ]
}

Is there another way to go about creating this custom "Status" field so that the initial sorting works?

Boyan Dimitrov
Telerik team
 answered on 27 Jan 2016
3 answers
224 views

I have a combo chart with both bubble and scatterLine chart types and I would like to have two y-axis's (one on the right and one on the left).  I can use the axisCrossingValues for numeric x-axis, but when I'm using dates, it doesn't work.  Can someone help me with a workaround ? 

 

Tristian Fernandez
Top achievements
Rank 1
 answered on 26 Jan 2016
2 answers
84 views
I am sorry for my english...


How can i make only One principal task and after all tasks be will child without the user do clic in "Task Child".. (automatically). In this part they will does new parents and new childs, but NEVER at same level that the first Principal task... that last is prohibited for the "system"... 
Antonio
Top achievements
Rank 1
 answered on 26 Jan 2016
4 answers
245 views

Steps to reproduce (demo):

  1. Define the mask in markup. Example:
    <input id="someNumber" value="003123456" data-role="maskedtextbox" data-mask="0000000000" />
  2. Initialize using kendo.init()

Expected results:

Textbox shows prompt chars on focus, only allows characters defined in mask, etc.

Actual results:

Textobx does not show prompt chars on focus (or shows "undefined" if data-clear-prompt-char is set to true), allows any characters.

Other info:

The issue does not happen if a) there is a literal in the mask, or b) the component is initialized through JS, such as $(selector).kendoMaskedTextBox(options).

Dirk
Top achievements
Rank 1
 answered on 26 Jan 2016
2 answers
76 views

Hello,

 I found a bug that when you select then deselect grid row you get javasript error in kendo framework.

 Have a look on my example:

http://dojo.telerik.com/eVUnu

 

the same problem occurs in your examples on:

 http://docs.telerik.com/kendo-ui/AngularJS/the-grid-widget

Atanas Georgiev
Telerik team
 answered on 26 Jan 2016
1 answer
99 views

Hello,

1.we have not provided Saturday and Sunday dates data to chart.
2.If we select small date range i.e 5 days . In this range showing extra space for values of Saturday & Sunday dates.
3.How to remove this extra space.
4.Check attached screen shot.
5.Check attached sample.

Please let us know how to fix this issue.


Regards,
Umesh

Iliana Dyankova
Telerik team
 answered on 26 Jan 2016
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
Licensing
ScrollView
Switch
TextArea
BulletChart
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
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?