Telerik Forums
Kendo UI for jQuery Forum
1 answer
378 views
Hi,

I am using the Kendo Grid with the MVC helpers, and want to make a conditional area in ClientRowTemplate.
Currently I have the following ClientRowTemplate:
.ClientRowTemplate("<tr>" +
                       "<td >" + 
                           "${ FirstName} " +
                       "</td>" +
                       "<td> " +
                           "${ LastName} " +
                       " </td>" +
                   "</tr>" +
                   "${optionalNotes(Notes)}")
and this JavaScript:    
function optionalNotes(t) {
    if (t.length > 0) {
        return "<tr><td colspan='2'>" + t + "</td></tr>";
    } else {
        return "";
    }
}
This works partially. My JavaScript is being fired, but the result is escaped before it is being added into the grid. So, instead of getting an optional tablerow with Notes, I get the html displayed.
Is there any way to indicate to Kendo to treat the JavaScript output as raw HTML in this context?
Thanks,
Ewald
Petur Subev
Telerik team
 answered on 30 Nov 2012
1 answer
184 views
How to add multiple check boxes in Kendo grid column. I am using trial version of kendo grid in SharePoint.

Please advice.
Atanas Korchev
Telerik team
 answered on 30 Nov 2012
1 answer
140 views
How do I send the object constructed using kendo.data.Model back to ASP.MVC?

For example, a person object is create using the kendo.data.Model using the code below
var Person = kendo.data.Model.define( {
    id: "personId", // the identifier of the model
    fields: {
        "name": {
            type: "string"
        },
        "age": {
            type: "number"
        }
    }
});
 
var person = new Person( {
    name: "John Doe",
    age: 42
});
My first question - How do I use a $.Ajax() to send the object back to my ASP MVC action (e.g AddPerson)?
function addPerson(person) {
    $.ajax({                   
        url: "/Person/Add/"
    });
}

My second question - How do i bind the receive model on the server side code?
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Add([DataSourceRequest] DataSourceRequest request, Person person)
{
    // Code to add person to database.
}

Petur Subev
Telerik team
 answered on 30 Nov 2012
1 answer
304 views
The PanelBar's usage of the DataSource is different than that of the DropDownList's. Is there a specific reason for this?

It would be nice to have the same API between controls for modifying data.

$('#element').data('kendoPanelBar').dataSource; // undefined
Kamen Bundev
Telerik team
 answered on 30 Nov 2012
3 answers
111 views
i have downloaded trial version of Kendo UI Grid. The filtering of the grid column is working only for the 2 to 3 columns, not for all columns (i have 7 to 8 column). Is there any restriction on the number of column can filter on the grid?

please advice.

kalpesh.
Atanas Korchev
Telerik team
 answered on 30 Nov 2012
1 answer
108 views
I am trying to get started using Kendo UI Mobile and I want to play around with the application example from the trial download but it only has the index.html file and is missing the play-music.html and music-store.html files. The online example on your web site shows displays these pages but also does not show the code from these pages. It would be nice to see these since I intend to build a multi view mobile site and seeing some actual code that works would help me get moving forward quicker. Can someone point me to where these files are?

Thanks
Kamen Bundev
Telerik team
 answered on 30 Nov 2012
4 answers
217 views
Hi:

I am trying the following approach:
@model IEnumerable<Mvc3App.Models.Employee>
@{
    ViewBag.Title = "Index";
}
<script type="text/javascript">
    $(document).ready(function () {
        alert('stopped');
        $("#kjsimpleGrid").kendoGrid({
            groupable: true,
            scrollable: true,
            sortable: true,
            pageable: true
        });
    });
</script>
<p>
    @Html.ActionLink("Add", "Create")
</p>
<table id="kjsimpleGrid">
  <thead>
    <tr>
        <th></th>
        <th>Id</th>
        <th>Last</th>
        <th>First</th>
        <th>Title</th>
        <th>City</th>
        <th>Region</th>
        <th></th>
    </tr>
  </thead>
  <tbody>
 
@foreach (var item in Model) {
    <tr>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.EmployeeID }) |
            @Html.ActionLink("Details", "Details", new { id=item.EmployeeID })
        </td>
        <td>@Html.DisplayFor(modelItem => item.EmployeeID)</td>
        <td>@Html.DisplayFor(modelItem => item.LastName)</td>
        <td>@Html.DisplayFor(modelItem => item.FirstName)</td>
        <td>@Html.DisplayFor(modelItem => item.Title)</td>
        <td>@Html.DisplayFor(modelItem => item.City)</td>
        <td>@Html.DisplayFor(modelItem => item.Region)</td>
        <td>@Html.ActionLink("Delete", "Delete", new { id=item.EmployeeID })</td>
    </tr>
}
 
  </tbody>
</table>

And I am getting the following js error:
  Microsoft JScript runtime error: Invalid template:

I would like to use as much js as possible and not depend on helper extension methods.

Phil
The error message is:
Microsoft JScript runtime error: Invalid template:'<tr data-uid="#=uid#"><td>#=#</td><td>#=Id#</td><td>#=Last#</td><td>#=First#</td><td>#=Title#</td><td>#=City#</td><td>#=Region#</td><td>#=#</td></tr>' Generated code:'var o,e=kendo.htmlEncode;with(data){o='<tr data-uid="'+(uid)+'"><td>'+()+'</td><td>'+(Id)+'</td><td>'+(Last)+'</td><td>'+(First)+'</td><td>'+(Title)+'</td><td>'+(City)+'</td><td>'+(Region)+'</td><td>'+()+'</td></tr>';}return o;'
shankar parshimoni
Top achievements
Rank 1
 answered on 30 Nov 2012
2 answers
227 views
i want to bind list of values to kendoCombobox from dataBase through webservices.here is the code
  

<select id = "CbxArea" style="width:200px">
</select>

$(document).ready(function () 
$("#CbxArea").kendoComboBox();       
var cmbArea = $("#CbxArea");        
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "FlashReportWebService.asmx/GetAreaNames",
dataType: "json",
success: function (data) {
for (i = 0; i < data.d.length; i++) {
cmbArea.append($("<option></option>").val(data.d[i].AreaName).html(data.d[i].AreaName));
}
}
});


list of values are coming successfully, but the problem is only 1st value is showing in combobox,remaining values are not displaying(i have 16 values in list)
if i write $("#CbxArea"); instead of $("#CbxArea").kendoComboBox(); total 16 values are displaying in comboBox.is there any problem in kendocombobox for binding values from .asmx page....i must display values in kendoComboBox only...please help..
thanks,
parsanamoni.

shankar parshimoni
Top achievements
Rank 1
 answered on 30 Nov 2012
3 answers
206 views
Hi,

I have read almost all examples of Kendo Grid hierarchy and tried everything but it does not seem to work for me. I am not doing anything extra at all. Please see the demo project here http://www.mediafire.com/?5qjyp40qfef7dkb

I always get 'Uncaught Error: Invalid template:'' error.

You will need Kendo.Mvc.dll file to run this project. You could see the error once you un-comment this line //.ClientDetailTemplateId("employeesTemplate")

Thanks!
Eric
Top achievements
Rank 1
 answered on 29 Nov 2012
1 answer
215 views
Hi there,

Are there currently any plans to introduce a native looking dialog box?

Many thanks
Brandon
Top achievements
Rank 2
 answered on 29 Nov 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?