Telerik Forums
Kendo UI for jQuery Forum
1 answer
157 views
Is there a featurre in kendo charts like logarithmic scale ???
Regards,
Neil
Hristo Germanov
Telerik team
 answered on 08 Oct 2012
1 answer
99 views
In the CategoryAxis Documentation is says: 

categoryAxis.type: "Date".max Number
The last date displayed on the axis. By default, the minimum date is the same as the last category. This is often used in combination with the min configuration option to set up a fixed date range.

But as I illustrate in this jsFiddle, I believe that should actually be a JavaScript Date Object. Anyone agree?
Hristo Germanov
Telerik team
 answered on 08 Oct 2012
1 answer
145 views
We can create DropDownLists by class:
        $(".theClassName").kendoDropDownList({});

And we can reference them by id to apply methods:

     var list = $("#theID").data("kendoDropDownList");
    list.select(0);
    list.refresh();

But it doesn't seem we can reference all lists by classname:

    var allLists = $(".theClassName").data("kendoDropDownList");

allLists is undefined.  Is there a way to apply a method to all dropdownlists of the same class?
Heather
Top achievements
Rank 1
 answered on 08 Oct 2012
4 answers
1.3K+ views
I've got several dataSources on a page. I want one of the dataSources to read on page load, while the others should only read when I tell them to:

var aDataSource = new kendo.data.DataSource({yaddayaddayadda});
var bDataSource = new kendo.data.DataSource({yaddayaddayadda});
var cDataSource = new kendo.data.DataSource({yaddayaddayadda});
 
function readDataSources() {
bDataSource.read();
cDataSource.read();
};
  
$(document).ready(function () {
    $("#aGrid").kendoGrid({
        dataSource: aDataSource,
        autobind: true
    });
    $("#bGrid").kendoGrid({
        dataSource: bDataSource,
        autobind: false
    });
    $("#cGrid").kendoGrid({
        dataSource: cDataSource,
        autobind: false
    });
})

When the page loads all dataSources read. What am I doing wrong?
Kwex
Top achievements
Rank 1
 answered on 07 Oct 2012
2 answers
2.5K+ views
Dear KendoUI team,
my grid displays data delivered from a JSONP webservice.
Rather than extending the webservice model
I would like to tweak a column on the client side to show an <img> depending on the value of another property in the model.

So, how can I show an <img> which' src depends on the value of another property in the model?
For instance:
the service model has a
  • Name (string)
  • IsValid (boolean)
  • Count (number)

property.

Column definitions in the grid look like:
columns:[
   {field:"Name", title:"Product"},
   {field:"IsValid", title: "State"}
]

What I actually want is a column that should behave like:
   {field:"IsValid", title: "State"
     , template: {
         function(model) {
           if(model.IsValid && model.Count > 0)
              return "<img src ='images/good.png'/>";
           else return "<img src ='images/bad.png''/>";
         }
      }
   }
According to the - much better - documentation, "template" property expects a string, but is it possible to add some JavaScript code to the template string as well, something like

