Telerik Forums
Kendo UI for jQuery Forum
1 answer
217 views
Hello all,

I have the following below which is my detail template for my main grid.   The tab attachments has a grid in it.  I want to place an update control after the detail attachments grid.  I tried adding it in a few places but I get an error "Invalid Template" anywhere I try and place it.  Below is the code for the detail template and also below that the form I have on another view that works fine.:

<script id="template" type="text/kendo-tmpl">
@(Html.Kendo().TabStrip()
.Name("tabStrip_#=CustomerNumber#")
.SelectedIndex(0)
.Animation(animation => animation.Open(open => open.Fade(FadeDirection.In)))
.Items(items =>
{
items.Add().Text("Attachments").Content(@<text>
@(Html.Kendo().Grid<ABC.DataModel.Document.DocumentModel>()
.Name("grid_#=CustomerNumber#")
.Columns(columns =>
{
columns.Bound(p => p.DocumentType).Width(40).Title("Type").ClientTemplate("\\#=RenderImage(data)\\#");
columns.Bound(p => p.DocumentName).ClientTemplate(@Html.ActionLink("\\#=DocumentName\\#", "DownloadFile",
new { ID = "\\#=DocID\\#", fileRef = "\\#=FileRef\\#", fileName = "\\#=DocumentNameExt\\#" }).ToHtmlString());
columns.Bound(p => p.ModifiedDate).Format("{0:M/dd/yyyy h:mm tt}").Title("Modified");
columns.Bound(p => p.ModifiedBy).Title("Modified By");
columns.Bound(p => p.LatestVersion).Title("Latest Version");
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("CustomerAttachments_Read", "Customers", new { library = "Customers", folder = "#=CustomerNumber#" }))
)
.Sortable()
.ToClientTemplate())
</text>
);
})
.ToClientTemplate()
)
</script>

//I want to place this below the grid in the tab also not sure how to pass two params id and folder.  Below the sample only has id.

@(Html.Kendo().Upload()
.Name("attachments")
.Async(async => async
 .SaveUrl(@Url.Action("FileUpload"))
.AutoUpload(true)
 ).Events(e => e
.Upload(@<text>
function(e) {
e.data = { id: $("#Id").val() };
}
</text>)
)
)

Petur Subev
Telerik team
 answered on 04 Apr 2013
0 answers
226 views
Hello,

The Upload official release (Q1 2013 and earlier) is not compatible with jQuery 1.9.x

The problem is limited to asynchronous mode only. An error is thrown when the server returns an empty response. As a workaround, you can return an empty JSON object with content type set to "text/plain".

Users are urged to update to the latest hotfix version (2013.1.327+) as part of the jQuery upgrade process.

Apologies for the caused inconvenience.
Kendo UI
Top achievements
Rank 1
 asked on 04 Apr 2013
1 answer
166 views
Hi,

I'm using the mvc wrappers and getting a javascript error when clicking the create button.  I'm using jquery 1.9.1, ive tried 1.8.1 and get same error.  Here's my razor markup.  Anyone know whats going on here?  

The js error is in the image but the message is "Uncaught TypeError: Cannot read property 'Name' of undefined.

@(Html.Kendo().Grid<PosAdmin.Areas.Config.Models.ConfigProject>()
    .Name("grid")
    .Columns(c =>
    {
        c.Bound(m => m.Description);
        c.Bound(m => m.Id);
        c.Bound(m => m.Team.Name);
        c.Bound(m => m.Name);
        c.Bound(m => m.Team.Description);
        c.Command(command => { command.Edit(); command.Destroy(); }).Width(160);
    })
    .ToolBar(toolbar => toolbar.Create())
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable()
    .Sortable()
    .Scrollable()
    .HtmlAttributes(new { style = "height:430px;" })
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)
        .Model(model => model.Id(p => p.Id))
        .Create(update => update.Action("CreateProject", "ConfigEditor",new {Area="Config"}))
        .Read(read => read.Action("ProjectsRead","ConfigEditor",new {Area="Config"}))
        .Update(update => update.Action("EditingInline_Update", "Grid"))
        .Destroy(update => update.Action("EditingInline_Destroy", "Grid"))
    )
)
Petur Subev
Telerik team
 answered on 04 Apr 2013
