Telerik Forums
Kendo UI for jQuery Forum
2 answers
1.0K+ views
Hello,
i'm searching for the good method to select a row in my grid, based on an identifier (a product's reference).
My datasource is an xml file. In the sample, I used the books.xml from Kendo and the searching should be based on the 'reference' column.
All samples I've found used a filter, but I just need to select the first row which match, not filtering all data.
Is there a good method to do that ?
Thanks in advance

function selectByref (theReference)
{
var row = $("#grid").data("kendoGrid").table.find('tr[reference="' + theReference+ '"]');
$("#grid").select (row);
}
          var theGrid = $("#grid").kendoGrid({
              dataSource: {
                  //data: movies,
                  transport: {
                      read: {
                          url: "http://demos.kendoui.com/content/web/datasource/books.xml",
                          dataType: "xml"
                      }
                  },
                  schema: {
                      // specify the the schema is XML
                      type: "xml",
                      // the XML element which represents a single data record
                      data: "/books/book",
                      // define the model - the object which will represent a single data record
                      model: {
                          // configure the fields of the object
                          fields: {
                              // the "title" field is mapped to the text of the "title" XML element
                              reference: "title/text()",
                              // the "author" field is mapped to the text of the "author" XML element
                              author: "author/text()",
                              // the "url" field is mapped to the text of the "url" XML element
                              link: "url/text()",
                              // the "cover" field is mapped to the "id" attribute of the "book" XML element
                              image: "@cover"
                          }
                      }
                  }
              },
              //change: onChange,
              sortable: true,
              filterable: false,
              selectable: "multiple row",
              scrollable: true,
              columns: [
                  {
                      field: "reference",
                      title: "Référence"
                  },
                  {
                      field: "author",
                      title: "Auteur"
                  },
                  {
                      field: "link",
                      title: "Lien"
                  },
                  {
                      field: "image",
                      title: "Image"
                  }
              ]
          });

Thierry
Top achievements
Rank 1
 answered on 15 Mar 2012
2 answers
730 views
HI Folks,

I am new to kendo ui and i am using the file upload plugin in my asp.net mvc application.Everything works like a dream.But i have one additional requirement. When i am uploading the file i am assigning a unique image guid to the image file and uploading and then returning to the callback function.Here is my code.

<script type="text/javascript">
    $(document).ready(function () {
        $("#attachments").kendoUpload({
            async: {
                saveUrl: '@Url.Action("UploadBlogImages", "Blog")',
                removeUrl: '@Url.Action("Remove", "Blog")',
                autoUpload: true
            },
            success: function (data) {
                var imageGuids = data.response;
                $.each(imageGuids, function (index, imageGuid) {
                    $('#form_uploadPic').append('<input type="hidden" value=' + imageGuid + 'name="ImgGuid">');
                });
            }
        });
    });
</script>
I need to delete the file when the user clicks the remove button but my problem is,
by default the remove button passes the name of the file(that was used at the time of upload)as the file name to delete.But I am
renaming the file before uploading to server.I am assigning a unique guid to file.I have returned that guid to the success function.How do i configure so that the remove button passes that guid to server for deleting the file.

Thanks,
S


T. Tsonev
Telerik team
 answered on 15 Mar 2012
2 answers
114 views
Hello All,

I have a grid with a "change" event.  In the "detailInit" event of that grid, I add a details grid, which also has a "change" event.  Both grids have "selectable" property set to true.  However, ONLY the parent grid's "change" event fires, no matter if I select a row on the parent grid or on the details grid.  Detail grid's "change" event never fires.

Could someone please tell me what I can do to fix this?

Thank you very much.
Nikolay Rusev
Telerik team
 answered on 15 Mar 2012
2 answers
96 views
Hi Kendo Team,
When I set navigatable to true, the numeric and date editors in cell don't work properly. For example, calendar doesn't open when I click its icon.
This happens with FireFox and Chrome/Safari. 
IE8, IE9 and Opera work fine.

Kind Regards,
Oscar

Nikolay Rusev
Telerik team
 answered on 15 Mar 2012
2 answers
192 views
In this thread http://www.kendoui.com/forums/ui/dropdownlist/unable-to-scroll-on-ipad.aspx#1997491 I read that I should add kendo.mobile.core.js and kendo.mobile.scroller.js to enable scrolling in a dropdownlist in tablet devices.
What other scroll functionality is added to your app when you include these files?
Can't find documentation on this.

For example I want in my grid or listview better touch scrolling.
Currently you can scroll (at least in the grid, listview not yet tested), but it follows exactly your finger, so when you lift your finger scrolling stops immediatly. Would be a better experience when it keeps scrolling, depending on the speed of your touchmove and then slowing down in speed with a certain negative accelaration.

Regards, Jaap
Jaap
Top achievements
Rank 2
 answered on 15 Mar 2012
1 answer
96 views
Does Kendo support me somehow with touch gestures (on tablets like iPad)?
I want in my Single Page Application use the flick left and flick right gestures to go to another view in my application.
In fact I need the swipeleft and swiperight events like jQuery mobile has: http://jquerymobile.com/demos/1.0a4.1/docs/api/events.html
Any hint on how to work with that?