var imgTemplate = kendo.template(
"#if (model.IsValid && model.Count > 0){#<img src='icons/A.png'/>#}#else {#
<img src='icons/B.png'/>#}#"); 
and in the columns definition

template: imgTemplate(model)

Thank you in advance,
Hermann
Mona
Top achievements
Rank 1
 answered on 07 Oct 2012
4 answers
2.3K+ views
Hi,
I am using Kendo Grid for Add,Update and Delete functionality. While populating the grid I am giving a list of Data to the grid.  

@model OSI.DNAweb.Web.UI.Areas.Administrator.ViewModels.Business.BusinessUserAccountModel
@(Html.Kendo.Grid<Accounts>()
.Name("Grid")
    .Columns(columns =>
                 {
                     columns.Bound(p => p.AccountNumber).Title("Account Number");
                     columns.Bound(p => p.CreditCardNumber).Title("Credit Card Nbr");
                     columns.Bound(p => p.EnrollTypes).ClientTemplate("#=EnrollTypes.EnrollTypeName#").Title("Type").Width(200);
                     columns.Bound(p => p.DisplayName).Title("Nickname").Width(200);
                     columns.Bound(p => p.AsofDate).Title("As Of Date").Format("{0:d}").Width(50);
                     columns.Command(command => command.Custom("Delete").Click("showDetails")).Width(15);
                 })
                .ToolBar(toolbar =>
                {
                    toolbar.Create();
                    toolbar.Save();
                })
                     .Editable(editable =>
                     {
                         editable.Mode(GridEditMode.InCell);
                         editable.DisplayDeleteConfirmation(false);
                     }
                  )
                 .Pageable(page => page.Enabled(false))
                 .DataSource(dataSource => dataSource
                          .Ajax()
                          .Batch(true)
                          .Events(events => events.Error("error_handler"))
                          .Model(model =>
                                  {
                                      model.Id(p => p.CompanyIdent);
                                      model.Field(p => p.CreditCardNumber).Editable(false);
                                      model.Field(p => p.EnrollTypes).DefaultValue(new EnrollTypes() { EnrollType = "", EnrollTypeName = "Select" });
                                  })
                          .Create("CreateAccount", "Business")
                          .ServerOperation(false)
                          .Read(read => read.Action("GetAccounts", "Business"))
                          .Update("UpdateAccount", "Business")
                          .Destroy("DeleteAccount", "Business")
                          )
      )

While Adding,Updating and Deleting it is sending a list of Accounts Class to the respective ActionResult in the controller with the changes. But In my case I want to use BusinessUserAccountModel and pass it to the controller so I can also have some additional properties mentioned in BusinessUserAccountModel class along with Accounts Collection.Please see below the Classes structure:

    [Serializable]
    public class Accounts
    {
        #region Properties
        public int CompanyIdent { get; set; }
        [Required]
        [DNAwebCustomValidator(DNAWebValidationDataTypesEnum.AlphaNumeric)]
        public string AccountNumber { get; set; }
        public string CreditCardNumber { get; set; }
        [Required]
        [DNAwebCustomValidator(DNAWebValidationDataTypesEnum.AcctNickName)]
        public string DisplayName { get; set; }
        [DNAwebCustomValidator(DNAWebValidationDataTypesEnum.Date)]
        public string AsofDate { get; set; }
        [UIHint("AccountTypes"), Required]
        public EnrollTypes EnrollTypes { get; set; }
        #endregion
    } 

    public class BusinessUserAccountModel : BusinessUserBaseModel
    {
        public IEnumerable<Accounts> Accounts { get; set; }
        public BusinessUserAccountModel(){}
        public BusinessUserAccountModel(BusinessData businessData,IEnumerable<Accounts> accts) : base(businessData, BusinessTab.Accounts)
        {
            Accounts = accts;
        }
    }
As you see above BusinessUserAccountModel is further inheriting BusinessUserBaseModel. If somehow in my grid CRUD operations if i able to pass BusinessUserAccountModel class along with the Accounts Collection that will solve my problem.

Just for more clarification in my page I have other controls in my page other than grid, so whenever I do CRUD operation in the grid those controls validation should also get fired. Hope you got cleared with my problem.     

Thanks,
Nandan

 
Daniel
Telerik team
 answered on 07 Oct 2012
7 answers
913 views
Hi,

Is it possible to change the text "Insert HTML" in the editor when using snippets?

http://demos.kendoui.com/web/editor/snippets.html

Greets

Sébastien
Sébastien
Top achievements
Rank 1
 answered on 07 Oct 2012
0 answers
213 views
I have a grid to which I bind some data using a datasource . My problem is that my json objects have some nested arrays inside and I want that when you click on the edit button I should be able to see that array in a list.

{
id : "1",
name : "Ted",
collection : [ { id :"1" , name : "Picture 1 "}, { id :"2" , name : "Picture 2 "}]
}


How do I get that collection to be displayed in my edit template so that I can add or delete items.jsfiddle example
Alin
Top achievements
Rank 1
 asked on 07 Oct 2012
0 answers
176 views
I want to add checkbox in the grid column, for that i am using .Template(" Check box code")

same as below example,

columns.Template(@<text>
                     <input name="selectedProducts" type="checkbox" title="select product" value="@item.ProductID" 
                     @{
                         if (@item.ProductID)
                         {
                            @("checked=checked")
                         }
                     }/>
                    </text>)

But i am getting this value as undefined.

Any ideas will be appreciated for the same.

Thanks in advance!!
Mona
Top achievements
Rank 1
 asked on 06 Oct 2012
0 answers
108 views
Hi Friends,

I am New to this Kendo UI conrols.
I am using ASP.NET MVC framework.
I am facing issue on the following problem.
I have a xml files with me.
I want to read the xml file  data and display the data in a grid. I also required the in-line edit option in the kendo Grid. When the user edit some data, the source xml file needs to update.

kindly give some solution for this.

Thanks
A R
A R
Top achievements
Rank 1
 asked on 06 Oct 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
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
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?