Telerik Forums
Kendo UI for jQuery Forum
1 answer
188 views
Hello,
I have been working with a treeview and a JSON file for the remote data source.
Of what I know the real time current data source of the tree can be accessed through:
$("#treeview").data("kendoTreeView").dataSource.data()
So I make some drag and drop changes but if the changes are made inside parent nodes then the current data doesn't change at all.
However if I drag and drop a node in the root node directory or outside of it,the current data seems to have the node copied in that position without deleting the initial one..

So the current data source seems to track only the changes made in the root node directory or outside of it,and even then the dragged nodes are copied and not moved.(even though visually they are moved through the drag ofcourse)

Is this a bug or am I doing something wrong here?

What I want is to modify the tree with drag and drops and then somehow save the progress so I can view the same modified tree even after refresh.
Is there any other way to do this?
Thanos
Top achievements
Rank 1
 answered on 12 Nov 2012
1 answer
104 views
Hi all,

I am excited about the prospect of using KendoUI and am in my trial, but I can't even make a simple tabstrip UI page work correctly. I was following along with the intro tutorial here: http://docs.kendoui.com/howto/build-apps-with-kendo-ui-mobile

Couldn't get that to work. CSS works and the widgets are there, but when I click on the About tab the about.html is appended to the URL, but I don't actually go to the about.html page. 

I decided to rip open the sample apps and take a look. I changed my index.html around to try to load a different view when clicking on the about tabstrip:

<!DOCTYPE html>
<html>
<head>
    <title>My App</title>
     
    <link href="css/kendo.mobile.all.min.css" rel="stylesheet" />
</head>
<body>
    <div data-role="view" data-layout="default">
        Hello Mobile World!
    </div>
 
    <div data-role="view" id="about" data-title="About">
        About this app.
    </div>
 
    <div data-role="layout" data-id="default">
        <header data-role="header">
            <div data-role="navbar">My App</div>
        </header>
        <!-- View content will render here -->
        <footer data-role="footer">
            <div data-role="tabstrip">
                <a href="#">Home</a>
                <a href="#about">About</a>
            </div>
        </footer>
    </div>
     
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="js/kendo.mobile.min.js" type="text/javascript"></script>
 
    <script>
        var app = new kendo.mobile.Application();
    </script>
</body>
</html>

I get the about view to load, but not "inside" of the layout, the screen is white, no title bar and just has the about text.

So, am I going mad? Any ideas are welcome. Thanks!
Daniel
Telerik team
 answered on 12 Nov 2012
2 answers
109 views


Posted 3 hours ago (permalink)

Hi all,

I'm using the latest Community version of Kendo UI Web and trying something with the form-table.html.
Now when I re size the browser it short the header-text of the table. Ex. Rating --> Ra....
How can I stop this?

Thanks for your replies!
Mark
Mark
Top achievements
Rank 1
 answered on 12 Nov 2012
1 answer
230 views
Hello,
I have an issue I am experiencing with the numeric textbox when I am attempting to display 9 decimal places with the markup snippet below.

<input data-role='numerictextbox' data-format='n9' data-min='0' data-decimals='9'


I get 9 decimal places when editing the textbox as show in the attachment "capture" however when I am not actively editing it the textbox is rounded to 2 decimal places as shown in the attachment "capture2".  I am looking to always have the field display 9 decimal places does anyone have any suggestions?

Georgi Krustev
Telerik team
 answered on 12 Nov 2012
1 answer
565 views
Hello,

I'm new to the Kendo UI stuff, so please forgive me if this is an easy one; I've been trying to find some details that might tell me what I'm doing wrong, but nothing so far.

Based on radio selection I need to populate the dropdownlist values and grid. I am binding the values to dropdownlist and grid using Viewdata. Initially while loading the View there is no probelm grid and dropdownlist are loaded perfectely. but when i change the radio selection, it is not updating the grid and drodown list but data is reflected in view data.

usign this below function i am calling the controller

