Telerik Forums
Kendo UI for jQuery Forum
1 answer
596 views
Hello,
I am new to using kendo ui grid. I have a requirement where I want to display data in the grid using kendo ui grid.

I have added a div and using kendo ui grid I am able to display the data in the grid.

All the data is dynamic. All the columns are created at runtime/dynamically.
What I want is to have a first column in the grid which will display an image with click event to it.

Also at the same time after the image column there will be ID column that I want to hide. I want to bind it to grid and hide it as I will require that particular columns value on row click event.

So, I want the first column in the grid to be displaying a image/icon and want to hide the second (next column after the image column).

Please help me on this.
Dimo
Telerik team
 answered on 16 May 2013
1 answer
83 views
I have a column chart with series values of 0, 1,2,3,4.
Rather than display the numbers, I would like to decode the numbers to a string value, e.g.  instead of 1 as a label display something like 'low', instead of 2 display 'medium' etc.  I have tried to get this to work with templates but have been unsuccessful.

something like

    series: [{
                        type: "column",
                        aggregate: "avg",
                        field: 'value',
                        labels: {
                            template: "#if(value == 4) { # ${'exceed'} # } else { # ${value} #} #"
 
                    }
                    }],

 The chart ignores the template and just displays the numbers 1,2 etc.
Is it possible to do what I want to do.
Iliana Dyankova
Telerik team
 answered on 16 May 2013
2 answers
442 views
I've got a complex form, which requires a pop-up edit window. There are several hierarchical tables that also require editing. I hoped to do this with sub-grids, embedded in the editor template of the main grid.

However, I have encountered two issues.
  • Passing the main ID to the read action of the sub grid - using the Model.ID doesn't work - it is just zero.
@(Html.Kendo().Grid<CDIFFAudit.Models.AntibioticHistory>()
 .Name("ahGrid")
 .Events(e=>e.Edit("onEditah"))
 .Columns(columns =>
     {
         columns.Bound(p => p.ID).Title("ID");
         columns.Bound(p => p.AntibioticID).Title("ID");
         columns.Bound(p => p.StartDate).Title("Start").Format("{0:d}"); ;
         columns.Bound(p => p.Appropriate).Title("Appropriate?");
         columns.Command(command => { command.Edit(); });
     })
      .ToolBar(commands=>commands.Create())
.Editable(editable=>editable
     .Mode(GridEditMode.PopUp))
     .DataSource(datasource => datasource
         .Ajax()
         .Model(m=>m.Id(p=>p.ID))
         .PageSize(10)
         .Read(read => read.Action("GetAntibioticHistory", "CDIff", new { CDiffID =  Model.ID }))
         .Create(create=>create.Action("insertAntibioticHistory","CDIff"))
         .Update(update=>update.Action("updateAntibioticHistory","CDiff"))
         
         )
 
         .Pageable()
         .Sortable()
         .Filterable()
         )

 

