Telerik Forums
Kendo UI for jQuery Forum
3 answers
245 views
Hi all I just want to use ClientTemplate option and I can't get it working:

As you can see:

columns.Bound(p => p.BookId).Width(50).ClientTemplate("Some HTML code");

Insead of this lane I should have "Some HTML code" but I have ID's
@model List<Biblioteka.ViewModels.BookViewModel>
 
@{
    ViewBag.Title = "Index";
}
 
<h2>Index</h2>
 
 
 
@(Html.Kendo().Grid<Biblioteka.ViewModels.BookViewModel>()
    .Name("BooksKendoGrid")
    .Columns(columns =>
    {
        columns.Bound(p => p.Title);
        columns.Bound(p => p.Author);
        columns.Bound(p => p.BookGenreId);
        columns.Bound(p => p.ReleaseDate);
        columns.Bound(p => p.ISBN);
        columns.Bound(p => p.Count);
        columns.Bound(p => p.RealBookCount);
        columns.Bound(p => p.AddDate);
        columns.Bound(p => p.ModifiedDate);
        columns.Bound(p => p.BookId).Width(50).ClientTemplate("Some HTML code");
        //columns.Command(command => { command.Edit(); }).Width(200);
    })
    //.ToolBar(toolbar => toolbar.Create())
     
    // PopUp editing Mode
            .Editable(editable => editable.TemplateName("BooksEditor").Mode(GridEditMode.PopUp))
    .Pageable()
    .Sortable()
    .Scrollable()
    .Filterable()   
    .DataSource(dataSource => dataSource
         
                .Ajax()
                .ServerOperation(false)
                .Model(model =>
                {
                    //The unique identifier (primary key) of the model is the ProductID property
                    model.Id(p => p.BookId);
                })
                 
                   // .Create(create => create.Action("Create", "Books"))
                    .Read(read => read.Action("BooksKendoGridRead", "Books").Type(HttpVerbs.Post)
     )
 
    ).BindTo(Model) 
)
AWL
Top achievements
Rank 1
 answered on 13 Dec 2012
3 answers
97 views
Hi guys,

Im currently getting the following errors when a hit the next button on pager:
SCRIPT87: Invalid argument.
kendo.web.min.js, line 10 character 223280
and the following when I hit one tab of 6 that I have on that page
SCRIPT5007: Unable to get value of the property 'replace': object is null or undefined
kendo.web.min.js, line 10 character 5001
What could be wrong?

Any Ideas?

Thanks in advance...

Camilo Vergara M.




Nikolay Rusev
Telerik team
 answered on 13 Dec 2012
3 answers
132 views
Please see my code here: 
http://jsfiddle.net/RzfHu/2/

I would like this custom widget do like this:
<input type="text" data-role="colorpicker" data-bind="value:BGColor"  />
But it failed saying: Uncaught TypeError: Object [object Object] has no method 'value'
So how do I add binding to this custom widget "colorpicker"?
Georgi Krustev
Telerik team
 answered on 13 Dec 2012
3 answers
1.2K+ views
Hi All,

How to change “items per page” to "Items per page" in List view pager?

Regards,
Partha.
Iliana Dyankova
Telerik team
 answered on 13 Dec 2012
1 answer
127 views
Hello,
I try to filter my datagrid like this :

The same filter must be used for 2 properties. But an error is raised when I use the Or method, if I remove the Or, it works but it is not what I want to do because, without the Or method, the composant do an And between the two filters.

.
.
.
                    .Filter(f =>
                        {
                            if(!string.IsNullOrEmpty(Model.FilterByVendor))
                            {
                                f.Add(a => a.Name).Contains(Model.FilterByVendor).Or();
                                f.Add(a => a.VendorNumber).Contains(Model.FilterByVendor).Or();
                            }
                        })
                    .Read(read => read.Action("GetAllVendors", "Vendor"))
                    .PageSize(20)

            )
            .Filterable()
)

Daniel
Telerik team
 answered on 13 Dec 2012