function Frequency(Mode) {
        var json = {
            'Frequency': Mode
        }
        $.ajax({
            url: '@Url.Action("Index", "Pricing")',
            type: 'Post',
            data: json,
            success: function (data) {
                $("#cboPricingDates").data("kendoDropDownList").dataSource.read();
                $("#PricingGrid").data("kendoGrid").dataSource.read();
                alert("OK");
            }
        });
    }

and this is my controller

 [HttpPost]
        public ActionResult Index(string Frequency)
        {
            LoadFundDates(Frequency); // this will update the viewdata of dropdown and viewdata of grid
           return View();
        }

and my dropdownlist in view

   @Html.Kendo().DropDownList().Name("cboPricingDates").BindTo((IEnumerable<SelectListItem>)ViewData["PricingDates"])

and my grid

 @{Html.Kendo().Grid((List<SAM.Enrol.Prg.Contract.VendorPricingGrid>)ViewData["PricingGrid"])
        .Name("PricingGrid")
        .DataSource(dataSource => dataSource
           
            .Ajax()
            .PageSize(25)
            .Model(q => q.Id(m => m.ProdId))
            .Model(q => q.Id(m => m.Ccy))
             .Model(q => q.Id(m => m.Cat))
            
                )
               
        .Columns(columns =>
        {
           // Columns goes here
        
        })
            


          .Resizable(resizing => resizing.Columns(true))
          .Scrollable(scrolling => scrolling.Enabled(true).Height(600))
          .Sortable(sorting => sorting.Enabled(true))
          .Groupable(grouping => grouping.Enabled(true))
          .Filterable(filtering => filtering.Enabled(true))
          .Reorderable(reorder => reorder.Columns(true))
          .Pageable(Pageable => Pageable.Enabled(true).PreviousNext(true).Input(true).PageSizes(true).Refresh(true))
          .RowAction(row => row.HtmlAttributes.Add("data-id", row.DataItem.ProdId))
          .RowAction(row => row.HtmlAttributes.Add("data-id", row.DataItem.Ccy))
          .RowAction(row => row.HtmlAttributes.Add("data-id", row.DataItem.Cat))
                      .Selectable(s => s.Mode(GridSelectionMode.Single).Enabled(true))
                      .Render();
                      }

Please help me to resolve this issue.


Georgi Krustev
Telerik team
 answered on 12 Nov 2012
1 answer
127 views
I notice that the Kendo Custom Download tool does not include the DateTimePicker.


I tried using a Custom Download that just included everything, and one of my pages that uses the DateTimePicker broke.

http://www.kendoui.com/custom-download.aspx


Is there a recommended workaround for this?
Georgi Krustev
Telerik team
 answered on 12 Nov 2012
2 answers
693 views
I'm creating an ASP.NET MVC3 web app with Kendo UI and I love it.
Here is an issue I'm trying to resolve at the moment:

1. I have a main screen with a grid and custom command/action
{ command: { text: "Unwind", click: showUnwind }, title: "&nbsp;", width: "50px" },

2. Once I trigger that I display my window
    function showUnwind(e) {
        e.preventDefault();
 
        var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
        var selImagineSNum = dataItem["ImagineSNum"];
 
        var direction = _rootUrl + "CFD/GetUnwindWindowContent/" + selImagineSNum;
        var wnd = $("#unwindWindow").data("kendoWindow");
 
        if (!wnd) {
            // first click of the button - will automatically fetch the contentUrl
            wnd = $("#unwindWindow").kendoWindow({
                title: "Unwind Trade",
                actions: ["Minimize""Maximize""Close"],
                content: direction,
                width: "800px",
                height: "600px",
                visible: false,
                modal: true
            }).data("kendoWindow");
        } 
        
        wnd.refresh(direction);
        wnd.center();
        wnd.open();
    }

3. The direction above points ot an MVC action that returns an ActionResult with the following markup:
 
@{
    Layout = null;
}
 
<div style="margin5px 5px 0 5px;">
    @* Header *@
    <table class="table table-condensed">
        <tr><th>PrcmNum</th><th>ImagineSNum</th><th>PrimeBroker</th><th>Fund</th><th>Trade Date</th><th>Setl. Date</th></tr>
        <tr><td>@ViewBag.Id</td><td>@ViewBag.Id</td><td>PrimeBroker</td><td>Fund</td><td>01/01/2012</td><td>01/02/2012</td></tr>
    </table>
 
    @* Grid *@
    <p class="help-block">Associated trades based on: Fund, Prime Broker & PrcmNum</p>
    <div id="gridAssoc"></div>
