Telerik Forums
Kendo UI for jQuery Forum
4 answers
941 views
I'm using a custom read function to create a datasource for a combobox:

function createDataSource(id, system) {
        
        return new kendo.data.DataSource({
serverFiltering: true,
transport: {
read: function (operation) {
var url = "/api/Navigator/" + system + "/";
                    
                    $.getJSON(url, { Criteria0: combobox.text() }, function (json) {
operation.success(json);
});
                   

                },
parameterMap: function (options, operation) {
if (operation !== "read" && options.models) {
return kendo.stringify(options.models);
}
}
},
schema: { data: "Nav" }
})
}

Where "Nav" is the table pulled across from the API call. The fields I'm interested in are GUID and Display. The API is used several other places with those field names so I'd prefer keeping them as they are and I don't necessarily want to duplicate code and have a separate API call or pass the field names to the db to rename them before the data is returned. Is there a way in the datasource (perhaps using a specified model) to rename the GUID and Display columns to something like "PersonGUID" and "Person" if those parameters are passed in the function call?

Thanks for your help.
Bryan
Rosen
Telerik team
 answered on 13 Nov 2014
3 answers
1.6K+ views
Hello,

As you can see, I've made several attempts to create a Command column that routes a certain way (to /orderdetails?orderid=xxx).  The first 2 columns do create an ActionLink, but I'm looking for a button.  So on the 3rd non-commented column, it does work, but it uses "CartObject.CartSubObject.Property" (which it is getting from the Model, I assume) as the parameter in the Querystring.  How can I change this to a pre-defined property like "orderId"?

This is for an ASP.NET MVC 4 application using .NET 4.5.1.

[code]
Html.Kendo().Grid(Model.Orders)
    .Columns(columns =>
    {
        columns.Template(c => @Html.ActionLink("View", "orderdetails", new { orderId = c.CartId }))
            //.HtmlAttributes(new { @class = "k-button", @style = "white" })
            .Title("View")
            .Width(90);
        //columns.Command(c => @Html.ActionLink("account", "orderdetails", new { orderId = c..CartId })).Title("View").Width(90);
        columns.Bound(m => m.CartId).Template(c => Html.ActionLink("View", "orderdetails", new { id = c.CartId })).Title("Actions")
            .ClientTemplate(Html.ActionLink("View", "orderdetails", new { orderId = "id" }).ToHtmlString().Replace("id", "#=CartId#")).Title("Actions");
        columns.Command(com => com.Custom("View").Action("orderdetails", "account")).Title("Actions").Width(90);
        //columns.Command(com => com.Custom("View").Action("orderdetails", "account", new { orderId = "id" })).Title("Actions").Width(90);
        //columns.Bound(o => o.CartId).ClientTemplate(@Html.ActionLink("orderdetails", "account", new { orderId = "#=CartId#" }).ToHtmlString());
        //columns.Command(command => command.Custom("View")
        //    .Click("showDetails"))
        //    .Title("Actions").Width(90);
        columns.Bound(c => c.CartId)
           .ClientTemplate
              (@Html.ActionLink
                  ("<span class='k-icon k-edit'></span>View",
                   "orderdetails",
                   new { id = "#=CartId#" },
                   new { @class = "k-button k-button-icontext" }).ToHtmlString());
    })
    .HtmlAttributes(new { style = "max-width: 750px" })
    .DataSource(dataSource => dataSource
        .Server()
        .Model(model => model.Id(o => o.Cart.CartHead.CartID))
        .Sort(s => s.Add(a => a.Cart.CartHead.DateSubmitted).Descending())
        .PageSize(25)
    )
    .Sortable()
    .Name("OrderHistoryGrid")
    .Pageable(pageable => pageable
        .Enabled(Model.Orders.Any())
        .Numeric(true)
        .PreviousNext(true)
        .Refresh(true)
        .PageSizes(new int[] { 25, 50, 100 })
        .ButtonCount(10)
        .Messages(m => m.Empty("There are currently no orders affiliated with this account"))
    )
    .Render();