3 answers
168 views
In iOS when a textarea is focussed and then the view scrolled down the cursor floats over the text area until a new input is selected. Is there a way to keep the cursor in place when the view scrolls?

Also is there a workaround to allow a multi-line textarea?
Dimo
Telerik team
 answered on 13 Dec 2012
1 answer
76 views
Is there Drill down feature in the graphs and also want to export the graph to images and to PDF?
Sebastian
Telerik team
 answered on 13 Dec 2012
2 answers
207 views
We have a listview which is populated every 5 seconds with data from a database using AJAX. Normally everything works correctly, including scrolling. However if the user has their finger on the screen (listview) when we set the data source then for some reason scrolling no longer works even though the content of the listview is updated.

This only seems to be a problem with iOS.

Once the AJAX has completed we use the following code to set the data source.
$("#listView").data("kendoMobileListView").dataSource.data(data.Data);

Any thoughts on what might cause this?
David
Top achievements
Rank 1
 answered on 13 Dec 2012
1 answer
551 views

I have a Kendo UI Chart where I am displaying 3 series of data, on 3 different value axis.

The "Ad Position" value axis is inverted, with 1 being highest possible value (As per image). Chart with inverted Y Axis

As you can see, this results in the "Ad Position" series rendering "top down".

Does anyone know of a way to force this series to render "bottom up", e.g. for the bar to start rendering from the lowest value (4.5).

Javascript:

var categories = Array();
var series1 = Array();
var series2 = Array();
var series3 = Array();

// data is populated by parsing a html table
// $chart is passed in as a variable
$chart.kendoChart({                
    theme: "bootstrap",                
    title: {
        text: "Hour of Day Avg. Position"
    },
    legend: {
        position: "bottom"
    },
    seriesDefaults: {
        type: "line",                    
    },
    series: [{
        data: series1,
        name: "Avg. Ctr",
        tooltip: {
            visible: true,
            template: "#= category #: #= value #%"                        
        },
        axis: "ctr"
    },
    {
        type: "bar",
        data: series2,
        name: "Avg. Position",
        tooltip: {
            visible: true,
            template: "#= category #: #= value # Avg. Pos."
        },
        axis: "adPos"
    },
    {
        data: series3,
        name: "Clicks",
        tooltip:
        {
            visible: true,
            template: "#= category #: #= value # Clicks"
        },
        axis: "clicks"
    }],
    valueAxes: [
    {
        title: { text: "Click Through Rate" },
        name: "ctr",
        labels: {
            visible: true,
            format: "{0}%"
        }
    },
    {
        title: {text: "Clicks per Hour"},
        name: "clicks",
        labels: {
            visible: true,
            format: "{0}"
        }
    },
    {
        title: { text: "Ad Position" },
        name: "adPos",                    
        labels: {
            visible: true,
            format: "{0}"
        },
        min: 1,
        reverse: true
    }],
    categoryAxis: {
        categories: categories,
        labels: {
            rotation: 45
        },
        title: {
            text: "Hour of Day (24Hr)"
        },
        reverse: false,
        axisCrossingValues: [0,30]
    }
    });

Thank you for your help.

Iliana Dyankova
Telerik team
 answered on 13 Dec 2012
1 answer
96 views
The data source for my combo box contains 3 fields - the  usual text and value, along with an additional one - detail.
Using the combobox template property like so:
   template: '${data.detail}'
I am able to display the  enhanced item detail info info in the drop down menu, while displaying just the short text in the input field normally.   That's good, but the filter only applies to the field specified by dataTextField.

With minor changes to the combobox code, I am able to support this by providing a new config option  dataSearchField (which I set to "detail") and then doing
field = options.dataSearchField || options.dataTextField
in the search and _filterSource functions of combobox.

And that kind of works for me.   Better version would be to allow the dataSearchField to be a function or a field name.  But that would require much deeper changes.

My question is - can/will this ability be added by kendo if requested, and what is the best way to submit such an enhancement request?

Or, is there already some other way to achieve this functionality?
Georgi Krustev
Telerik team
 answered on 13 Dec 2012
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?