The only answer I can fin about this is this post (http://stackoverflow.com/questions/13384901/grid-into-grid-popup-editor-passing-id-parameter-in-sub-grid ) on StackOverflow , which seems like a complete bodge, and one I don't want, as I'll have at least four grids on this edit form (if it can be made to work).

  • Editing the sub-grids data in a pop-up form doesn't work.  When I hard-coded a real ID into the read method, the grid displayed data, but the pop-up form just displayed a 0  (screen shot attached).

I need to know whether kendo can support a complex editing scenario such as this, otherwise I'll have to take another route to achieve what's needed.



AP
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 16 May 2013
1 answer
95 views
hey all 
im trying to apply a background image to a chart and cant make it happen
i have it running both inline and in css

any thoughts?

heres the link:
www.the-agora.com


thanks!
Iliana Dyankova
Telerik team
 answered on 16 May 2013
3 answers
263 views
I have a mobile app built with icenium and using kendo ui for the styling.  I have noticed on android that touch events seem to behave strangely, I am linking 2 videos to demonstrate the problem in case my description here is not sufficient.

When an action sheet on android has an action that is located above a control with a click handler, the click event is fired.  In this video I show this happening, first I touch a phone link to show that it launches the dialer, then I log into the application and open the 'options' action sheet.  When I touch the 'logout' option the app navigates back to the login page which contains the phone link and because the 'logout' action is over the phone link the phone link gets touched and the dialer launches.

The second video shows another issue where touching a link will trigger the touch event of a control on the page that is linked.  I first touch a link to another page in my app on the left side of the screen, there everything seems to work normally.  After that I touch the link again but on the right side when the page navigates it activates the text field on the form of the second page as if it had recieved the touch action.

Is there a work around to fix this behavior?  It works fine on iOS devices I have only noticed it on android ones.
Petyo
Telerik team
 answered on 16 May 2013
10 answers
364 views
Creating a kendo grid from remote data source which is a odata wcf data service.
clicking on data service url shows the data in browser. however not showing the data in kendo grid.

Please check the code below and point me what am I missing here..

$(document).ready(

 

function() {

 

$(

 

"#grid").kendoGrid({

 

dataSource: {

type:

 

"odata",

 

transport: {

read:

 

"http://localhost:61766/WebSite1/WcfDataService.svc/Suppliers"

 

},

schema: {

model: {

fields: {

SupplierID: { type:

 

"number" },

 

ContactName: { type:

 

"string" }

 

}

}

},

pageSize: 10,

serverPaging:

 

true,

 

serverFiltering:

 

true,

 

serverSorting:

 

true

 

},

height: 250,

filterable:

 

true,

 

sortable:

 

true,

 

pageable:

 

true,

 

columns: [{

field:

 

"SupplierID",

 

filterable:

 

false

 

},

 

 

"ContactName"

 

]

});

 


Deepa
Top achievements
Rank 1
 answered on 16 May 2013
4 answers
167 views
Hi kendo team,

I have some problems,I want to change the kendoUpload layout at one line,but can not.can you give me some advice?

Regards,
Bin
bin
Top achievements
Rank 1
 answered on 16 May 2013
2 answers
141 views
Hi All

Not sure what i'm doing wrong exactly.

I always get an undefiend error when the fetch is called. 

Any help much appreciated

using the following code:
var dataSource = new kendo.data.DataSource({
  autoSync: true,
  transport: {
    read:  {
      url: "web url",
             beforeSend: function (xhr) {
                //your code
xhr.setRequestHeader("Authorization", "Basic AARtaW5pc3RyYXRvcjpEdWZmSVQ4OTg="); //i set the username and password to valid settings
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Content-type", "application/json");
            },
      dataType: "json" // "jsonp" is required for cross-domain requests; use "json" for same-domain requests
        
    },
    update: {
      url: "web url",
      dataType: "json" // "jsonp" is required for cross-domain requests; use "json" for same-domain requests
    }
  },
  schema: {
    model: { id: "id" }
  }
});
dataSource.fetch(function() {
    var data = this.data();
  console.log(data.length);
//var product = dataSource.at(0);
//console.log(product.id);
});


the json returned looks like:
{

"d" : {

"results": [

{

"__metadata": {

"uri": "http://webadd/Samples/Enrolments(1)", "etag": "W/\"4\"", "type": "Microsoft.SharePoint.DataService.EnrolmentsItem"

}, "Id": 1, "ContentTypeID": "0x01060096C4C2ABBC5E44418CFFAEE0C90BB04A", "ContentType": "Contact", "LastName": "Duffy", "Modified": "\/Date(1367700526000)\/", "Created": "\/Date(1367696864000)\/", "CreatedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(1)/CreatedBy"

}

}, "CreatedById": 1, "ModifiedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(1)/ModifiedBy"

}

}, "ModifiedById": 1, "Owshiddenversion": 4, "Version": "1.0", "Attachments": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(1)/Attachments"

}

}, "Path": "/Samples/Lists/Enrolments", "FirstName": "Luke", "FullName": "Flukey Luke", "EmailAddress": "luke@demo.com", "Company": "COmpany Here", "JobTitle": null, "BusinessPhone": null, "HomePhone": null, "MobileNumber": null, "FaxNumber": null, "Address": null, "City": null, "StateProvince": null, "ZIPPostalCode": null, "CountryRegion": null, "WebPage": null, "Notes": "<div></div>"

}, {

"__metadata": {

"uri": "http://webadd/Samples/Enrolments(2)", "etag": "W/\"5\"", "type": "Microsoft.SharePoint.DataService.EnrolmentsItem"

}, "Id": 2, "ContentTypeID": "0x01060096C4C2ABBC5E44418CFFAEE0C90BB04A", "ContentType": "Contact", "LastName": "Sample", "Modified": "\/Date(1367700392000)\/", "Created": "\/Date(1367697021000)\/", "CreatedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(2)/CreatedBy"

}

}, "CreatedById": 1, "ModifiedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(2)/ModifiedBy"

}

}, "ModifiedById": 1, "Owshiddenversion": 5, "Version": "1.0", "Attachments": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(2)/Attachments"

}

}, "Path": "/Samples/Lists/Enrolments", "FirstName": "Sam", "FullName": null, "EmailAddress": null, "Company": "My Company", "JobTitle": null, "BusinessPhone": null, "HomePhone": null, "MobileNumber": null, "FaxNumber": null, "Address": null, "City": null, "StateProvince": null, "ZIPPostalCode": null, "CountryRegion": null, "WebPage": null, "Notes": null

}, {

"__metadata": {

"uri": "http://webadd/Samples/Enrolments(3)", "etag": "W/\"2\"", "type": "Microsoft.SharePoint.DataService.EnrolmentsItem"

}, "Id": 3, "ContentTypeID": "0x01060096C4C2ABBC5E44418CFFAEE0C90BB04A", "ContentType": "Contact", "LastName": "Tom", "Modified": "\/Date(1367700527000)\/", "Created": "\/Date(1367700507000)\/", "CreatedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(3)/CreatedBy"

}

}, "CreatedById": 1, "ModifiedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(3)/ModifiedBy"

}

}, "ModifiedById": 1, "Owshiddenversion": 2, "Version": "1.0", "Attachments": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(3)/Attachments"

}

}, "Path": "/Samples/Lists/Enrolments", "FirstName": "Testing", "FullName": null, "EmailAddress": null, "Company": null, "JobTitle": null, "BusinessPhone": null, "HomePhone": null, "MobileNumber": null, "FaxNumber": null, "Address": null, "City": null, "StateProvince": null, "ZIPPostalCode": null, "CountryRegion": null, "WebPage": null, "Notes": "<div></div>"

}, {

"__metadata": {

"uri": "http://webadd/Samples/Enrolments(4)", "etag": "W/\"1\"", "type": "Microsoft.SharePoint.DataService.EnrolmentsItem"

}, "Id": 4, "ContentTypeID": "0x01060096C4C2ABBC5E44418CFFAEE0C90BB04A", "ContentType": "Contact", "LastName": "Smith", "Modified": "\/Date(1367700554000)\/", "Created": "\/Date(1367700554000)\/", "CreatedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(4)/CreatedBy"

}

}, "CreatedById": 1, "ModifiedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(4)/ModifiedBy"

}

}, "ModifiedById": 1, "Owshiddenversion": 1, "Version": "1.0", "Attachments": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(4)/Attachments"

}

}, "Path": "/Samples/Lists/Enrolments", "FirstName": "Sam", "FullName": null, "EmailAddress": null, "Company": null, "JobTitle": null, "BusinessPhone": null, "HomePhone": null, "MobileNumber": null, "FaxNumber": null, "Address": null, "City": null, "StateProvince": null, "ZIPPostalCode": null, "CountryRegion": null, "WebPage": null, "Notes": null

}, {

"__metadata": {

"uri": "http://webadd/Samples/Enrolments(5)", "etag": "W/\"1\"", "type": "Microsoft.SharePoint.DataService.EnrolmentsItem"

}, "Id": 5, "ContentTypeID": "0x01060096C4C2ABBC5E44418CFFAEE0C90BB04A", "ContentType": "Contact", "LastName": "man", "Modified": "\/Date(1367743184000)\/", "Created": "\/Date(1367743184000)\/", "CreatedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(5)/CreatedBy"

}

}, "CreatedById": 1, "ModifiedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(5)/ModifiedBy"

}

}, "ModifiedById": 1, "Owshiddenversion": 1, "Version": "1.0", "Attachments": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(5)/Attachments"

}

}, "Path": "/Samples/Lists/Enrolments", "FirstName": "iron", "FullName": null, "EmailAddress": null, "Company": null, "JobTitle": null, "BusinessPhone": null, "HomePhone": null, "MobileNumber": null, "FaxNumber": null, "Address": null, "City": null, "StateProvince": null, "ZIPPostalCode": null, "CountryRegion": null, "WebPage": null, "Notes": null

}, {

"__metadata": {

"uri": "http://webadd/Samples/Enrolments(6)", "etag": "W/\"1\"", "type": "Microsoft.SharePoint.DataService.EnrolmentsItem"

}, "Id": 6, "ContentTypeID": "0x01060096C4C2ABBC5E44418CFFAEE0C90BB04A", "ContentType": "Contact", "LastName": "Using the GSON library", "Modified": "\/Date(1367793454000)\/", "Created": "\/Date(1367793454000)\/", "CreatedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(6)/CreatedBy"

}

}, "CreatedById": 1, "ModifiedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(6)/ModifiedBy"

}

}, "ModifiedById": 1, "Owshiddenversion": 1, "Version": "1.0", "Attachments": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(6)/Attachments"

}

}, "Path": "/Samples/Lists/Enrolments", "FirstName": "Using libraries is convenient.", "FullName": null, "EmailAddress": null, "Company": null, "JobTitle": null, "BusinessPhone": null, "HomePhone": null, "MobileNumber": null, "FaxNumber": null, "Address": null, "City": null, "StateProvince": null, "ZIPPostalCode": null, "CountryRegion": null, "WebPage": null, "Notes": null

}, {

"__metadata": {

"uri": "http://webadd/Samples/Enrolments(7)", "etag": "W/\"1\"", "type": "Microsoft.SharePoint.DataService.EnrolmentsItem"

}, "Id": 7, "ContentTypeID": "0x01060096C4C2ABBC5E44418CFFAEE0C90BB04A", "ContentType": "Contact", "LastName": "Using the GSON library", "Modified": "\/Date(1367793455000)\/", "Created": "\/Date(1367793455000)\/", "CreatedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(7)/CreatedBy"

}

}, "CreatedById": 1, "ModifiedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(7)/ModifiedBy"

}

}, "ModifiedById": 1, "Owshiddenversion": 1, "Version": "1.0", "Attachments": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(7)/Attachments"

}

}, "Path": "/Samples/Lists/Enrolments", "FirstName": "Using libraries is convenient.", "FullName": null, "EmailAddress": null, "Company": null, "JobTitle": null, "BusinessPhone": null, "HomePhone": null, "MobileNumber": null, "FaxNumber": null, "Address": null, "City": null, "StateProvince": null, "ZIPPostalCode": null, "CountryRegion": null, "WebPage": null, "Notes": null

}, {

"__metadata": {

"uri": "http://webadd/Samples/Enrolments(8)", "etag": "W/\"1\"", "type": "Microsoft.SharePoint.DataService.EnrolmentsItem"

}, "Id": 8, "ContentTypeID": "0x01060096C4C2ABBC5E44418CFFAEE0C90BB04A", "ContentType": "Contact", "LastName": "sam", "Modified": "\/Date(1367793667000)\/", "Created": "\/Date(1367793667000)\/", "CreatedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(8)/CreatedBy"

}

}, "CreatedById": 1, "ModifiedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(8)/ModifiedBy"

}

}, "ModifiedById": 1, "Owshiddenversion": 1, "Version": "1.0", "Attachments": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(8)/Attachments"

}

}, "Path": "/Samples/Lists/Enrolments", "FirstName": "Using libraries is convenient.", "FullName": null, "EmailAddress": null, "Company": null, "JobTitle": null, "BusinessPhone": null, "HomePhone": null, "MobileNumber": null, "FaxNumber": null, "Address": null, "City": null, "StateProvince": null, "ZIPPostalCode": null, "CountryRegion": null, "WebPage": null, "Notes": null

}, {

"__metadata": {

"uri": "http://webadd/Samples/Enrolments(9)", "etag": "W/\"1\"", "type": "Microsoft.SharePoint.DataService.EnrolmentsItem"

}, "Id": 9, "ContentTypeID": "0x01060096C4C2ABBC5E44418CFFAEE0C90BB04A", "ContentType": "Contact", "LastName": "sam", "Modified": "\/Date(1367793667000)\/", "Created": "\/Date(1367793667000)\/", "CreatedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(9)/CreatedBy"

}

}, "CreatedById": 1, "ModifiedBy": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(9)/ModifiedBy"

}

}, "ModifiedById": 1, "Owshiddenversion": 1, "Version": "1.0", "Attachments": {

"__deferred": {

"uri": "http://webadd/Samples/Enrolments(9)/Attachments"

}

}, "Path": "/Samples/Lists/Enrolments", "FirstName": "Using libraries is convenient.", "FullName": null, "EmailAddress": null, "Company": null, "JobTitle": null, "BusinessPhone": null, "HomePhone": null, "MobileNumber": null, "FaxNumber": null, "Address": null, "City": null, "StateProvince": null, "ZIPPostalCode": null, "CountryRegion": null, "WebPage": null, "Notes": null

}

]

}

}


