Telerik Forums
Kendo UI for jQuery Forum
3 answers
97 views
Dear Support Team,

I have a grid which is showing a dataset which has thousands of rows data.
When the next datafeed comes in, I'd like to highlight the cell of which the value is updated or changed.
In the menudatabound event, I tried to compare the two datasets (one is the old and one is the new) and try to highlight the change using a line as below:

$("#mygrid tr[data-uid='" + row.uid + "']").find("td").eq(k).css("background", "lightgreen");

It's very slow, it's OK for up to hundreds of rows.
We don't use any paging in the front-end nor in the back-end datafeeding service.
Can there be any workaround?
Can you please advise any alternative?
Is there any faster way to access the background color of the cell and change it?

Thanks & regards
UFIS
UFIS
Top achievements
Rank 1
 answered on 15 May 2014
2 answers
73 views
We just upgraded to Keno UI version 2014.1.415.  Afterwards we noticed that on some devices where we have a button with data-icon="more" it was displaying with 3 vertical dots instead of the expected 3 horizontal dots.  After digging into the Kendo supplied CSS, we found that .km-more is defined multiple times.  The first time it is defined with content of \e0e0, which is the 3 horizontal dots.  Later it is defined with content of \e0e1, which is the 3 vertical dots.  Obviously the later definition wins and overrides the previous definition.

I'm wondering if this was intended or an oversight?

We have worked around the issue by creating a CSS that is loaded after all Kendo CSS so that .km-more is yet again defined with the desired content value.
David
Top achievements
Rank 1
 answered on 14 May 2014
3 answers
142 views

Hi all, once again I have hit a brick wall and hopefully someone can provide some guidance. I have a grid on my page and some of the columns contain links which should "pop-up" or open a jquery dialog. I pass the data on click of the link to a partial view and the partial view is then opened in a jquery dialog. Everything seem to work flawlessly, but when I page the grid after page 1 (every page after page 1), the dialog no longer appears. I find it strange because all the data is still being passed to the partial view and all I get is a plain white page with my data on it. Here's my code for the grid, which contains one of the columns that has a link that should open a dialog as mentioned above:

@(Html.Kendo().Grid<DMSTestMVC.Models.ViewModels.DocVM>(Model.Docs)
    .Name("grid1")
    .Pageable()
    .Sortable()
    .Groupable()
                   
                   
    .DataSource(d => d
                .Ajax()
                .PageSize(15)
                .ServerOperation(false)
                )

    .Columns(columns =>
    {

 

        columns.Bound(d => d.DocumentTypeName).ClientTemplate(
            "# if (DocumentInsertDt != null) { #" +

            "<a style='font-weight:bold; color:blue' href='" + Url.Action("ViewDocument", "Home") + "/#= Id #'" + ">" + "#= DocumentTypeName #" + "</a>" +
            "<a style='text-decoration: none;' class='doctype' href='" + Url.Action("ChangeDocType", "AssignDocType") + "/#= Id #'" + "> <img src='" + Url.Content("~/Images/Pencil-icon (1).png") + "' alt='' style='border:none;' /> </a>" +
            "# } else { #" +
            "#: DocumentTypeName #" +
            "# } #").Title("Document").HeaderHtmlAttributes(new { style = "text-align: center" }).HtmlAttributes(new { style = "text-align: center" }).Width(300);


On the same page, I have a <div> for rendering the jquery dialog:
<div id="changedoctype" title="Change Document Type"></div>

Here's how my JavaScript code looks like:
script type="text/javascript">

    $(function () {
$('#changedoctype').dialog({
            autoOpen: false,
            width: 530,
            resizable: false,
            show: "scale",
            hide: "scale"
        });

 $('.doctype').click(function () {
            $('#changedoctype').load(this.href, function () {
                $(this).dialog('open');
            });
            return false;
        });

});
</script>

Here's how my controller looks like:
public ActionResult ChangeDocType(string id)
        {
            RecordViewModel rvm = new RecordViewModel(id.ToString());

            return PartialView("_ChangeDocType", rvm);
        }

finally, here's how the partial view looks like, which is the one getting rendered inside the jquery dialog
@model DMSTestMVC.Models.ViewModels.RecordViewModel

@using (Html.BeginForm("SubmitChangeDocType", "AssignDocType", Model, FormMethod.Post))
{
    <div style="width:100%; text-align:center;">
        <br />
        <b>Select a Document Type:</b>
        <br />
        @Html.DropDownListFor(x => x.DocumentType, new SelectList(Model.DocumentNames, "DocumentType", "DocumentName1"))
        <br />
        <br />
        <input type="submit" value="Submit" class="k-button" style="width:120px" />
    </div>
}

As mentioned, everything is working like charm on page 1 of the grid. However, as soon as I page through the grid, I no longer get the dialog. All I get is an ugly empty page but with all the correct data on it. It seems like I am simply missing something, but can not figure out what it could be. Thanks and I look forward to the response(s).

Romel



Romel
Top achievements
Rank 1
 answered on 14 May 2014
1 answer
137 views
Hello,

I am trying to load the children of node when the user expands the node in an MVC 4 application. The razor and controller  code is below -
I get an error about a length property not found at the line -         treeview.append(result, node);
Error
(window.kendo.jQuery);(function(e,t){function n(e){return function(t){var n=t.children(".k-animation-container");return n.length||(n=t),n.children(e)

Thanks in advance,

Amit

<script type="text/javascript">
    function loadChildrenForEntity(entityId) {

        dataSource = new kendo.data.HierarchicalDataSource({
            transport: {
                read: {
                    cache: false,
                    url: "@Url.Action("GetChildrenForEntity", "Admin")",
                    dataType: "json",
                    data: function () {
                        return {
                            entityID: entityId
                        };
                    }
                }
            },
            schema: {
                model: {
                    id: "ItemHID",
                    hasChildren: "HasChildren"
                }
            }
        });

        $("#entityDetails").kendoTreeView({
            dataSource: dataSource,
            //            select: onSelect,
            expand: onExpand,
            dataTextField: "DisplayName"
        }).data("kendoTreeView");
    }

    function onExpand(e) {
        var treeview = $('#entityDetails').data('kendoTreeView');
        var node = e.node;
        var data = treeview.dataItem(node);
        //alert('id = ' + data.id);
        $.ajax({
            url: "@Url.Action("GetChildrenForEntity", "Admin")",
            //type: "POST",
            datatype: "json",
            data: { entityID: data.id },
            success: function (result) {
                DisplayChildNodes(result, node)
            }
        });
    }

    function DisplayChildNodes(result, node) {
        var treeview = $('#entityDetails').data('kendoTreeView');
        treeview.append(result, node);
    }
</script>

The code in the controller is -
        public ActionResult Detail()
        {
            return PartialView();
        }

        public ActionResult GetChildrenForEntity(int entityID)
        {
            //entityID = -1000001;
            List<EntityTreeItem> list;
            list = new FDCRouteServiceClient().ListChildrenForEntity(entityID);
            var returnList = list.Select(r =>
                new RouteTreeViewModel
                {//todo - amit k - have RouteTreeViewModel derive from a base class EntityTreeViewModelBase
                    DisplayName = string.Format("{0} ({1})", r.EntName, r.EntTypeName),
                    ItemHID = r.EntHID,
                    //ParentHID = entityID,
                    HasChildren = r.HasChildren.Equals("1") ? true : false,
                    //ItemTypeCode = r.ItemTypeCode.Trim(),
                    //RouteHID = r.RouteHID,
                    //ParentTypeCode = r.ParentTypeCode
                }).ToList();

            return Json(returnList, JsonRequestBehavior.AllowGet);
        }
Alexander Valchev
Telerik team
 answered on 14 May 2014
1 answer
115 views
Hello, 

I came across a nasty problem. 

I'm using the kendo mobile/web ui and i'm using a drawer. Eveything works perfectly, but then i want to use a splitter inside a view of my drawer.

    <div data-role="view" id="drawer-questions" data-layout="drawer-layout" data-title="App title">
        <!--style="opacity: 0;"-->
        <div id="splitter">
            <div style="background-color: red;float:left;width:25%;">Pane A</div>
            <div style="background-color: green;float:left;width:75%;">Pane B</div>
        </div>
    </div>

But the splitter does not render correctly. It only shows me the first DIV + it's not even a "splitted" page?

Can i not use a splitter inside a drawer?

Thanks in advance.








Roeland
Top achievements
Rank 1
 answered on 14 May 2014
2 answers
394 views
 using I have approx the following sortable markup using a font icon for the drag icon

<div class="sortable">
   <div class="row">
      <div class="handle"><i class="fa fa-arrow-v"></i></div>
      <div>other content</div>
   </div>
</div>

when I setup the sortable as follows:

var sortable = $(".sortable").kendoSortable({
                handler: ".handle",
            });

how can I ignore the <i> element to allow the whole div to initiate sorting?
Mac
Top achievements
Rank 2
 answered on 14 May 2014
1 answer
111 views
I set up a window using the Fluent wrappers like so:
@(Html.Kendo().Window().Name("detailsWindow").Visible(false))

I have a JavaScript function (wired to a grid's custom command  - but I don't think that's relevant) that opens the window and refreshes it based on the grid data:
function popupDetailsWindow(e, a){
     var detailsWindow = $('#detailsWindow').data('kendoWindow');
     var item = this.dataItem($(e.currentTarget).closest("tr"));
     var url = '@Url.Action("Details", "Controller", new { id = "__id__" })';
     var refreshUrl = url.replace('__id__', item.ItemId);
     detailsWindow.refresh(refreshUrl);
     detailsWindow.open();
}

This works fine the first time, then fails on the refresh() call, with an error that 'detailsWindow' is undefined. When I remove the MVC helper code, put in a div with Id "detailsWindow", and call $('detailsWindow').kendoWIndow(); after the document loads, it works fine. Is this a bug in the wrapper code, or am I doing something wrong?
Alexander Popov
Telerik team
 answered on 14 May 2014
1 answer
586 views
 <label for="email" class="required">To:</label>
<input type="email" id="email" name="Email" class="k-textbox" placeholder="e.g. myname@example.net" required data-email-msg="Email format is not valid" "/>
In the document.ready(function(){} I have defined like
var validator = $("#email").kendoValidator().data("kendoValidator");
It is validating single email,I want to validate more than one email at a time,can u tel me how to validate more than one email?

Here i find soln but that does not work
Stack over flow how to validate more than one email in kendo ui

Can anyone help?
Alexander Popov
Telerik team
 answered on 14 May 2014
4 answers
500 views
Hi,

I do not think this is possible, so in that case consider this an enhancement request (or any tips would be appreciated).

I would like to have a customer header in the grid. In your terminology a template for a row to displayed above the column headers (like a grid toolbar).

The items I would want to put in that header template are (so any in-built help would be appreciated):
1. A total row count. Would be nice if that number was easily available (#= RowCount #).
2. A refresh button. So also a simple way to call a refresh on the grid and the data source would be good.
3. Custom buttons (e.g. Copy rows, export rows). Would be nice if I had easy access to an array of selected rows which could be sent to the custom functions.
4. A filter input field that either matched against all values in the grid (local data) or was passed as an argument to the data source and refreshed.

This is all stuff I need to for hundreds of grids, so I'd prefer if was possible to provide as a template to the grid rather than having to render as controls next to the grid.

This is probably applicable as a footer template as well.
Sebastian
Telerik team
 answered on 14 May 2014
1 answer
93 views
We are using HP Sprinter to do functional testing of a website that is using KendoUI controls. HP is saying we need to add an extensibility package to the HP Sprinter tool because when we attempt to test, the control becomes unavailable. We have verified that this only occurs during the use of the testing tool and not in "normal" use of the tool.
Any help is greatly appreciated.
Thank You In Advance.
JT.
mailto:jjtontz@riversidecrest.com
Atanas Georgiev
Telerik team
 answered on 14 May 2014
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
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
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?