Telerik Forums
Kendo UI for jQuery Forum
6 answers
135 views
Hi,
I don't have access to internal buid (I will consider this once i have review the mobile library).
Can you tell me if a corrected version of datepicker will be available soon ?

Best regards

Fabrice
Kumarasen
Top achievements
Rank 1
 answered on 17 Sep 2012
1 answer
329 views
Hi,

after some days of trying I finally managed to display a TreeView by transforming database entries to a treeview structure and pass it to the view inside a viewmodel.

Model:
public class LibraryTreeFormModel
{
    public int LibraryTreeNodeId { get; set; }
 
    public bool AddNode { get; set; }
    public bool DeleteNode { get; set; }
    public bool RenameNode { get; set; }
 
    public string Title { get; set; }
 
    public List<TreeNodesStruct> Tree { get; set; }
}
 
public struct TreeNodesStruct
{
    public int LibraryTreeNodeId { get; set; }
    public string Title { get; set; }
    public int? ParentNodeId { get; set; }
    public List<TreeNodesStruct> ChildNodes { get; set; }
}


View:
<% bool isCalledFirstTime = true; %>
 
 <%
     Action<List<KellyServices.Website.Areas.Admin.Models.TreeNodesStruct>> libraryTreeNodeMacros = null;
     libraryTreeNodeMacros = libraryTreeNodes =>
     { %>
            <% if (isCalledFirstTime)
               { %>
            <ul id="treeView">
            <% isCalledFirstTime = false;
               }
               else
               { %>
            <ul>
            <%} %>
            <% foreach (var c in libraryTreeNodes)
               { %>
                <li data-id="<%= c.LibraryTreeNodeId.ToString() %>"><img style="vertical-align: middle" src="<%: Url.Content("~/Content/images/filesystem_folder_yellow_small.png") %>" /> <%= Html.Encode(c.Title)%>
                <% if (c.ChildNodes != null && c.ChildNodes.Count() > 0) libraryTreeNodeMacros(c.ChildNodes);  %>
                </li>
            <% } %>
            </ul>
        <% }; %>
 
    <% var libraryTreeNodesSub = Model.Tree; %>
    <% libraryTreeNodeMacros(libraryTreeNodesSub); %>

Controller:
public TreeNodesStruct RecursiveTreeChildGetter(TreeNodesStruct root, ICollection<LibraryTreeNode> allNodes)
        {
            var childs = allNodes.Where(n => n.ParentNodeId == root.LibraryTreeNodeId);
 
            if (childs != null && childs.ToList().Count > 0)
            {
                if (root.ChildNodes == null)
                {
                    root.ChildNodes = new List<TreeNodesStruct>();
                }
 
                foreach (LibraryTreeNode child in childs)
                {
                    TreeNodesStruct treeChild = new TreeNodesStruct();
                    treeChild.ChildNodes = new List<TreeNodesStruct>();
                    treeChild.LibraryTreeNodeId = child.LibraryTreeNodeId;
                    treeChild.Title = child.Title;
                    treeChild.ParentNodeId = child.ParentNodeId;
                    root.ChildNodes.Add(treeChild);
                    treeChild.ChildNodes = RecursiveTreeChildGetter(treeChild, allNodes).ChildNodes;
                }
            }
             
            return root;
        }
 
        public ActionResult LibraryTreePartial()
        {
            List<TreeNodesStruct> tree = new List<TreeNodesStruct>();
            ICollection<LibraryTreeNode> nodes = libraryTreeNodeService.GetAllItems();
 
            var roots = nodes.Where(n => n.ParentNodeId == null);
 
            foreach (LibraryTreeNode root in roots)
            {
                TreeNodesStruct treeRoot = new TreeNodesStruct();
                treeRoot.ChildNodes = new List<TreeNodesStruct>();
                treeRoot.LibraryTreeNodeId = root.LibraryTreeNodeId;
                treeRoot.Title = root.Title;
                treeRoot.ChildNodes = RecursiveTreeChildGetter(treeRoot, nodes).ChildNodes;
                tree.Add(treeRoot);
            }
 
            var viewModel = new LibraryTreeFormModel();
            viewModel.Tree = new List<TreeNodesStruct>();
            viewModel.Tree = tree;
 
            return View(viewModel);
        }

