Telerik Forums
Kendo UI for jQuery Forum
0 answers
194 views
Hi there,

I've got kendo (The web widgets) working across multiple pages and haven't really had any major issues getting it all to work the way I'd like across all browsers. Everything's displaying the way it's supposed to be and functioning great - that said there's one little thing I'd like to improve.

When I load any of my pages in firefox there's a split second delay in which I see my menu as an unordered list and unstyled (see before.png attached). It snaps into place with the proper styling(after.png) pretty quickly, but it's still an undesirable transition as everything on the page then shifts to position itself again.

This doesn't happen in Chrome or ie, on load the menu is styled before any elements are shown. Is this a firefox flaw, a jquery/javascript problem a kendo menu+firefox problem or just some kind of fault on my part?

Any suggestions are welcome,
Thank you
Hunter
Top achievements
Rank 1
 asked on 27 Sep 2012
1 answer
156 views
Hi! 
I have found very strange issue, which happens only on iPad Safari, on iPad Chrome not.
The Mobile Split view application has on the left pane mobile listview which switches views on the right pane, as in your example, but after each switching Ajax request is made (asynchronous) to retrieve data for selected view.

View elements are bound to view model with MVVM, for example
<div data-bind="text:value"></div> or <input data-bind="value:value"/> etc. and Ajax update with "set" method my view model.

Everything works good on Windows Chrome and Safari, except on iPad in Safari: sometimes MVVM DOM elements are not updated to the correct value. I'm sure the value was "set" in view model, but divs and inputs was not updated. Things I discovered in last two days:

1. If I change focus to input, that was not correctly updated, it becomes immediately correct value
2. if I change view to another and back,even without ajax, all divs and inputs are now updated
3. (this one very strange but true) divs and inputs, which bound value or text was previously empty string becomes updated!! divs and input fields, which previous value was something but not empty -becomes NOT updated!! 

So for now I use very dirty workaround set each value first to empty string, and then set it to value that came with Ajax response. 

Question: maybe you could somehow explain why? 
About workaround - is there any possibility to refresh view, see point 2: change view to another and back updates all fields, and I could maybe call something after Ajax response is processed?

Again, the problem only occurs on iPad Safari. I have yesterday updated to iOS6, no difference.

Thanks in advance.

Alex
Top achievements
Rank 1
 answered on 27 Sep 2012
3 answers
560 views
I have Autocomplete box with watermark text . I'm clearing the Autocomplete using value method and excepting Watermark to reappear after clear. None of these are working... i'm missing something ?

$('#city').data('kendoAutoComplete').value(null); or $('#city').data('kendoAutoComplete').value(undefined); or  $('#city').data('kendoAutoComplete').value('');
Daniel
Telerik team
 answered on 27 Sep 2012
1 answer
120 views
Hi,

I met a strange issue.

