Telerik Forums
Kendo UI for jQuery Forum
11 answers
1.1K+ views
Hi ,

I am loving this site ever since I had stumbled upon it while googling . Awesome job , I must say.

But , I am facing some problem regarding datasource, In most of the examples , it has been used as JSON or XML database.

Can I connect without using XML or JSON ?



Keep up the good work.

Thank you.

PRAVEEN KUMAR
Top achievements
Rank 1
 answered on 07 Nov 2013
2 answers
469 views
Hi,


I am creating a Kendo Mobile SPA, but would like to separate the views into their own html files because there will be more than a few views.  So I am using remote views.


With remote views, it looks like that in order for the <a> tag to work you need to supply it with a Kendo Mobile data-role either a button, tab strip or list.  Examples:


<ul data-role="listview" data-style="inset" data-type="group">
            <li>Sources
                <ul>
                    <li><a href="#secondview">Local View</a></li>
                    <li><a href="remoteview.html">Remote View</a></li>
                </ul>
            </li>
        </ul>


Or


 <a href="remoteview.html" data-role="button">Remote View</a>




Just using a regular link to a remote view like this will not work (Without the data-role, Kendo Mobile doesn't know to handle this as an ajax call to a remote view and just loads the html like it's a whole new page):


<a href="remoteview.html">Remote View</a>




I have images in my app that are touchable and will navigate to other views, so my idea to achieve the SPA with remote views is to use data-role of button and try to set the button background image to the image like this:


<a href="remoteview.html" data-role="button" style="background-color: white; color: black;"><img width="50%" src="images/Button.png" alt="image"><br/>Remote View</a>




Which doesn't work totally.  The first time the button is displayed the image is really small—this navigates correctly to the remote view, however you have to navigate and then go back to see the button have the correct size.  


Anyway, is there a better way to set a background image with the Kendo Mobile button?


Thanks,
Derrick
Derrick
Top achievements
Rank 1
 answered on 06 Nov 2013
7 answers
1.0K+ views
Has anyone ever experienced the following error:

'uid' is undefined
kendo.all.min.js, line 8 character 217810


I get this when browsing the site with IE8 and the latest FireFox.  Everything works fine when using Chrome.

I'm using jquery.iecors for IE8 support and have set the Access-Control-Allow-Origin header to * on the Web API site that serves up the JSON data.  The Web API JSON call is successful and is returning valid JSON data for all browsers.

I'm not too sure where to go from here, any suggestions are welcome.
Zachary
Top achievements
Rank 1
 answered on 06 Nov 2013
2 answers
1.3K+ views
Hi,

I am using Selenium automation testing in one of my view with kendo ui editor.

I couldn't pass values to the editor control from my test. Please give information how to do this.

View
====
 @(Html.Kendo().EditorFor(m => Model.reportDetail.Content) 
                    .Name("Content")
                    .HtmlAttributes(new { style = "width: 810px;height:500px" })
                    .Tools(tools => tools
                        .Clear()
                        .Bold()
                        .Italic()
                        .Underline()
                        .Strikethrough()
                        .FontName()
                        .FontSize()
                        .FormatBlock()
                        .FontColor()
                        .BackColor()
                        .InsertOrderedList()
                        .InsertUnorderedList()
                        .CreateLink()
                        ))

Test
====

[TestMethod]
public void TestName()
{
// code goes here..
var kendoEditor = webDriver.FindElement(By.Name("Content"));
// assert code goes here..
}

I need to set value as "Test" in the editor.

I couldn't assign value as other controls
Ex:- @Html.DropDownListFor

var yearInputControl = new SelectElement(webDriver.FindElement(By.Name("dateComponent.Year")));
yearInputControl.SelectByValue("2013");

Thanks in advance,
PK
leblanc
Top achievements
Rank 1
 answered on 06 Nov 2013
3 answers
1.9K+ views
I have a kendo grid that let's user add the rows manully. Once users are done adding rows, There is a button that uses Ajax post to post data to controller action.

How can I pass the data from grid as Enumerable of model to the action

 @(Html.Kendo().Grid(Of PEERS.ECFPropertyModel).Name("ECFProperty").      Columns(Sub(cols)                      cols.Bound(Function(it) it.PropertyID).ClientTemplate("<input type='checkbox' onClick='gridECFProperty_selectOnClick(this);' id='SelectProperty' value='#=PropertyID#'>#=PropertyID#</input>")                      cols.Bound(Function(it) it.PropertyName)                      cols.Bound(Function(it) it.CostSaving)                      cols.Bound(Function(it) it.ImplementationCost)                      cols.Bound(Function(it) it.TargetCompletionDate)                      cols.Bound(Function(it) it.ActualCompletionDate)                                End Sub ).Pageable().Scrollable().Sortable().Selectable().DataSource(Sub(d) d.Ajax().ServerOperation(True).Batch(True).                                                     Model(Sub(m) m.Id(Function(p) p.PropertyID)).PageSize(10).                                                     Read(Function(r) r.Action("ECFPropertyList""ECFProperty", Request.RequestContext.RouteData.Values)).                                                     Update(Function(u) u.Action("SaveECFProperty1""ECFProperty", Request.RequestContext.RouteData.Values))       ))