I can get the selected node ID via javascript:
function initTreeview() {
        var treeview = $("#treeView").kendoTreeView({           
            select: function (e) { addNewNode($(e.node).data("id")); }
        });
    }

My question now is, how can I pass the selected node ID to the view model? I cannot do so in the javascript, for the model is not accessible within the script.

What I want to do is pass the selected node and the value from a textbox to the controller so that the user is able to create new subnodes. Any suggestions or workarounds?

Regards

Stefan
Stefan Binder
Top achievements
Rank 1
 answered on 17 Sep 2012
1 answer
253 views
How can i limit the number of files to upload with the KENDO Upload widget?
Nohinn
Top achievements
Rank 1
 answered on 17 Sep 2012
21 answers
585 views
Hi,

I found this documentation for information to create KendoUI grid with CRUD operations. It seems that there is Product model behind this. But I did not find any information or examples about how to create kendo.data.model for remote data (Odata service).  Could anyone help with this?

read:   "/Products",
         update: {
            url: "/Products/Update",
            type: "POST"
         },
         destroy: {
             url: "/Products/Destroy",
             type: "POST"
          },
          create: {
              url: "/Products/Create",
              type: "POST"
           }

BR
Marko
Nikolay Rusev
Telerik team
 answered on 17 Sep 2012
5 answers
410 views
It seems that the current uploader is not working in IE9 (kendo v2012.2.723.)  I'm using async and have a Java back end that sends back a simple success message to the browser in the form of a json object when and upload is successful.  It seems that after you click the upload button and the file succeeds IE wants to send the response back to the hidden iframe in the browser.   You get a prompt that asks you to save the json file and neither the handle success or handle complete events are triggered  even though the upload was successful.  The upload wait animation never goes away either so it looks like the app is stuck even though it all succeeded. 
Dmitry
Top achievements
Rank 1
 answered on 17 Sep 2012
1 answer
89 views
HI,

Is it possilble to package up the associated unit tests with the KendoUI packages?  Other vendors, e.g. Sencha do this. It makes for a better developer experience being able to see the tests along with the code.

Thanks,

Richard
Iliana Dyankova
Telerik team
 answered on 17 Sep 2012
4 answers
148 views
Grid grouping doesn't work with jQuery 1.8
Works as expected with 1.7.1
Dave
Top achievements
Rank 1
 answered on 17 Sep 2012
4 answers
334 views
When I set the navbar title in HTML or via JavaScript
$("#resultsViewNavBar").data("kendoMobileNavBar").title(currentUser);

... it will just not be displayed/shown on Android devices. Is this by design?
If yes: can we change/enable/override this behavior?

Thanks.
Kamen Bundev
Telerik team
 answered on 17 Sep 2012
0 answers
128 views
HI,

i am planning to use Scrollview control for my mobile app. i tried scroll view in html page of normal aspx app, it is working.

we are planning to create a mobile app using MVC3. i tried the scroll view and mobile swith with mvc 3, it is not working.

How to get these controls with MVC 3. 

Is it working with MVC 3?

Kindly let me know the details.

Thanks,
Uma
Uma
Top achievements
Rank 1
 asked on 17 Sep 2012
3 answers
101 views
I have a modal window that displays a customer's details.  In this window there is a tab strip with several pages and one of the pages (divs) currently has a grid.  The problem is the grid when set to scrollable is not appearing correctly.  The scroll bars run off the bottom of the grid's content background and the content itself extends past the background.  Changing the sizes of the grid and the table does not fix the issue.  When I remove the grid's table element and place it directly on the page it works fine.  Please see the attached image for an example of the problem.
Remco
Top achievements
Rank 1
 answered on 17 Sep 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
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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?