Telerik Forums
Kendo UI for jQuery Forum
0 answers
397 views
When using editor templates by name like:

columns.Bound(x => x.Name).EditorTemplateName("String").Width(300);

Causes this to be rendered:

{"title":"Name","width":"300px","field":"Name","encoded":true,"editor":"%3cinput class=\"text-box single-line\" data-val=\"true\" data-val-required=\"Please provide a setting name.\" id=\"Name\" name=\"Name\" type=\"text\" value=\"\" /%3e%3cspan class=\"field-validation-valid\" data-valmsg-for=\"Name\" data-valmsg-replace=\"true\"%3e%3c/span%3e"}

Which then causes the grid, when inline editing to show the html encoded rather than endering the actual html it represents. I see an "encoded:true" but it doesn't seem to be treating the editor as encoded.

Thanks in advance.

EDIT: I blogged a workaround.

http://pknopf.com/blog/kendo-ui-editor-templates-for-asp-net 
Paul
Top achievements
Rank 1
 asked on 08 Sep 2012
1 answer
232 views
I am wondering if there is any sample code / API that can process the output after calling HtmlHelper.Partial(...).  In many cases, we use the same partial view to render the repeating items and also the template for when the user adds new items at the client.  The '#' character is the trouble.  In many cases a # character is used in an <a href='#'...  or else where which is not part of the template. Recently, I just used the following code to get around the href='#' issue,

var template = html.Partial(...);
string str = template.ToHtmlString();

str = str.Replace("href=\"#\"", "href=\"\\\\#\"");
str = str.Replace("href='#'", "href='\\\\#'");

return new MvcHtmlString(str);

it would be great if someone had a regex or a helper function that could escape all the non-template '#' characters.  I would really be unfortunate if I have to duplicate all my partial views just make them template safe.

Phil
Top achievements
Rank 1
 answered on 08 Sep 2012
5 answers
202 views
i am using kendo listview in which i am specifying url as below

$("#btnShowRestaurant").click(function () {
                alert('hiii');


                var dataSource = new kendo.data.DataSource({
                    transport: {
                        read: {
                            url: "Restaurant.aspx/GetHotelData",
                            dataType: "jsonp"
                        }
                    },
                    pageSize: 12
                });

Is it they right way? because the webmethod in codebedhind is unreachable... any body having similar issue..any other option..

thanks in advance
             
             
Kushal
Top achievements
Rank 1
 answered on 08 Sep 2012
0 answers
105 views
I have four Kendo windows in my web page.
I am loading four windows during run time using JQuery.
Same time i need to indicate drag able area for the four windows.  
As per our requirement, the windows should drag limited area in web page and window docking system.
Please instruct me, there is any way to do this?

Prakash
Top achievements
Rank 1
 asked on 08 Sep 2012
3 answers
475 views

I'm having trouble binding data from a Web API Controller to a Grid. Unfortunately I haven't been able to find any examples of this.

Here's the API Controller:

public class FruitController : ApiController
{
    public class Fruit
    {
        public string Name { get; set; }
        public string Color { get; set; }
    }
 
    public IEnumerable<Fruit> GetFruits()
    {
        List<Fruit> list = new List<Fruit>();
 
        Fruit f = new Fruit();
        f.Name = "Apple";
        f.Color = "Red";
 
        list.Add(f);
 
        f = new Fruit();
        f.Name = "Kiwi";
        f.Color = "Green";
 
        list.Add(f);
 
        return list;
    }
}


And in my .cshtml file I have:

@model IEnumerable<FruitController.Fruit>
 
    @(Html.Kendo().Grid(Model)   
        .Name("Grid")
        .Columns(columns =>
        {
            columns.Bound(p => p.Name);
            columns.Bound(p => p.Color);
        })
        .Groupable()
        .Pageable()
        .Sortable()
        .Scrollable()
        .Filterable()
        .DataSource(dataSource => dataSource
            .Ajax()
            .Read(read => read.Action("GetFruits", "api/Fruit").Type(HttpVerbs.Get)
 
            )
        )
    )



When I run this, I get a successful JSON response from the controller (seen via Chrome):

[{"Name":"Apple","Color":"Red"},{"Name":"Kiwi","Color":"Green"}]

But the grid has no data in it. Is there something obvious I am missing? I haven't been able to figure this out!

Thanks!

Tyler
Top achievements
Rank 1
 answered on 07 Sep 2012
1 answer
269 views
Dear Developers,

there is a bug in _validate method of the Editable widget. There is a line in the code (ln. 30578, kendo.web.js v2012.2.710) which tries to retrieve the input element:

input = $(':input[' + kendo.attr("bind") + '="' + (isBoolean ? 'checked:' : 'value:') + e.field + '"]', that.element);

If the field's name starts with 'first' or 'last' (e.g. first_name) the computed selector will be:

':input[data-bind="value:first_name"]'

In that case jQuery 1.8.0 can not find the element because the css parser throws an exception:

Uncaught Error: Syntax error, unrecognized expression: :input[data-bind="value

Obviously with jQuery 1.7.1 there is no exception.
This may be unconfortable in the future.
Alex Gyoshev
Telerik team
 answered on 07 Sep 2012
0 answers
107 views
Are there any examples out there of using Kendo and MVC extensions together on the same page or even within the same project?
carlg
Top achievements
Rank 1
 asked on 07 Sep 2012
3 answers
138 views
Hi,

I am trying to include inside one panel of the panel bar a template that is formed out of a couple linear gauges and some icons. The template works very well individually and also the panel bar works good by it's one. 

Though, when I want to put the linear gauges inside the panel bar, and add a link to kendo.dataviz.min.js it displays everything fine, the linear gauge have their correct animations, but the panel bar expending and collapsing of an item stops working. It is just an instant transition between panels. 

Is this a known issue, and if yes, how can I fix it?

Thank you and have a nice day,
Nohinn
Top achievements
Rank 1
 answered on 07 Sep 2012
2 answers
183 views
This might be an odd question, but I am using the datasource object to get data from the server for my grid, but there is additional information I want to display elsewhere.  Right now I get the list of results, the total count, and a count of customers contacted.  I want to display this number in a span for the user to work with, but I don't know where this information is stored or even if it is stored when the datasource completed event is fired.  Any help would be appreciated
William
Top achievements
Rank 1
 answered on 07 Sep 2012
0 answers
131 views
Is there a way to have the grid show or display a message saying there are no results vs crashing the page? I don't think its uncommon to do a search and not return any records, unless I overlooked something. I'm using fluent syntax. Thanks
Kai
Top achievements
Rank 1
 asked on 07 Sep 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
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?