Thanks 

Luke
luke
Top achievements
Rank 1
 answered on 16 May 2013
3 answers
170 views
when nested collection model binding to Kendo DropDownList, 
not bind correctly .

Kendo.Mvc version is 2013.1.319.340

HomeControoler.cs
namespace MvcApplication5.Controllers
{
    public class ChildModel
    {
        public int CategoryId { get; set; }
    }
    public class ParentModel
    {
        public int CategoryId { get; set; }
        public ChildModel Child { get; set; }
        public List<ChildModel> Children { get; set; }
         
    }
 
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            var model = new ParentModel
            {
                CategoryId = 2,
                Child = new ChildModel { CategoryId = 2},
                Children = new List<ChildModel>
                {
                    new ChildModel { CategoryId = 2}
                }
            };
            return View(model);
        }
 
    }
}
Index.cshtml
@model MvcApplication5.Controllers.ParentModel
 
@{
    ViewBag.Title = "Index";
    var list = new List<SelectListItem>()
    {
      new SelectListItem() { Value = "1", Text = "one" },
      new SelectListItem() { Value = "2", Text = "two" },
      new SelectListItem() { Value = "3", Text = "three" },
    };
}
 
<h2>all actual categoryid must be 2</h2>
 
<h3>[OK] Model.CategoryId: @Model.CategoryId</h3>
@(Html.Kendo().DropDownListFor(m => m.CategoryId)
  .BindTo(list)
)
 
<h3>[OK] Model.CategoryId: @Model.Child.CategoryId</h3>
@(Html.Kendo().DropDownListFor(m => m.Child.CategoryId)
  .BindTo(list)
)
 
<h3>[NG] Model.Children[0].CategoryId: @Model.Children[0].CategoryId</h3>
@(Html.Kendo().DropDownListFor(m => m.Children[0].CategoryId)
  .BindTo(list)
)
<hr />
@Html.TextBoxFor(m => m.Children[0].CategoryId)
result

Daniel
Telerik team
 answered on 15 May 2013
1 answer
208 views
I need to design an organisation chart like the one you'll have in Telerik i.e. the RadOrgChart.
The chart should have draggable and droppable nodes.

But as I am using MVC I cannot handle the NodeDrop event of the RadOrgChart cause
 the event is handled in code behind.

Please help me with some alternate control in kendo.

Treeview is the closest control but I have to display a lot of data and treeview has a vertical view which doesn't give a good look and feel.
Alexander Valchev
Telerik team
 answered on 15 May 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
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
Iron
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
Iron
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?