[/code]
Dimo
Telerik team
 answered on 13 Nov 2014
1 answer
144 views
Hi I am looking into the demo where the Gauge is with a slide Bar inside it. 

http://dojo.telerik.com/oDoqE

How can I have a circle filled with a specific colour instead of that slidebar
Is that something achievable?
Dimiter Madjarov
Telerik team
 answered on 13 Nov 2014
1 answer
132 views
Hi Everyone,

How can I provide " Id " property to ToolBar control which is constructed using Template 
Code from sample application:

 items.Add().Template("<label>Format:</label>");
 items.Add().Template("<input id='dropdown' style='width: 150px;' />").Overflow(ShowInOverflowPopup.Never);

Regards,
Rajendar.
Atanas Georgiev
Telerik team
 answered on 13 Nov 2014
1 answer
149 views
Hi Everyone,

I am checking test-ability of Kendo UI application with CUIT (Coded UI of Microsoft). Whenever I record action on tree item it is recorded with InnerText.

In the attached image you can find that there are two two tree items at different level with same name "logo.png". Now only way that I can differentiate these two items is "TagInstance" which is not reliable.

To make it working consistently I can add "id" property to each tree item. If it is a simple tree view I can directly add with ".HtmlAttributes(new {id = "staticNotification" })" code.

Please let us know how to give ids for each tree item in case of Data Binding. (Local binding, remote binding)

Is there any documentation to provide ids for tree item for each type of tree.

Thanks,
Rajendar
Atanas Georgiev
Telerik team
 answered on 13 Nov 2014
1 answer
89 views
Hi Everyone,

I am checking test-ability of Kendo UI application with CUIT (Coded UI of Microsoft). Even we provided Id and Name properties to DropDown Kendo UI control but in CUIT name and Id properties are empty.

Regards,
Rajendar
Atanas Georgiev
Telerik team
 answered on 13 Nov 2014
1 answer
79 views
Hi Everyone,

I am checking test-ability of Kendo UI application with CUIT (Coded UI of Microsoft). There is no unique porperties to Left, Right, Date button in Scheduler Kendo UI control

Please see image for controls
Atanas Georgiev
Telerik team
 answered on 13 Nov 2014
1 answer
89 views
Hi Everyone,

I am checking test-ability of Kendo UI application with CUIT (Coded UI of Microsoft). Whenever I added Id property to upload control. It is reflecting in CUIT assertion form

Source code from sample application:
*************************************************************
 <%= Html.Kendo().Upload()
                .HtmlAttributes(new {id = "files" })
                .Name("files")

            %>
**************************************************************
Regards,
Rajendar
Atanas Georgiev
Telerik team
 answered on 13 Nov 2014
1 answer
68 views
Hi Everyone,

I am checking test-ability of Kendo UI application with CUIT (Coded UI of Microsoft). Whenever I added Id property, CUIT is considering Id property

Source code for sample application:
**********************************
  <%= Html.Kendo().Slider()
                .Name("eqSlider1")
                .HtmlAttributes(new {id = "files" })
                .Orientation(SliderOrientation.Vertical)
                .Min(-20)
                .Max(20)
                .SmallStep(1)
                .LargeStep(20)
                .ShowButtons(false)
                .Value(10)
                .HtmlAttributes(new { @class = "eqSlider" })
        %>
**********************************
Regards,
Rajendar.
Atanas Georgiev
Telerik team
 answered on 13 Nov 2014
1 answer
75 views
Hi Everyone,

I am checking test-ability of Kendo UI application with CUIT (Coded UI of Microsoft). Even we provided Id and Name properties to Notification Kendo UI control but in CUIT name and Id properties are empty. Please see attached image  

====== Source code ====================
<%= Html.Kendo().Notification()
.HtmlAttributes(new { @id = "staticNotification" })
    .Name("staticNotification")
    .AppendTo("#appendto")       

%>
========================

Regards,
Rajendar.
Atanas Georgiev
Telerik team
 answered on 13 Nov 2014
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?