In DOM load, I create a kendo grid with remote data source:
$(document).ready(function () {
    LocationGridDataSource = new kendo.data.DataSource({ type: "json" ...);
    LocationGrid = ...
}

There is an ajax form in my page:
@using (Ajax.BeginForm("Bind", "Test", null, new AjaxOptions { OnSuccess = "BindOnSuccess" }, new { id = "BindForm" }))
{}

I use $("#BindForm").submit() to mannually submit the ajax form.
In BindOnSuccess, I use datasource.get:
function BindOnSuccess(context){
    ....
    var location = LocationGridDataSource.get(context.id);
    var selection = LocationGrid.table.find('tr[data-uid="' + location.uid + '"]');
    ....
}

Sometimes location which is got from LocationGridDataSource.get(context.id) is NULL, sometimes it will get object successfully.

After my debugging, my questions:
1. The problem is caused by LocationGridDataSource is not ready after ajax returns?
2. Is there a mechanism to ensure I can call LocationGridDataSource.get() based on a READY datasource object?

Any comments or instruction?

Thanks.
John
Top achievements
Rank 1
 answered on 27 Sep 2012
0 answers
103 views
How do i to change the item template from the Panelbar in order to add new attributes to the li element?
How can i access the datasource item for the select item?
ecobite
Top achievements
Rank 1
 asked on 27 Sep 2012
0 answers
120 views
Hi,

I'm evaluating Kendo components for use in a MVC web project. I'm very happy with the grid but now I run into a problem and I don't know from where to start.
I'm trying to create a view to enter invoices. For the invoice lines I use the kendo grid in batch editing mode. On each line I need to search for a product and fill the row cells with product code, product name and other details.
I started with a EditorTemplate attached to the first column "ProductCode".
columns.Bound(o => o.Product).EditorTemplateName("ProductItemDropDownList").ClientTemplate("#=ProductCode#");
The editor template contains a dropdowlist:
@(Html.Kendo().DropDownList()
   .Name("ProductCode")
    .DataTextField("ProductCode")
    .DataValueField("ProductId")
    .DataSource(dataSource => dataSource.Read(read => read.Action("GetProducts", "Invoice")).ServerFiltering(true))
)
The first problem is the cell remains empty after I select a product code. 
I expected to have there the code of the product.
The second problem, I have no idea how to fill the rest of the cells representing product description, ...

Thank you,
Flaviu Boldea
boldicu
Top achievements
Rank 1
 asked on 27 Sep 2012
4 answers
160 views

Hi!

I can't load information in json format in my KendoGrid... 
url : http://dotnet.habitatpro-com.local/test.json  return json flux
CODE:
<html>
<head>
    <title></title>
    <script type="text/javascript" src="Scripts/jquery-1.7.1.js"></script>
    <script type="text/javascript" src="Scripts/kendo.all.js"></script>

</head>
<body>
            <div id="example" class="k-content">
            <div id="grid"></div>

            <script type="text/javascript">
                $(document).ready(function () {
                    var crudServiceBaseUrl = "http://dotnet.habitatpro-com.local/test.json",
                        dataSource = new kendo.data.DataSource({
                            transport: {
                                read: {
                                    url: crudServiceBaseUrl,
                                    dataType: "jsonp"
                                },
                                parameterMap: function (options, operation) {
                                    if (operation !== "read" && options.models) {
                                        return { models: kendo.stringify(options.models) };
                                    }
                                }
                            },
                            batch: true,
                            pageSize: 30,
                            schema: {
                                model: {
                                    id: "ProductID",
                                    fields: {
                                        ProductID: { editable: false, nullable: true },
                                        ProductName: { validation: { required: true} },
                                        UnitPrice: { type: "number", validation: { required: true, min: 1} },
                                        Discontinued: { type: "boolean" },
                                        UnitsInStock: { type: "number", validation: { min: 0, required: true} }
                                    }
                                }
                            }
                        });

                    $("#grid").kendoGrid({
                        dataSource: dataSource,
                        pageable: true,
                        height: 400,
                        toolbar: ["create"],
                        columns: [
                            { field: "ProductName", title: "Product Name" },
                            { field: "UnitPrice", title: "Unit Price", format: "{0:c}", width: "150px" },
                            { field: "UnitsInStock", title: "Units In Stock", width: "150px" },
                            { field: "Discontinued", width: "100px" },
                            { command: ["edit", "destroy"], title: "&nbsp;", width: "210px"}],
                        editable: "popup"
                    });
                });
            </script>
        </div>
</body>
</html>


Do you have any suggestions ?

Thanks
totoro
Top achievements
Rank 1
 answered on 27 Sep 2012
0 answers
107 views
 I have used kendo ui detail tmplate grid in my  php app. And i a having this problem...

$_REQUEST["filter"]["filters"][0]["value"]

this line of code not works on the hosting server but completely runs on the localhost.
so i need to know is there any configuration for that on the server?

Plz help me out i have attached my code her.
sagar
Top achievements
Rank 1
 asked on 27 Sep 2012
0 answers
62 views
 I have used kendo ui detail tmplate grid in my  php app. And i a having this problem...

$_REQUEST["filter"]["filters"][0]["value"]

this line of code not works on the hosting server but completely runs on the localhost.
so i need to know is there any configuration for that on the server?

Plz help me out i have attached my code her.
sagar
Top achievements
Rank 1
 asked on 27 Sep 2012
1 answer
600 views

I have a window being launched from a page in a different doamain trying to close itself.

So, in domain A... I have the div tag in my page.

<div id="open" class="openWindow" style="text-align: center"></div>

.. and in the script I'm using to launch the window:

$('#open').parent().addClass("openWindow");
 
var windowOpen = $("#open");
 
if (!windowOpen.data("kendoWindow")) {
    windowOpen.kendoWindow({
        width: "400px",
        height: "320px",
        title: "Open",
        actions: ["Refresh", "Close"],
        visible: false,
        });
}
 
windowOpen.data("kendoWindow").center();
windowOpen.data("kendoWindow").open();

Also, in domain B, I have the open.htm file and with the following script.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="IE=Edge" http-equiv="X-UA-Compatible" />
    <title>Open</title>
    <meta content="Ronald E. Zepp II" name="author" />
    <meta content="width=device-width; initial-scale=1.0" name="viewport" />
    <!-- !CSS -->
    <link href="Scripts/html5reset-1.6.1.css" rel="stylesheet" />
        rel="Stylesheet" />
    <link href="Scripts/kendo.agile2.css" rel="Stylesheet" />
    <!-- JS -->
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
    <script src="http://cdn.kendostatic.com/2012.2.913/js/kendo.all.min.js" type="text/javascript"></script>
    <script src="Scripts/bc.open-1.0.0.js" type="text/javascript"></script>
</head>
<body id="open-window-body">
<table style="background-color: #F8F8FF">
    <tr>
        <td style="padding: 10px; margin: 10px"></td>
        <td> CICode or Partnumber: </td>
        <td><input type="text" id="item" class="k-textbox" style="margin-left: 10px; width: 200px; margin-right: 10px" /></td>
        <td style="width: 100%;"></td>
    </tr>
    <tr style="height: 15px">
        <td colspan="3"></td>
        <td style="width: 100%;"></td>
    </tr>
    <tr>
        <td style="padding: 10px; margin: 10px"></td>
        <td colspan="3"><div id="org_list"
                style="border: thin solid #94c0d2; height: 200px; width:340px; overflow: auto"></div></td>
    </tr>
    <tr style="height: 15px">
        <td colspan="3"></td>
        <td style="width: 100%;"></td>
    </tr>
    <tr>
        <td colspan="2"></td>
        <td colspan="2" style="text-align: right; white-space: nowrap;"><input id="Ok" type="button" class="k-button" value="Ok" style="width: 90px; height: 30px; margin-bottom: 10px; margin-right: 10px;" /><input type="button" class="k-button" id="Cancel" value="Cancel" style="width: 90px; height: 30px; margin-right: 10px; margin-bottom: 10px;" /></td>
    </tr>
</table >
    <div id="window" style="text-align: right" >
        <table>
            <tr valign="middle" >
                <td><img id="window_image" src="images/stop.png" alt="" />
                </td>
                <td style="padding-right: 5px; padding-left: 5px"></td>
                <td class="anr-message-text">
                    <div id="window_message">Test Message</div>
                </td>
            </tr>
        </table>
        <div style="text-align: right">
            <button id="Yes" class="k-button">Yes</button>
            <button id="No" class="k-button">No</button>
        </div>
    </div>
 
</body>
    <script type="text/x-kendo-tmpl" id="template">
        <div>          
            ${OrgCode} ${Name}
        </div>
    </script>
</html>

 

$("#Cancel").click(function () {
    $("#Cancel").closest(".k-window-content").data("kendoWindow").close();
});

Now, when I click the cancel button using the recommended way to reach the close funcion, I get the following error:

SCRIPT5007: Unable to get value of the property 'close': object is null or undefined

Same domain, window.parent works fine, different domain... and I can't get the window to close itself.

Alex Gyoshev
Telerik team
 answered on 27 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
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?