Telerik Forums
Kendo UI for jQuery Forum
1 answer
56 views
I have an object with some properties that will appear in the grid, but one of the properties is a list that will generate other columns. Its doing this?

Thanks
Caio
Top achievements
Rank 1
 answered on 06 Nov 2012
0 answers
152 views
I just set up a Grid with a date column. When I change the culture to eg. danish "da-DK" the value of the date is changed.

Eg. 2012-11-05 is change from "Mon Nov 05 2012 00:00:00 GMT+0100 (Central Europe Standard Time)" to "Tue Dec 20 2011 00:00:00 GMT+0100 (Central Europe Standard Time)"

This is clearly a bug. The date from the data source is in ISO 8601 format (2012-11-05T00:00:00), and even in danish this means 5th November 2012 ;-)

This will reproduce the error:

<div id="grid"></div>
<script src="/kendoui/kendo.web.min.js"> </script>
<script src="/kendoui/cultures/kendo.culture.da-DK.min.js"> </script>

<script>
    $(document).ready(function() {
        kendo.culture("da-DK");

        $("#grid").kendoGrid({
            dataSource: {
                data: [{ "Date": "2012-11-05T00:00:00" }],
                schema: {
                    model: { fields: { Date: { type: "date" } } }
                },
            },
            columns: [{ field: "Date", width: 200 }
            ]
        });
    });
</script>
Thomas
Top achievements
Rank 1
 asked on 06 Nov 2012
3 answers
961 views
Hello,

I am new to kendo and MVC3,
could you please know how to bind the drop-down list based on the radio button value selected.

Thanks in advance.

Regards,
Ravi
Ravi
Top achievements
Rank 1
 answered on 06 Nov 2012
2 answers
216 views
  1. I need help with Kendo Upload. This is my problem:
  2. I have a partial view which displays a ListView of Company object. In the Edit EditorTemplate, I have a Kendo Upload control that enables the user to upload company logo. This works fine
  3. However, I need to grab the Id of the company being edited so that I can save the logo image by replacing the File Name with the Id of the company. This is what I have not being able to do.
  4. I tried using the .Events attribute, however, once I add that attribute to the upload control, the upload button turns into a regular HTML button, thus it only selects the picture, but is not able to upload it asynchronously. I have read of other solutions such as putting the upload within a form element, however since this upload is performed in ListView edit mode, I don’t see that as a good option.
  5. All I need is to be able to grab the company Id from the company Id editor field. I want to do this in the Save method of the upload control. Something like how it’s done in standard MVC controller, like: string companyName = Request.Form["CompanyName"]; How can I achieve this? 
Thank you.
Daniel
Telerik team
 answered on 06 Nov 2012
2 answers
195 views
The docs for the kendoGrid destroy() function are very brief:

destroy

Prepares the Grid for safe removal from DOM. Detaches all event handlers and removes jQuery.data attributes to avoid memory leaks. Calls destroy method of any child Kendo widgets.

var grid = $("#grid").data("kendoGrid");

// detach events
grid.destroy();

Is there any other code required to get his working? Setting it up in exactly the same way I always receive the error:

TypeError: rGrid.destroy is not a function

I have confirmed rGrid is available by adding a hideColumn() call to it before trying destroy, which works correctly.

Any help appreciated.
Atanas Korchev
Telerik team
 answered on 06 Nov 2012
1 answer
259 views
I have a Kendo Upload, that works fine, when placed on the page.
But when I place it in the Kendo Window, it select files, but the submit does not work.

Here is the sample code:
<!DOCTYPE>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title><meta HTTP-EQUIV="CACHE-CONTROL" content="NO-CACHE" /><link rel="shortcut icon" href="#" /><link href="Styles/kendo.common.min.css" rel="stylesheet" type="text/css" /><link href="Styles/kendo.default.min.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="Scripts/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="Scripts/kendo.web.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
        var window = $("#window");
        if (!window.data("kendoWindow")) {
            window.kendoWindow({
                width: "350px",
                title: "File Upload"
            });
        }
        $("#fileUpload").kendoUpload();
        $("#fileUpload1").kendoUpload();
    });
    </script>
</head>
<body>
    <form method="post" action="TestPage.aspx" id="form1" enctype="multipart/form-data">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTU2NzAwMTA3NQ9kFgICAw8WAh4HZW5jdHlwZQUTbXVsdGlwYXJ0L2Zvcm0tZGF0YWRkRF2FJe9qQk/psOU7/27cqENC3FQa7GHlIdCqprbX5OE=" />
