Telerik Forums
Kendo UI for jQuery Forum
2 answers
154 views
I was trying to recreate the custom command demo and I'm having an issue.

The issue seems to relate to the text property on the command:
command: { text: "View Details", click: showDetails }, title: " ", width: "140px"


Using the kendo.web.min.js file the following html is generated for the button.
<a class="k-button k-button-icontext k-grid-View Details" href="#">
   <span class=" "></span>
   View Details
</a>

Your demo using kendo.all.min.js:
<a class="k-button k-button-icontext k-grid-ViewDetails" href="#">
     <span class=" "></span>
     View Details
</a>

The class should be "k-grid-VIewDetails" like the "kendo.all.min.js" but in the "kendo.web.min.js" it is creating two classes one being "k-grid-View" and "Details"

This causes the button to not work.  Taking the space out of "View Details" when defining the text property for the command allows the button to work with no other modifications.
Jesse
Top achievements
Rank 1
 answered on 12 Oct 2012
2 answers
1.0K+ views
Hi,

My requirement is to show a single line of text per row in the grid. The default behavior of the grid is to show long text on multiple lines. Is there a way to show just one line of text?

Regards,
Sarvesh
Sarvesh
Top achievements
Rank 1
 answered on 12 Oct 2012
0 answers
91 views
Hi,

I am generating a bar chart having multiple series. i have generated datasource in controller and passed to view. 
chart is getting displayed with no grouping on series.

Here is view code:

@(Html.Kendo().Chart(Model.VOCBar)    
        .Name("chart6") 
        .Title("Sales") 
        .DataSource(dataSource => dataSource 
            .Group(group => group.Add(model => model.Type)) 
            .Sort(sort => sort.Add(model => model.Date).Ascending()) 
            .Read(read => read.Action("_StockData""Home"))           
        ) 
        .Series(series => 
        { 
            series.Column(model => model.Count) 
                .Name("Type") 
                .GroupNameTemplate("#= group.value #"); 
        }) 
        
.Legend(legend => legend 
            .Position(ChartLegendPosition.Bottom) 
        ) 
        .ValueAxis(axis => axis.Numeric() 
            .Labels(labels => labels 
                .Format("{0}"
                .Skip(2) 
                .Step(2) 
            ) 
        ) 
        .CategoryAxis(axis => axis 
            .Categories(model => model.Date) 
            .Labels(labels => labels.Format("MMM")) 
        )        
        .Tooltip(true)       
     ) 

Please guide me.

--
Swapnil
Swapnil
Top achievements
Rank 1
 asked on 12 Oct 2012
0 answers
58 views
Hey I was wondering is there a js event fired when the chart is rendered completely ? Not when the page appears with the axis (so no document.ready doesnt do the job) but when the actual points are rendered ?
Neil
Top achievements
Rank 1
 asked on 12 Oct 2012
1 answer
131 views
Hi all,
I have found an errors when drag and drop a node to another node in Kendo UI Treeview.
I'm using remote data method to bind the treeview.
Error: 'dataSource' is null or not an object
Error: 'this._data.length' is null or not an object
Nick Wu
Top achievements
Rank 1
 answered on 12 Oct 2012
0 answers
100 views
I am new to kendoUI.

I define the chart as follows

 @(Html.Kendo().Chart<SureCalc.Models.HomePurchaseReportDataModel>()
                      .Name("homePuchaseChart")
                      .Legend(legend => legend
                      .Position(ChartLegendPosition.Top)
                    )
                    .DataSource(ds => ds.Read(read => read.Action("_HomePurchaseResult", "Decision")))
                    .................................

I want to bind to a specif field in the returned object instead of the top level object.
How do I do this? I don't see schema.data exposed in RAZOR syntax.

Thanks
Sunil
Sunil
Top achievements
Rank 1
 asked on 12 Oct 2012
2 answers
136 views
Hi,
    I have a row detail template grid with checkbox for selection of rows and paging. When I select the checkbox in first page and move to the second page and selected 1 more row, if I have returned back to the first page the selected row is not in checked condition.

I have tried out several examples and finally got it. But the problem is with the older version of kendo.all.min.js file it is working fine.
But with the new version it is not working.If we use the old version the problem is paging styles and for other different pages it is not working.

So, help me to sort this out.

Regards,
sri.
Sameer
Top achievements
Rank 1
 answered on 12 Oct 2012
0 answers
253 views
Hello!  I am working with a kendo grid control and it is pulling data from a remote source.  The grid has a drop-down for one column, which when selected, will populate another field.  All that is working fine.  The issue I have is that, the field that is being populated by the drop down should be non-editable in the grid. 

Ok, so I thought to just update the data source > model > field > editable: property for the field I want.  This does make the column non-editable, but when I select the drop-down on column 1, the non-editable field never gets updated based on the drop-down field.  I was debugging and saw that when the editable property is set to false, the field will never get set.

However, let's say that I already had a form saved to the db.  When I open this form and it pulls the data from the db, the grid will display the correct value for the drop-down column 1, and correct value for the column 2 which is based on column 1.  So I am thinking that it is a timing thing, where if the form is pulling from the db, the value is set on cols 1 and 2 before the code hits and reads the editable property for col 2?

Is there a way to make a column in a grid non-editable after it has been rendered?  Or is there a way to default the column to non-editable, but ensure the change event on the drop-down is able to populate the other column?

The save fn() of the grid is below.  It sets the SerialNo field just fine if the column is editable, but if not, it will never set it.  I wonder if there is a reference, say to e.model.field.editable?

save: function (e) {
  if (e.values["FA_No_"]) { 
    //Select below loops thru all values in ddl and if it = FANo,
    //then set the other fields based off the FA.
    //If we set the FANo field somewhere above, it does NOT trigger the
    //dd.select() or .change(), so we create inline select() below to
    //set the fields we need.
    //NOTE: 'e.model' refers to datasource model fields and the
    //faddl.dataItem refers to the ddl datasource fields.
    var currFA = e.values["FA_No_"];
 
    var faddl = $("#ddFA").data("kendoDropDownList");
 
    faddl.select(function (dataItem) {                                   
      if (dataItem.Code == currFA) {
        //First reset all values based on FANo.
        e.model.set("Description", "");
        e.model.set("Serial_No_", "");
   
        //Next, update all values based on newly selected FANo.
        if (dataItem.SerialNo)
          e.model.set("Serial_No_", dataItem.SerialNo);
                                            
        return dataItem.text === currFA;
      }
    });
  }
}
K
Top achievements
Rank 1
 asked on 11 Oct 2012
15 answers
515 views
Hi

I am trying to implement Kendo on my webpage, with dynamically loaded menu's.
I have one menu up and running, which is generated on the server-side and then rendered by Kendo.
This works ok.

Now I am trying to retrieve the same data via a json webservice (WCF Rest) and populate the menu via the datasource.
Since there is no sample code for this, I am cutting and pasting from other samples, but I cannot get this to work.

My code is
"
            <ul id="k-menu2"></ul>
			
            <script type="text/javascript">
			    $(document).ready(function() 
                {
                    $("#k-menu2").kendoMenu(
                    {
                        dataTextField: "Name",
                        dataValueField: "Id",
                        dataSource: 
                        {
                        type: "json",
                        transport: 
                            {
                                read: "http://jason.platform4telecom.com/JsonTest/GetRoles/henkjelt/simpel/1/58/1"
                            }
                        }
                     });
                });
"

If I look in the browser via Firebug I see the following:
"
<ul id="k-menu2" data-role="menu" class="k-widget k-reset k-header k-menu k-menu-horizontal"></ul>
"
 and

"
<script type="text/javascript">
   $(document).ready(function() 
                {
                    $("#k-menu2").kendoMenu(
                    {
                        dataTextField: "Name",
                        dataValueField: "Id",
                        dataSource: 
                        {
                        type: "json",
                        transport: 
                            {
                                read: "http://jason.platform4telecom.com/JsonTest/GetRoles/henkjelt/simpel/1/58/1"
                            }
                        }
                     });
                });
</script>
"

If I test the json call via a browser I get the following output:
"
[{"Id":1,"Name":"superuser"},{"Id":3,"Name":"VNO"},{"Id":4,"Name":"Partner"},{"Id":5,"Name":"Gebruiker"}] 
"

the menu should be populated with 4 roles, but this is not happening.

Where is the pitfall?

Thanks for all help!

KR

Henk Jelt
Dave
Top achievements
Rank 1
 answered on 11 Oct 2012
0 answers
144 views
Hello all,

I've been trying to create a tree-view widget using MVVM, declartive initialization and a remote Hierarchical data source.  However, kendo.web is throwing a javascript error when attempting to call widget.setDataSource(source) on line #8126 of kendo.web.js (version 2012.2.710). This is in the binders.widget.source.refresh() method.

I'm confused, because looking through the JavaScript code for the TreeView widget, I see comments that say essentially that remote data sources are not supported for the TreeView widget, but various examples on the Kendo UI website show remote data being used with the HierarchicalDataSource, which in turn is used with the TreeView widget.

Does anyone have any ideas on what I might be doing wrong?  I know that the binding is partially working because one of the other controls on the page is getting wired-up to its corresponding function on the viewModel.

Here is my markup...
<div id="dlsAdmin">
 
    <select id="Mode" name="Mode" data-bind="events: { change: ChangeMode }">
        <option value="Maintenance">Maintenance</option>
        <option value="Reporting">Reporting</option>
    </select>
     
    <div id="customerTree"
        data-role="treeview"
        data-bind="source: TreeViewDataSource, value: SelectedNode"
        data-checkboxes="{ checkChildren: true }"
        data-load-on-demand="false"
        data-text-field="text"
        data-value-field="id">
    </div>
 
</div>

Here is my ViewModel

// Generated by CoffeeScript 1.3.3
(function() {
  var root;
  root = typeof window !== "undefined" && window !== null ? window : global;
  root.DLSAdminManager = (function() {
    function DLSAdminManager(treeViewUrl) {
      var dataSource;
      this.SelectedNode = {};
      dataSource = {
        transport: {
          read: {
            url: treeViewUrl,
            dataType: 'json'
          }
        },
        schema: {
          model: {
            id: 'id',
            hasChildren: 'hasChildren'
          }
        }
      };
      this.TreeViewDataSource = new kendo.data.HierarchicalDataSource(dataSource);
    }
 
    DLSAdminManager.prototype.ChangeMode = function() {
      return alert('change mode!');
    };
 
    return DLSAdminManager;
  })();
}).call(this);

and here is my initialization code

$(function() {
    var adminManager = kendo.observable(new DLSAdminManager('/Admin/GetAccountHierarchy'));
    kendo.bind('#dlsAdmin', adminManager);
});
Joshua
Top achievements
Rank 1
 asked on 11 Oct 2012
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
Date/Time Pickers
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)
SPA
Filter
Drawing API
Drawer (Mobile)
Globalization
Gauges
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
OrgChart
TextBox
Effects
Accessibility
ScrollView
PivotGridV2
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
Popover
DockManager
FloatingActionButton
TaskBoard
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
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?