<div> <input type="submit" id="submit" onclick="SaveECF();"  value="Save ECF Property" /> </div>


function SaveECF() {                           $.ajax({          url: '@Url.Action("SaveECFProperty""ECFProperty", Request.RequestContext.RouteData.Values)',          type: 'POST',          traditional: true,          datatype: "json",           data: {               PropertyList: $("#ECFProperty").data("kendoGrid").dataSource.view().toJSON),             currency:'USD'          },          success: function () { window.alert('saved'); }         });  }
Navin
Top achievements
Rank 1
 answered on 06 Nov 2013
4 answers
1.2K+ views
Hello, 

I have a page that looks like the one attached. The textbox here looks very small compared to the rest of the page, is there an easy way to make this look a bit better. I mean by making the textbox bigger and the font inside also, thanks
Craig
Top achievements
Rank 1
 answered on 06 Nov 2013
2 answers
531 views
I was wondering if the following is possible?
I have a custom command button in my grid:

columns.Command(command =>
        {
            command.Custom("options").Text("...").Click("showMenu");
        });

This opens a small menu next to the button that contains a few options.

I am wondering if it is possible to have the edit button on this menu?

I can get the row data like so:
var grid = $("#grid").data("kendoGrid");
var dataItem = grid.dataItem($(e.currentTarget).closest("tr"));

How do I then call the edit popup for the row?

Thanks
Elliott
Top achievements
Rank 1
 answered on 06 Nov 2013
1 answer
109 views
I have an action sheet that pops up over the top of view that has a button at the bottom. (The button is a photo capture button that files the Camera API)

Problem: The CANCEL click propagates down through the ActionSheet and fires the button underneath.

How do I stop this when:
1) There is no event fired for CLOSE (while there is one for OPEN)

Suggestions are welcome and thanks ahead of time.
Kiril Nikolov
Telerik team
 answered on 06 Nov 2013
4 answers
327 views
Hello,

I'm trying to render a Button (HtmlId: btnValidateState2)  and a ButtonGroup in a template.
But the first one appears like a simple text (and its click event isn't fired) and the second one appears like a simple html list "ul".
The considered parts of my code:

<!DOCTYPE html>
<html>
    <head>
        <title>Test</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
        <meta charset="utf-8" />
        <!-- ********** JS ********** -->
        <script src="js/cordova-2.0.0.js" type="text/javascript" charset="utf-8"></script>
        <script src="js/jquery.min.js"></script>
        <script src="js/kendo.mobile.min.js"></script>
        <!-- ********** CSS ********** -->
        <link rel="stylesheet" href="styles/kendo.mobile.all.min.css" type="text/css" />
    </head>
<body>
<div data-role="view" id="stateView" data-init="ViewInit">
    <div id="form" >
                <header data-role="header">
                    <div data-role="navbar">
                        <span data-role="view-title"></span>
                    </div>
                </header>
            <ul data-role="listview" data-style="inset" data-type="group" id="stateListView"></ul>
                <a data-role="button" id="btnValidateState">Validate</a><br/>
          </div>
</div>
 
<script type="text/x-kendo-template" id="stateTemplate">
            <li><h3>${stateName}</h3></li>
            <li><p>${stateDescription}</p></li>
            <li>
      <!-- not working! :( -->
                <ul id="select-period" data-index="0">
                    <li>Month</li>
                    <li>Quarter</li>
                    <li>Year</li>
                </ul>
            </li>
            <li>
                # if (transitionArray != null && transitionArray.length > 1) { #
                    Response
                    <select id="dropdownChoice">
                        # for (var i=0; i < transitionArray.length; i++) { #
                            <option id="${transitionArray[i].transitionId}" value="${transitionArray[i].transitionExpression}">${transitionArray[i].transitionExpression}</option>
                        # } #
                    </select>
                # } #
            </li>
            <li>
                <label for="txtComments">Comments</label><br/>
                <textarea id="txtComments" rows="4" cols="45" name="txtComments" maxlength="200" class="k-textbox"/>
            </li>
            <li>
      <!-- not working! :( -->
                <a data-role="button" id="btnValidateState2">Validate</a>
            </li>
</script>
 
<script>
            function ViewInit() {
                $("#select-period").kendoMobileButtonGroup();
            }
</script>
 
 
</body>
</html>

I don't see where I'm wrong.
My other controls appear like desired, as the button "btnValidateState"...
And when I place the code of the ButtonGroup up between the end-tag "</header>" and the "ul" tag "stateListView", it appears also great. 

I've attached a PNG screenshot of my view.

Thanks a lot for some help!
Petyo
Telerik team
 answered on 06 Nov 2013
6 answers
149 views
I have Kendo Grid using Heirarcy as image shows below. I double checked my CSS declarations and I couldn't find any selector of which could affect my grid styles. Why my grid row text color is black and text size is that big? I made some comparison between your grid demos and my grid and look & feel is different.
Browser developer tools shows me computed styles and there is black color for grid text. Where is that coming from?
ICT
Top achievements
Rank 1
 answered on 06 Nov 2013
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?