</div>
<div class="aspNetHidden">
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAAVduTrSFUP8gzeDnFOHumnJceeJO6RlDfckB6avcjnXt/vSeQRRtBIN1u+3s4mXdj6SqBPM9UD7WcfqYssU0cb3zfg78Z8BXhXifTCAVkevd7EjaSByG/FbMlhkMZSAG2utYhE7cAx1EvHHj4GryZaV" />
</div>
    <div id="window" style="display:none">
    <div class="popup_body">
        <ol>
            <li>
                <div>
                    <span id="lblSelectFile">Select file</span><br />
                    <input type="file" name="fileUpload" id="fileUpload" />
               </div>
            </li>
        </ol>
    </div>
    <div class="popup_footer">
        <input type="submit" name="btnPopupOK" value="Submit" id="btnPopupOK" class="button_popup" />  //this is not working
        <input type="submit" name="btnPopupCancel" value="Cancel" onclick="$(&#39;#window&#39;).data(&#39;kendoWindow&#39;).close(); return false;" id="btnPopupCancel" class="button_popup" />
    </div>
</div>
    <div>
        <input type="submit" name="btnWindow" value="Open Window" onclick="$(&#39;#window&#39;).data(&#39;kendoWindow&#39;).open(); return false;" id="btnWindow" /> <br />


        <input type="file" name="fileUpload1" id="fileUpload1" />
        <input type="submit" name="Button1" value="Submit" id="Button1" class="button_popup" />//this working fine



    </div>
    </form>
</body>
</html>

Elena
Top achievements
Rank 1
 answered on 06 Nov 2012
4 answers
1.2K+ views
i want to make event when some button is clicked, data on combo box is reloaded
this my script, but it's doesn't  work
<div id="example" class="k-content">
            Select a title from Netflix:
            <input id="titles"/>
            <button id="a" />
 
            <script>
                $(document).ready(function() {
                    var aa = $("#titles").kendoComboBox({
                        index: 0,
                        placeholder: "Select City",
                        dataTextField: "name",
                        dataValueField: "id_city",
                        filter: "contains",
                        dataSource: {
                            serverFiltering: true,
                            serverPaging: true,
                            pageSize: 20,
                            transport: {
                                read: "http://localhost/kucarisoft/city"
                            }
                        }
                    });
                    $("#a").click(function (e) {
                        aa.refresh();
                    });
                });
            </script>
        </div>

if i click button a, data on combo box nothing reload

Thank You
Georgi Krustev
Telerik team
 answered on 06 Nov 2012
0 answers
318 views
It took me a while to figure this out, so I thought a post here about it wouldn't hurt. I really think this should be a parameter in the grid.
In my version (2012.2.710.340), when Im editing a cell, the marker places itself on position 0, before the value. Because of this, the user has to manually select and delete the value of the textbox before entering anything. Since we're all a bunch of lazy bastards, this just won't work :). When I click a cell, I want the value to be selected, so that I just start typing to replace it.

To achive this, just add a hook on the "edit"-event like this.

<script type="text/javascript">
    $(function () {
        // get a reference to the grid
        var grid = $("#@gridname").data("kendoGrid");
 
        grid.bind("edit", function (e) {
            e.container.find("input").select();
        });
    });
</script>
Pär
Top achievements
Rank 1
 asked on 06 Nov 2012
0 answers
101 views
Hello,

I am binding the grid with the help of Viewdata. And when I update the View data it is not getting updated to the Grid, it is showing only the previous data. this is happening even for the dropdownlist also. what is the probelm in my code? please find my code below.

@{Html.Kendo().Grid((List<BNYM.EnSIS.Pricing.Contract.VendorPricingGridResponse>)ViewData["PricingGrid"])
.Name("PricingGrid")
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(25)
.Batch(true)
.ServerOperation(true)
.Model(q => q.Id(m => m.ProductID))
.Model(q => q.Id(m => m.CurrencyCode))

)

.Columns(columns =>

{
columns.Bound(m => m.Category).Title("Category").Width(90);
columns.Bound(m => m.ProductID).Title("ProductID").Width(140);
columns.Bound(m => m.CurrencyCode).Title("USD").Width(50);
})

.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.ProductID))
.RowAction(row => row.HtmlAttributes.Add("data-id", row.DataItem.CurrencyCode))
.Selectable(s => s.Mode(GridSelectionMode.Single).Enabled(true))

 
.Render();

}



Regards,
Ravi
Ravi
Top achievements
Rank 1
 asked on 06 Nov 2012
0 answers
78 views
This is something KendoUI needs. Sencha has a very nice showcase gallery with various apps made with their Touch framework.

I think KendoUI would benefit from some more marketing in general. I sent 2 emails with ideas on how to promote Telerik in my City but didn't even get a response, a bit of a bummer If I may say so. I think this is a great framework that needs more exposure. I will at least write a Case Study soon :).

Marcus
Top achievements
Rank 1
 asked on 06 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
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?