1 answer
88 views
Can  you tell me if "Installing the Kendo UI for ASP.net MVC VS Extensions" accomplishes the same thing as "Manually adding the  Kendo UI to ASP.net MVC applications" ?

As described here...
http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/introduction

Thanks !
Sebastian
Telerik team
 answered on 04 Apr 2013
1 answer
97 views
I have JSON from which I create a chart. In JSON, I've got array of objects, each object containing several arrays of numeric values and some other properties like:

"rows": [
  {
   "handling": [8616.2759999999998, 7095.1799999999994, 6916.5359999999991],
"name": "XXX",
"weight": [13.388057013625801, 27.4987252294945, 3.9746104136942266],
"color": "#265A6A",
"data": [2872.0920000000001, 2365.0599999999999, 2305.5120000000002],
},
{ ..}
]

In createChart() function I can set to

series: data.rows

and the chart is created with "data" values from each object from "rows" array. How can I change the data source from objects "data" array to some other (e.g. "weight")?

Iliana Dyankova
Telerik team
 answered on 04 Apr 2013
4 answers
158 views
Greetings,

I'm having a couple issues with my Surface Pro and the Q1 release code.

1.  Dropdown lists are not functional via touch.  I tap the control and nothing happens.  However, they are functional when using the mouse.

The following demo page is a working example.  The "Select element" highlights when I tap it, but no options appear.  However, I see the dropdown options when using the mouse on my type cover.
http://demos.kendoui.com/mobile/forms/index.html#/

On the other hand, this site's dropdown <select> is fully functional (it works via the mouse AND via touch).
http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select

2. ListView items are not functional via touch.  Buttons work correctly but the ListView items do not cause the view to transition.

Here's a working example:
http://demos.kendoui.com/mobile/application/index.html#/

On my Surface Pro, tapping on "Play Music" does not cause the page to transition to the next view.  However, it works correctly when using the mouse.

Have you guys experienced this?  If so, what's the workaround?

Everything else I've seen with the Q1 code looks great.  Thanks.
Petyo
Telerik team
 answered on 04 Apr 2013
7 answers
1.5K+ views
This is driving me nuts. I am trying to do something that should be a no-brainer, but having loads of issues. I have two boolean fields that I want to bind to a combo box with Yes and No in it. I want to use the Kendo UI Combobox and I am doing all this in a popup template for a Kendo UI grid.In the code snippet bellow I have two selects (at the end of the template), one with the data-role="dropdownlist" set, the other without.The first select, ReceiveEmailMontlyFlyer, will select the correct value when you edit a user, but will not change the value it's supposed to be bound to. The second select, ReceiveEmailMessages, will not select the correct value or return the correct value.Please help. I must be missing something painfully simple, some rule about HTML 5 binding or Kendo that I don't know or understand.

