Telerik Forums
Kendo UI for jQuery Forum
0 answers
152 views
Hello,

I playing around with the validations and found it great.
I want to suggest some additions to its functionality.
1. hide the validation message after a specified amount of time
2. hide the validation messages when typing in...

Regards
Peter
Peter
Top achievements
Rank 1
 asked on 05 Feb 2012
0 answers
59 views
Thanks
Ben
Top achievements
Rank 1
 asked on 04 Feb 2012
0 answers
104 views
Could someone please explain how this works.  i.e. updates to the datasource both in terms of more items add and modifications to the idems added.

Many thanks
Ben
Top achievements
Rank 1
 asked on 04 Feb 2012
4 answers
265 views
In my cases, I need to assign additional field's value when user select a result from the hint list.  For example, 
<script>
    $(function () {
        $("#tCode").kendoAutoComplete({
            dataTextField: "Code",
            dataSource: [ { Code:"10", Name:"Jeffrey" }, { Code:"11", Name:"Jack" }]
        });
    });
</script>
<input id="tCode" /><input id="tName" />

When "10" is selected, tName's value should be "Jeffrey", when "11" is selected, tName's value should be "Jack".

Here is my suggestion: adding a select event in kendo.autocomplete.js
if (separator) {
    text = replaceWordAtCaret(caretPosition(that.element[0]), that.value(), text, separator);
}
//2012-01-18 by Jeffrey Lee
//when item is selected, trigger select event with data as argument
if ($.isFunction(that.options.select))
    that.options.select(data);
 
that.value(text);
that.current(li.addClass(SELECTED));

After adding the "select" event, it's quite easy to  implement the "field-linking" by add select parameter in options:
<script>
    $(function () {
        $("#tCode").kendoAutoComplete({
            dataTextField: "Code",
            dataSource: [{ Code: "10", Name: "Jeffrey" }, { Code: "11", Name: "Jack"}],
            //new "select" event triggered when hint item is selected
            select: function (data) { $("#tName").val(data.Name); }
        });
    });
</script>
<input id="tCode" /><input id="tName" />

Any feedback is welcome.
Jeffrey
Top achievements
Rank 1
 answered on 04 Feb 2012
2 answers
390 views
Hello,
is there a way to set a width to this UI control ? For long strings, it's not very good with the basic width.

I tried with CSS but it's quite buggy (and there's no width property in the documentation)
Radoslav
Top achievements
Rank 1
 answered on 03 Feb 2012
5 answers
296 views
  The grid has been initialized, so:

    $(document).ready(function()
    {
        $("#foo-grid").kendoGrid(
      { height: 360,
          groupable: false,
          scrollable: true,
          sortable: true,
          pageable: true,
          columns:[
              {
                  field: "id",
                  title: "id"
              },
              {
                  field: "baz",
                  title: "chosen"
              }   
          ]
      });
 });

