Telerik Forums
Kendo UI for jQuery Forum
0 answers
169 views
Hello,

I have a grid that's being bound to a datatable and works fine with server requests. But once I try binding via ajax I get a circular reference error. I tried to use a helper method to convert the datatable into List<Dictionary<string, object>> and bind the grid to said collection, but I can't get that to work either.
My need to use a DataTable stems from a particular use case, let me illustrate:
The application enlists certain areas within a manufacturing process, each area has a list of part numbers/names; in a different form defects are being captured for particular parts. The grid must be rendered "dynamically" based on the part names listed for a particular area in the database, and the amount of defects for each part, like so:

Column 0 Column 1 Column 2 Column 3 Column 4
Defect Silicone seal FF Mask Headgear Swivel
Bubbles in functional area 0 0 0 3
Heterogeneous coloring 4 0 1 0
... ... ... ... ...

Column0 is fixed and must happen for all instances of the grid, the number of columns after this one depends on what I mentioned above, so the overall number of columns and member name/title will vary.
My first approach was to build a DataTable from the information retrieved from database, which works fine with server binding, but I'm stumped as to how to use ajax binding (which is needed for requirements not listed here). I've attached a sample project with my approach. Any suggestions?
Josias
Top achievements
Rank 1
 asked on 27 Sep 2012
0 answers
165 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
126 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
532 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
105 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
83 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
104 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
135 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
87 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
39 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
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?