<script id="popupEditorTemplate" type="text/x-kendo-template">
    <div class="k-edit-label">
        <label for="Username" class="required">Username</label>
    </div>
    <input type="text" class="k-input k-textbox" name="Username" data-bind="value:Username">
 
    <div class="k-edit-label">
        <label for="FirstName" class="required">First Name</label>
    </div>
    <input type="text" class="k-input k-textbox" name="FirstName" data-bind="value:FirstName">
 
    <div class="k-edit-label">
        <label for="LastName" class="required">Last Name</label>
    </div>
    <input type="text" class="k-input k-textbox" name="LastName" data-bind="value:LastName">
 
    <div class="k-edit-label">
        <label for="Email" class="required">Email</label>
    </div>
    <input type="text" class="k-input k-textbox" name="Email" data-bind="value:Email">
 
    <div class="k-edit-label">
        <label for="HomePhone">Home Phone</label>
    </div>
    <input type="text" class="k-input k-textbox" name="HomePhone" data-bind="value:HomePhone">
 
    <div class="k-edit-label">
        <label for="WorkPhone">Work Phone</label>
    </div>
    <input type="text" class="k-input k-textbox" name="WorkPhone" data-bind="value:WorkPhone">
 
    <div class="k-edit-label">
        <label for="MobilePhone">Mobile Phone</label>
    </div>
    <input type="text" class="k-input k-textbox" name="MobilePhone" data-bind="value:MobilePhone">
 
    <div class="k-edit-label">
        <label for="Line1" class="required">Address Line 1</label>
    </div>
    <input type="text" class="k-input k-textbox" name="Line1" data-bind="value:Line1">
 
    <div class="k-edit-label">
        <label for="Line2">Address Line 2</label>
    </div>
    <input type="text" class="k-input k-textbox" name="Line2" data-bind="value:Line2">
 
    <div class="k-edit-label">
        <label for="ReceiveEmailMontlyFlyer">Receive Flyer</label>
    </div>
 
    <select name="ReceiveEmailMontlyFlyer" id="ReceiveEmailMontlyFlyer" data-bind="value:ReceiveEmailMontlyFlyer">
        <option value="1">Yes</option>
        <option value="0">No</option>
    </select>
 
    <div class="k-edit-label">
        <label for="ReceiveEmailMessages">Receive other</label>
    </div>
    <select id="ReceiveEmailMessages" name="ReceiveEmailMessages" data-bind="value:ReceiveEmailMessages" data-role="dropdownlist">
        <option value="1">Yes</option>
        <option value="0">No</option>
    </select>
    <br />
</script>
Tyrel
Top achievements
Rank 1
 answered on 03 Apr 2013
1 answer
110 views
Why doesn't this work? The invalid message span is moved to be a sibling of the input element. Shouldn't it remain outside the anchor tag?

I've created a jsbin here.

Thanks,
Jon
Jon
Top achievements
Rank 1
 answered on 03 Apr 2013
2 answers
536 views
How would I attach a tooltip to each listview item?
I want to do something like the following:
<script type="text/x-kendo-tmpl" id="template">
    <div class="product">
        <img src="myimage.jpg" alt="${Name} image" id="${ModelID}" />
        <h2>${Name}</h2>
        <h3>Starting from: $${kendo.toString(parseFloat(Price), "n0")}</h3>
        <div class="edit-buttons">
            <a id="viewbtn" class="k-button k-button-icontext" href="\\#">View </a>
            <a id="tooltipbtn" class="k-button k-button-icontext" href="\\#">TOOLTIP</a>
            <p id="tooltipcontent" style="display:none">
                #for (var i=0; i<VariationsForProduct.length; i++){#
                    ${VariationsForProduct[i].Name} $${VariationsForProduct[i].StartingPrice}
                    <br />             
                # } #                  
            </p>
        </div>
    </div>
</script>
So when the user clicks on the "TOOLTIP" button, they see everything in the paragraph that is hidden below (id="tooltipcontent").

Is there an example of this somewhere? Attaching a tooltip to each item in a listview, with the tooltip content being populated from the listview item?
ZM
Top achievements
Rank 1
 answered on 03 Apr 2013
3 answers
122 views
1. How to add a customized component to the header column, such as a check box clicked to make all the check boxes in cells checked / unchecked. 

2. Is Kendo grid support the frozen feature? For example, if we have 20 columns, is it possible to make first 3 columns frozen and the other columns with a scroll bar? 

3. How to apply the permission on grid?  If we have check box in each row, is it possible to make some disabled or read only if end user has no permission?

4. Can you provide us the source code of Kendo UI, if we need customized something by ourselves? 

Thank you so much.
Iliana Dyankova
Telerik team
 answered on 03 Apr 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
Drag and Drop
Application
Map
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
DropDownTree
ListBox
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
Styling
ColorPicker
Pager
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
Licensing
PivotGridV2
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
LLM Kit
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?