Regards, Jaap
Petyo
Telerik team
 answered on 15 Mar 2012
3 answers
513 views
I'm implementing a sample app using Kendo UI with Django (Python) and am getting the following error in Firebug when I attempt to bind to remote data:

url is not defined
return new Function(paramName, functionBody);  kendo.core.js (line 246)

However, when I use jQuery.ajax to get the data and then bind to the response from the jQuery.ajax call as local data, everything works fine.

Here are the Request Headers:
Host    127.0.0.1:8000
User-Agent  Mozilla/5.0 (X11; Linux i686; rv:8.0.1) Gecko/20100101 Firefox/8.0.1
Accept  */*
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip, deflate
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection  keep-alive
X-Requested-With    XMLHttpRequest
Referer http://127.0.0.1:8000/widgets/
Cookie  csrftoken=c5bf8586527ebfb8802391168634cfdf; sessionid=aafd686e68f8e4069c84e8412ee98e65

Here are the Response Headers:
Date    Tue, 29 Nov 2011 13:35:58 GMT
Server  WSGIServer/0.1 Python/2.7.2
Content-Type    application/javascript

Here is the Response:
[{"url": "http://demos.kendoui.com/autocomplete/index.html", "id": 1, "name": "AutoComplete"}, {"url": "http://demos.kendoui.com/calendar/index.html", "id": 2, "name": "Calendar"}, {"url": "http://demos.kendoui.com/chart/index.html", "id": 3, "name": "Chart"}, {"url": "http://demos.kendoui.com/combobox/index.html", "id": 4, "name": "ComboBox"}, {"url": "http://demos.kendoui.com/datepicker/index.html", "id": 5, "name": "DatePicker"}, {"url": "http://demos.kendoui.com/dropdownlist/index.html", "id": 6, "name": "DropDownList"}, {"url": "http://demos.kendoui.com/grid/index.html", "id": 7, "name": "Grid"}, {"url": "http://demos.kendoui.com/menu/index.html", "id": 8, "name": "Menu"}, {"url": "http://demos.kendoui.com/panelbar/index.html", "id": 9, "name": "PanelBar"}, {"url": "http://demos.kendoui.com/splitter/index.html", "id": 10, "name": "Splitter"}, {"url": "http://demos.kendoui.com/tabstrip/index.html", "id": 11, "name": "TabStrip"}, {"url": "http://demos.kendoui.com/treeview/index.html", "id": 12, "name": "TreeView"}, {"url": "http://demos.kendoui.com/upload/index.html", "id": 13, "name": "Upload"}, {"url": "http://demos.kendoui.com/window/index.html", "id": 14, "name": "Window"}]

And finally, here is the grid definition:
$('#widgetsGrid').kendoGrid({
    dataSource: {
        type: 'json',
        transport: {
            read: '/widgets/widgetsList/'
        },
        pageSize: 10
    },
    columns: [
        {
            field: 'name',
            title: 'Name'
        },
        {
            field: 'url',
            title: 'Url'
        }
    ]
});

This is what I needed to do to get it to work:
$(document).ready(function() {
    $.ajax({
        url: '/widgets/widgetsList/',
        contentType: 'application/json; charset=utf-8',
        type: 'GET',
        dataType: 'json',
        success: function(response) {
            // console.log(response);
            $('#widgetsGrid').kendoGrid({
                dataSource: {
                    data: response,
                    pageSize: 10
                },
                columns: [
                    {
                        field: 'name',
                        title: 'Name'
                    },
                    {
                        field: 'url',
                        title: 'Url'
                    }
                ]
            });
        },
        error: function(xhr, status) {
            console.log(status);
        }
    })
});

I would prefer to bind to the data remotely by setting the dataSource.transport configuration setting.  Any ideas?

Regards,

John DeVight

Complete source code and explanation of this sample project can be found here
Ben
Top achievements
Rank 1
 answered on 15 Mar 2012
2 answers
119 views
Hi,
I have a listview set up to display the data as below:
template: "<a href='details.htm?id=${data.id}'>${data.subject}</a>",

but all I get is the actioning page with #details.htm?id=5 tacked on the end.

It seems to think that i am calling a local view when I want to call a remote one...how can I get this to work.
Roger
Top achievements
Rank 1
 answered on 15 Mar 2012
3 answers
267 views
I'm trying to use the KendoUI Grid within a site that also utilizes Twitter's Bootstrap framework. Unfortunately, the header for the grid is distorted (it's taller than it should be), and the rows are not visible. I suspect there is a CSS conflict with Bootstrap--anybody experience this as well, and have a workaround?
Jonathan
Top achievements
Rank 1
 answered on 14 Mar 2012
1 answer
105 views
Trying to get a column filtered to be between two ranges, but it only applies the first filter.

Half borrowed jsfiddle:

http://jsfiddle.net/BmGHB/1/

You can see that if you click the button, then examine the filter using the filter icon on the grid itself, only the first filter has been applied.

Any suggestions?
Daniel
Top achievements
Rank 1
 answered on 14 Mar 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
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?