Telerik Forums
Kendo UI for jQuery Forum
2 answers
284 views
Hi all,

I am wondering is there any method to remove all record from dataSource ? and then sync(), so that it'll clear all record from DB .

Have scenario like i want to delete 500 records then add 20 - 30 records. I can do it with loop it causing delay. 

Please help me out

Thanks in Advance
Brett
Top achievements
Rank 2
 answered on 22 Mar 2013
1 answer
133 views
What is currently the recommended/supported method for getting data from a SharePoint 2010 list so as to place the items in a Kendo DataSource for display in a Kendo UI GridView?
Alexander Valchev
Telerik team
 answered on 22 Mar 2013
2 answers
1.1K+ views
I can't seem to find documentation that will help me to sort this out. I'm trying to populate a DropDownList with the wrapper:

@(Html.Kendo().DropDownList()
          .Name("DropDownListRoles")
          .DataTextField("RoleName")
          .DataValueField("Id")
          .DataSource(datasource => datasource
                                .Read(read => read.Action("GetRoles", "User"))
                                .ServerFiltering(true)
                            )
          .SelectedIndex(0)
         )

The ActionResult method seems straight-forward enough:

public ActionResult GetRoles()
        {
            var roles = UserService.GetRoles();
            return Json(roles.Select(role => new SelectListItem() { Text = role.RoleName, Value = role.Id.ToString() }), JsonRequestBehavior.AllowGet);
        }

The roles are retrieved from the data store, and the JSON seems to be getting sent back to the client, but the values show as "undefined" from the dropdownlist.

If I change ActionResult to JsonResult, I get the same result.

If you could give me some hints as to where my mistake is, I'd be grateful.

Thanks much, and regards...

-Zack
Zack
Top achievements
Rank 1
 answered on 22 Mar 2013
5 answers
157 views
I just updated to JQuery 1.9 and now I am seeing this bug.

Uncaught TypeError: Cannot read property 'msie' of undefined kendo.web.js:17
(anonymous function) kendo.web.js:17
(anonymous function) kendo.web.js:17

First of all, tsk tsk, for doing browser detection and not capability detection.  You want me to pay a grand for this?

Secondly fix this now!

That is all.

Thanks.
Danan
Top achievements
Rank 1
 answered on 22 Mar 2013
1 answer
211 views
Dear support & forum,

I'm trying to implement a very simple TreeView on my page that is bound to remote data. The underlying table Groups consists of these fields: Id, ParentId and Name. Using this structure, you can create hierarchies of groups.

Could you please provide working controller and client (razor) code that fetches the data and displays the names of the groups in a nested tree? I didn't manage to get along with your sample code as it doesn't show the whole story: database table, view model, controller and client code.

Thank you very much in advance for helping me with this for clarification!

Best regards,
Rob
Alex Gyoshev
Telerik team
 answered on 22 Mar 2013
4 answers
221 views
The TypeScript definition file seems to be incomplete. For example, both kendo.Router and kendo.Layout do not accept any argument. The constructor is missing.

Michael G. Schneider
Petyo
Telerik team
 answered on 22 Mar 2013
8 answers
561 views
Hi,
I am setting pagesize property of datasource of grid through java script, I need to trap in my java script that the ajax request for pagesize is completed. After just completing this Ajax request I need to fire a print. I need to have all the pages in the grid and the the print should get fire as I want tp print all the data of the grid.

Please find the attach code for the same.

Regards,
Nandan
Jeetendra
Top achievements
Rank 1
 answered on 22 Mar 2013
7 answers
244 views
It seems, as if Router.navigate would not fire the callback, if the route is already active. I prefered if this were different. Router.navigate should aways fire the callback. This would similar to refreshing a traditional HTML Page, although the anchor's href points to the current page.

Michael G. Schneider
Petyo
Telerik team
 answered on 22 Mar 2013
1 answer
382 views
I was trying to initialize a listview with data received from the server in two ways:

Initialization with "data-init" attribute
01....
02. 
03.<div data-role="view" data-layout="root" data-id="student" data-init="viewInit">
04.    <ul data-role="listview" data-style="inset">
05.    </ul>
06.</div>
07. 
08. 
09.<section data-role="layout" data-id="root">
10.    <header data-role="header">
11.        <div data-role="navbar">myapp</div>
12.    </header>
13. 
14.    <footer data-role="footer">
15.    </footer>
16.</section>
17. 
18.<script>
19.    var dataSource = new kendo.data.DataSource({
20.        transport: {
21.            read: {
22.                url: "@Url.Action("IndexJson", "Student")",
23.                contentType: "application/json; charset=utf-8",
24.                dataType: "json",
25.                type: "GET"
26.            }
27.        }
28.       });
29.    dataSource.read();
30.    function viewInit() {
31.        $("#listview").kendoMobileListView({
32.            dataSource: dataSource,
33.            template: $("#datatemplate").text()
34.        });
35.    }
36. 
37.</script>
38. 
39.<script type="text/x-kendo-tmpl" id="datatemplate">
40.    <div><a data-role="detailbutton" data-style="detaildisclose"></a><h3>${Name}</h3></div>
41.</script>
42. 
43. 
44.    <script>
45.        //alert("kendo.mobile.Application");
46.        var app = new kendo.mobile.Application(document.body,
47.        {
48.            transition: 'slide'
49.        });
50.    </script>
Initialization with "data-source" and "data-template"
01....
02. 
03.<div data-role="view" data-layout="root" data-id="student">
04.    <ul data-role="listview" data-style="inset" data-source="dataSource" data-template="datatemplate">
05.    </ul>
06.</div>
07. 
08.<section data-role="layout" data-id="root">
09.    <header data-role="header">
10.        <div data-role="navbar">myapp</div>
11.    </header>
12. 
13.    <footer data-role="footer">
14.    </footer>
15.</section>
16. 
17.<script>
18.    var dataSource = new kendo.data.DataSource({
19.        transport: {
20.            read: {
21.                url: "@Url.Action("IndexJson", "Student")",
22.                contentType: "application/json; charset=utf-8",
23.                dataType: "json",
24.                type: "GET"
25.            }
26.        }
27.       });
28.</script>
29. 
30.<script type="text/x-kendo-tmpl" id="datatemplate">
31.    <div><a data-role="detailbutton" data-style="detaildisclose"></a><h3>${Name}</h3></div>
32.</script>
33. 
34.    <script>
35.        //alert("kendo.mobile.Application");
36.        var app = new kendo.mobile.Application(document.body,
37.        {
38.            transition: 'slide'
39.        });
40.    </script>
The first way, the listview is not being populated, but the second is filling the listview... Why this happen?
Alexander Valchev
Telerik team
 answered on 22 Mar 2013
4 answers
737 views
I was fiddling around with the demo and discovered one can set a fixed height on the div containing the selected list items and set overflow to auto to enable vertical scrolling.  This allows rudimentary control over the height of the selections area.

Trouble is, the new item selection drops down when the scrollbar on the containing div is clicked.  Also the div does not scroll down to the last selected item as items are selected.  If we could use the scrollbar without the item selection dropping down and have the div auto-scroll down to the last selected item we'd have a solution!

It'd be awesome to have an example or two controlling demonstrating this, or a similar solution to control how the MultiSelect grows in height.
Dimo
Telerik team
 answered on 22 Mar 2013
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
Drag and Drop
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
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
Licensing
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
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?