</div>
 
<script type="text/javascript">
    CFDUnwind.init();
    /*
    $(function () {
        CFDUnwind.init();
    });
    */
</script>
4. The CFDUnwind.init() method is in CFD.Unwind.js and that file is of course already loaded. The code is:

var CFDUnwind = {};
 
CFDUnwind._assocTradesDataSource = null;
 
// *** Initialize the CFD partial view
CFDUnwind.init = function () {
 
    // ** DataSource for the CFD Trades
    CFDUnwind._assocTradesDataSource = new kendo.data.DataSource({
        transport: {
            read: {
                type: "POST",
                url: _rootUrl + "CFD/GetAssocCFDTradesPOST",
                dataType: "json"
            }
        },
        schema: {
            model: {
                id: "ImagineSNum",
                fields: {
                    Confirmed: { editable: true, type: "boolean" },
 
                    PrcmNum: { editable: false, type: "number" },
                    ImagineSNum: { editable: false, type: "number" },
 
                    Fund: { editable: false, type: "string" },
                    Strategy: { editable: false, type: "string" },
                    Folder: { editable: false, type: "string" },
                    Name: { editable: false, type: "string" }
                }
            }
        }
    });
 
    // ** Grid widget
    $("#gridAssoc").kendoGrid({
        dataSource: CFDUnwind._assocTradesDataSource,
        navigatable: true,
        selectable: "single",
        height: 280,
        resizable: true,
        sortable: {
            mode: "single",
            allowUnsort: false
        },
        columns: [
            {
                field: "Confirmed", title: "&#10003", width: 15,
                template: '<input type="checkbox" #= Confirmed ? checked="checked" : "" # ></input>'
            },
            { field: "PrcmNum", title: "PrcmNum", width: 45 },
            { field: "ImagineSNum", title: "ImagineSNum", width: 45 },
 
            { field: "Fund", title: "Fund", width: 55 },
            { field: "Strategy", title: "Strategy", width: 55 },
            { field: "Folder", title: "Folder", width: 55 },
            { field: "Name", title: "Instr. Name", width: 60 }
        ],
        dataBound: function (e) {
            // console.log("gridAssoc dataBound event");
        }
    });
 
}

5. Things are beautiful 90% of the time -- I get my grid in the Window and the data is loaded with an ajax call. The problem is that sometimes I get picture: issue2.jpg, but would like to always get: correct1.jpg :)
Now, what is interesting is that if I click again to display the window the problem disappears;
I get the issue only after initialization and not always...

Hhh, please advise.

~ Boris
angella
Top achievements
Rank 1
 answered on 12 Nov 2012
0 answers
189 views
I got Sorting and filtering working with WebAPI.
I am not able to get paging to work.
Not matter what value i use(i have tried litral values like 10) the grid always display 0 pages ().
What could i be doing wrong
$(document).ready(function () {
                   $("#grid").kendoGrid({
                       dataSource: {
                           type: 'odata',
                              transport: {
                               read: {
                                   url: "http://localhost:13059/api/Addressbook",
                                   contentType: "application/json; charset=utf-8",
                                   dataType: "json",
                                   type:"GET",
                                   data: {}
 
                               },
                              parameterMap: function (options, type) {
                                   var paramMap = kendo.data.transports.odata.parameterMap(options);
 
                                   delete paramMap.$inlinecount; // <-- remove inlinecount parameter.
                                   delete paramMap.$format; // <-- remove format parameter.
                                  //paramMap.$includeTotalCount= "True";
                                   return paramMap;
                               }
                              },
                           success: function (e) {
                               alert("Success: " + e.error);
                           },
                           error: function (e) {
                               debugger;
                               alert("Error: " + e.errorThrown);
                           },
                           change: function (e) {
                             //  alert("Change");
                           },
                           requestStart: function (e) {
                               //alert("Request Start");
                           },
                           schema: {
                               data: function (data) {
                                   return data.Results; // <-- The result is just the data, it doesn't need to be unpacked.
                               },
                               total: function (data) {
                                   // return data.length; // <-- The total items count is the data length, there is no .Count to unpack.
                                   return data.TotalResults;
 
                               },
                               
                              model: {
                                   fields: {
                                       Country_Code: { type: "string" },
                                       Country_ID: { type: "number" },
                                       Country_Name: { type: "string" },
                                       County_Desc: { type: "string" }
 
                                   }
                               }
                           },
                           pageSize: 1,
                           //serverPaging: true,
                          // serverFiltering: true,
                          // serverSorting: true
                       },
                       height: 250,
                       filterable: true,
                       sortable: true,
                       pageable: true
                        
                   });
               });
 