And later, based on user-interaction with the page, some data are fetched in JSON format from a generic handler (ashx) and are passed to the function below, in the params object:

   function populateGrid(event, params) {
        // at this juncture, examination in the debugger confirms that params.data contains an array of json objects
        // [ {"id":1, "baz": true }, {"id":2, "baz": true}, {"id":3, "baz": false},.{"id":4, "baz": true }]
         var grid = $("#foo-grid).data("kendoGrid");   // get a handle to the grid
         grid.dataSource = { data: params.data, pageSize: 25 };
    }

I get a handle to the grid and then assign its dataSource object via the API, but nothing happens. Instead of instantiating the grid when the document is ready and then later trying to set its dataSource, should I wait to instantiate the grid object inside the function above and populate it all in one fell swoop? If so, how do I completely destroy the grid?  The user may make multiple queries, and the grid would then have to be reinstantiated and repopulated several times.
Tim R
Top achievements
Rank 1
 answered on 03 Feb 2012
2 answers
258 views
Hello everybody,
i have problem with load json data to grid from url.
 
index.html
<!DOCTYPE html>
<html>
    <head>
        <title>Test</title>
        <script src="source/jquery.min.js"></script>
        <script src="source/kendo.all.js"></script>
        <script src="scripts.js"></script>
        <link href="styles/kendo.common.min.css" rel="stylesheet" />
        <link href="styles/kendo.default.min.css" rel="stylesheet" />
    </head>
    <body>
        <div class="main">
            <div class="header">
                <img src="styles/image/kendo-logo-big.png" class="logo" />
                <h1>Kendo UI Grid</h1>
            </div>
             
            <div id="grid">
                <table id="weapons">
                    <tr>
                        <th data-field="name">Name</th>
                        <th data-field="desc">Description</th>
                    </tr>
                </table>
            </div>         
        </div>
    </body>
</html>

scripts.js
$(document).ready(function() {     
    dataSource = new kendo.data.DataSource({
        transport: {
            read: {
                url: "http://dhpl.comuf.com/json.php",             
                dataType: "json"
            }
        },
        schema: {
            data: "results"
        }
    });
 
    $("#weapons").kendoGrid({
        dataSource: dataSource
    });
});

json.php
<?php
    header("Content-type: application/json");
    print('{ "results" : [{ "name" : "Name1", "desc" : "Desc1" }, { "name" : "Name2", "desc" : "Desc2" }] } ');
?>


Url http://dhpl.comuf.com/json.php it's working if you want to check.

Could anybody help me
Thanks
Andrew
Top achievements
Rank 1
 answered on 03 Feb 2012
0 answers
162 views
Hello

I have an issue with a grid inside a panelbar's content

If a user selects items in the grid and then expands another item in the panel bar, the selections in the grid are lost (so is the scrollbar position).

Is this just a side effect of the grid being hidden?

If so I guess the solution would be to save all selections on a PanelBar click and then restore them.

Just wanted to know if there is an easier solution :)

Rgds,
Kristoffer
Kristoffer
Top achievements
Rank 1
 asked on 03 Feb 2012
1 answer
208 views
There seems to be a bug with the details row in a Kenodo Grid when it is created using an existing html <table>.  If fails to create a column header for the expand/collapse marker and uses the first data column instead (in the example "One").  This gives me 3 column headers, but 4 data columns for each row, my 3 plus the expand/collapse column.

One --> Two --> Three
 >    -->  1 -> 2 -> 3

<table id="grid">
    <thead>
        <tr>
            <th data-field="one">One</th>
            <th data-field="two">Two</th>
            <th data-field="three">Three</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>1</td><td>2</td><td>3</td>
        </tr>
        <tr>
            <td>1</td><td>2</td><td>3</td>
        </tr>
    </tbody>
</table>
  
<script>
    $(document).ready(function() {
        var element = $("#grid").kendoGrid({
            height: 450,
            sortable: true,
            detailInit: detailInit
        });
    });
  
    function detailInit(e) {
    }
</script>
Nikolay Rusev
Telerik team
 answered on 03 Feb 2012
0 answers
135 views
Hi All,

I have a grid bound to local data, and am using a RowTemplate to render the results.

When I use the grouping functionality a few things happen:
  1. I cannot collapse a group
  2. The first column in the grid becomes very small, hiding the contents of that column.
  3. In my real-world code the Group Name shows up as "undefined", but I can't reproduce that in the example.
I have attached a sample project.  Try grouping by LastName to see what I mean.

Thanks in advance for any help!


EDIT: After a little more investigation, it seems that using the RowTemplate is causing the grouping behavior.  If I take the RowTemplate out, the grouping works great (aside from the first column being shortened).  In my scenario - I really think I need to use the RowTemplate.  Is this a bug, or can I build my RowTemplate differently to avoid this grouping behavior?
Matt
Top achievements
Rank 1
 asked on 03 Feb 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
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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
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
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
ContextMenu
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
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?