Telerik Forums
Kendo UI for jQuery Forum
2 answers
520 views
Hello,

I'm using a hierarchical grids and I have a a DropDown editor for each row, I would like to expand the hierarchical grid that belongs to the row when a value of the DropDown is selected. Is that possible?

Thanks,
Dorian
Top achievements
Rank 1
 answered on 14 Nov 2012
3 answers
269 views
Is there a way to customize the tool tip for the Slider in the KendoUI?  With the ASP.Net Ajax version I was updating it during the OnClientSlideStart/End events as well as the OnClientValueChanging event by using a tooltip control and sending it an reference to the active handle by calling the slider.get_activeHandle() method.

I'm not sure how to do this with the KendoUI slider.  The ASP.Net one works but I'd like to use the Kendo one because it works much better with tablet browsers.

Thanks.
Aleksandar
Top achievements
Rank 1
 answered on 14 Nov 2012
1 answer
84 views
How to retrieve value of Autocomplete component in case of Json content type
Alexander Valchev
Telerik team
 answered on 14 Nov 2012
1 answer
265 views
Hi, I'm new in using Kendo UI ,
I've tried to use the  Binding to remote data example on localhost. but it always load in the first time ,and it hangs on loading the childs
firebug shows the request to the service done successfully ,

I also notices that the service request for the online example appears in  the XHR Tab in firebug, but in my test project appear in the JS tab , can anyone explain to me Why??
Vladymyr
Top achievements
Rank 1
 answered on 14 Nov 2012
0 answers
368 views
When I created a grid, I tried to use a .ashx file as a datasource. No data displayed in IE.
But when I save the .ashx result as a .json file and bind to the datasource. Grid displyed ok.
Please help to find what is wrong with my code? Thank.
internet-users.json :
[{"Name":"System","Role":"a","Birthdate":"\/Date(259074000000)\/","ID":3},{"Name":"Moataieh","Role":"CHASSIS INSTALLATION","Birthdate":"\/Date(259074000000)\/","ID":26}]

My JsonDataSrc.ashx is:
I ran it in IE and IE displayed the same data as in internet-users.json
<%@ WebHandler Language="C#" Class="GetData" %>
using System;
using System.Web;
using System.Data.SqlClient;
using System.Data;
using System.Collections.Generic;
using System.Web.Script.Serialization;
 
public class GetData : IHttpHandler
{
    public void ProcessRequest(HttpContext context)
    {
        string connectionString = @"Data Source=.;Initial Catalog=MyData;User ID=MyData;Password=;";
 
        context.Response.ContentType = "text/plain";
            List<Person> list = new List<Person>();
            using (SqlDataReader sdr = StockIMS.IDataAccessLayer.SqlHelper.ExecuteReader(connectionString, CommandType.Text, "SELECT top 2 isnull(Name,''), isnull([Job Role],'N/A') role,  isnull(Birthday,'1972-01-01'), [Person ID] id FROM [Staff Names]"))
            {
                while (sdr.Read())
                {
                    Person Personitem = new Person();
 
                    Personitem.Name=sdr[0].ToString();
                    Personitem.Role=sdr[1].ToString();
                    try
                    {
                        Personitem.Birthdate = Convert.ToDateTime(sdr[2].ToString());
                    }
                    catch { }
                             
                    Personitem.ID =Convert.ToInt32( sdr[3].ToString());
                    list.Add(Personitem);
                }
                sdr.Close();
            }
            context.Response.Write(new JavaScriptSerializer().Serialize(list).ToString());//转为Json格式
    }
    public bool IsReusable
    {
        get
        {
            return false;
        }
    }
}
public class Person
{
    private System.String _Name;
    private System.DateTime _Birthdate;
    private System.Int32  _ID;
    private System.String _Role;
 
    public Person()
    {
    }
    public string Name { get { return _Name; } set { _Name = value; } }
    public string Role { get { return _Role; } set { _Role = value; } }
    public DateTime Birthdate { get { return _Birthdate; } set { _Birthdate = value; } }
    public Int32 ID { get { return _ID; } set { _ID = value; } }
}


My index.html is:
<!DOCTYPE html>
<html>
<head>
    <title>Basic usage</title>
 
    <link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="../styles/kendo.common.min.css" rel="stylesheet">
    <link href="../styles/kendo.default.min.css" rel="stylesheet">
    <script src="../js/jquery.min.js"></script>   
    <script src="../js/kendo.web.min.js"></script>
    <script src="../content/shared/js/console.js"></script>
                <script src="../content/shared/js/people.js"></script>
            <style >
                    body { font-size: 9pt; }
                    #dvGrid { width: 500px; }       
                    span.hi-lite { color: red; }       
                    #dvGrid th.k-header { text-align: center }   
             </style>           