Naunihal
Top achievements
Rank 1
 asked on 12 Nov 2012
4 answers
523 views

Hi, 

I have a telerik grid which contains a template column.

What I would like to do is only apply sorting to this template column and NO other column in the grid.

Please can someone advise me on how I can go about doing this for the Name column? 
Any help would be much appreciated as I am new to using Telerik grids.

Thank you very much

 @(Html.Telerik().Grid(Model.MyGrid)
                 .Name("MyGrid")
                 .Columns(columns =>
                              {
                                  columns.Template(c => @Html.ActionLink(c.Name, "Action", "Controller", new { id = c.Id }, null)).Width(100).Title("Name");
                                  columns.Bound(c => c.Title).Width(100);
                                  columns.Bound(c => c.Occupation).Width(100);
                              })
                 .Sortable(sorting => sorting.Enabled(true)))

Brendon
Top achievements
Rank 1
 answered on 11 Nov 2012
3 answers
837 views

HI,
 we are showing a Popup from Kendo Ui Grid, The page is a Searc Page which has Dropdownlist and by selecting the value,
a kendo ui grid will be shown with data and by clicking the Edit button  a popup is displayed. By using Ajax editing in grid, the popup is shown in center of the browser. but page refresh is not happening and dropdownlist is not populated.

 

@(Html.Kendo().Grid(Model)

.Name(

 

"Grid")

 

.Columns(columns =>

{

columns.Bound(p => p.RoleType).Width(80);

columns.Bound(p => p.Name).Width(100);

columns.Bound(p => p.Status).Width(70);

columns.Command(command => { command.Edit(); }).Width(100);

 

})

.Editable(editable => editable.Mode(

 

GridEditMode.PopUp).TemplateName("ManageRolePop").Window(w => w.Title("Manage Role").Name("editWindow")))

 

.Pageable()

.Sortable()

.Scrollable()

.DataSource(dataSource => dataSource

.Ajax()

.ServerOperation(

 

false)

 

.Model(model => model.Id(p => p.RoleID))

.Read(

 

"ManageRole", "ManageRole")

 

.Update(

 

"Update", "ManageRole")

 

)

 

 

By using Server editing the Popup orientation is at the bottom of the page and thewe are not able to set in center of the browser. Request you to help us in this issue.

 

@(Html.Kendo().Grid(Model)

.Name(

 

"Grid")

 

.Columns(columns =>

{

columns.Bound(p => p.RoleType).Width(80);

columns.Bound(p => p.Name).Width(100);

columns.Bound(p => p.Status).Width(70);

columns.Command(command => { command.Edit(); }).Width(100);

 

})

.Editable(editable => editable.Mode(

 

GridEditMode.PopUp).TemplateName("ManageRolePop").Window(w => w.Title("Manage Role").Name("editWindow")))

 

.Pageable()

.Sortable()

.Scrollable()

.DataSource(dataSource => dataSource

.Server()

.ServerOperation(

 

false)

 

.Model(model => model.Id(p => p.RoleID))

.Read(

 

"ManageRole", "ManageRole")

 

.Update(

 

"Update", "ManageRole")

 

)

Request you to help us in this

Steven
Top achievements
Rank 1
 answered on 11 Nov 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
Drag and Drop
Application
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?