</head>
<body>   
<a class="offline-button" href="index.html">Back</a>
 
        <div id="example" class="k-content">
            <div id="clientsDb">
 
                <div id="dvgrid" style="height: 380px"></div>
 
            </div>
            <script>
            
                    $(document).ready(function() {
              var dataSrc = new kendo.data.DataSource(
           {
                transport:
                {
                   read: {
                     type:"POST",                                                  
                      url:   "internet-users.json",// "JsonDataSrc.ashx",
                      dataType: "json"   
                }               
                },   
                pageSize: 10,               
                serverPaging: true,               
               serverSorting: true           
             });
                                          
                var dateRegExp = /^\/Date\((.*?)\)\/$/;          
                 window.toDate = function (value)
                 {               
                        var date = dateRegExp.exec(value);
                        return new Date(parseInt(date[1]));           
                 }
             
               function createGrid() {
               $("#dvgrid").kendoGrid
               ({
                    dataSource: dataSrc,
                    autoBind: false,
                    sortable: {
                                allowUnsort: false
                    },
                    columns: [ {
                        field: "Name",
                        width: 90,
                        title: "Name"
                    } ,{
                        width: 100,
                        field: "Role"
                    } , {
                        field: "Birthdate",
                        title: "Birth Date",
                     template: '#= kendo.toString(toDate(Birthdate), "yyyy/MM/dd")#'
                   } , {
                        width: 50,
                        field: "ID"
                   }
                   ]
               }) ;
               }  
               createGrid() ; 
               dataSrc.read();
               });               
            </script>
        </div>
</body>
</html>
Shirley
Top achievements
Rank 1
 asked on 14 Nov 2012
0 answers
108 views
Hello,

I have this scenario that user can highlight certain rows with different selectable colours and these colours must be stored in some db so that when user come again the particular row will show in the very same colour that he has selected earlier.

Thanks in advance
Awais
Top achievements
Rank 1
 asked on 14 Nov 2012
0 answers
144 views
Hello,

I have to add multiple column sorting in kendo grid. Let me explain a little bit more for example I have 4 columns in a grid Column Column B, Column C and Column D. Now if user sort grid with column A and then he select to sort grid with column B then the grid should be sort as AB. 

I hope I deliver my question.

Thanks in advance.


 
Awais
Top achievements
Rank 1
 asked on 14 Nov 2012
1 answer
371 views
I am trying to create a template that will read "This template is empty" when the data source is an empty array. Currently, my div is bound to the data source as follows:

<div data-bind="source: data"></div>

I have tried a number of different things including writing a function that returns an object that represents the data source I'm interested in:

function() {
var data = this.data;
if (data.length == 0) {
return [ { dataValue: "This template is empty." } ];
}
else {
return data;
}
};

How would I accomplish this? Thanks in advance.
Jamie
Top achievements
Rank 1
 answered on 14 Nov 2012
0 answers
95 views
Hi I have a number of templates on my website and have been asked to run the site through the W3c validator. I am still using XHTML 1.0 Transitional but the validator is throwing up a number of errors. The notable ones are "document type does not allow element "div" here" and "ID "myID" already defined". I know that the page works fine with these inside my template and I don't much mind that they are there but from a client point of view I cannot get rid of the errors from the page.

Has anyone come up with a way to escape the template scripts from the page so they don't appear in validation while still allowing the template to work correctly?

An example of one of my templates:
<script type="text/x-kendo-template" id="clickTemplate">
    <div class="resultLine" onclick="window.location = '${ data.oDataSourceURL }'">
        <a href="${ data.oDataSourceURL }">${data.oDataProductDesc}</a>
    </div>
</script>
Thanks in advance

Jamie
Jamie
Top achievements
Rank 1
 asked on 14 Nov 2012
1 answer
311 views
Hi,

     I have three chart with different ids in a page. At a time only one chart will be enabled and others are disabled.
     My requirement is how to get the clientside object of enabled chart. Chart has created using the kendo helper class.
     Please help me how to solve this issue.
Alexander Valchev
Telerik team
 answered on 14 Nov 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
Collapsible
Localization
MultiViewCalendar
Touch
Breadcrumb
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
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?