Telerik Forums
Kendo UI for jQuery Forum
2 answers
224 views
I'd like to use a combo box in a tablet-based phone gap app I'm working on but the default 'open' behavior for the combobox appears to be different when running as a mobile app. Is there a way to revert this so that I don't get the ActionSheet anymore?
Marlon
Top achievements
Rank 1
 answered on 15 Oct 2013
1 answer
73 views
I have a page with multiple buttons and multiple Kendo grids populated by lists inside a model object. Some of the buttons on the page end up refreshing the page (but preserving the current state of the model) before anything gets saved to the database. The issue is that the Kendo grids use incell editing and any changes made are lost upon page refresh because the grids are populated with the initial data from the model object once again. It seems the Kendo grids do not make changes to the model. I want to preserve any changes made on the grid so that the user can eventually save to the database. Is this possible? Can the Kendo grid make changes to the model object so that the changes will persist when the page is refreshed?

------------------------------------------------------------------------------------

This is the javascript used to create the Kendo grid:

-------------------------------------------------------------------------------------

$(document)
        .ready(
                function() {
                    
                    var savedGrid = JSON.parse($.cookie("distancesGrid"));
                    
                    var grid = $("#distancesTable")
                            .kendoGrid(
                                    {
                                        sortable : true,
                                        dataSource : {
                                            autoSync: true,

                                            schema : {
                                                model : {
                                                    fields : {

                                                        bloodCenterId : {
                                                            type : "number",
                                                            editable : false
                                                        },
                                                        
                                                        miles : {
                                                            type : "number",
                                                            validation : {
                                                                required : true
                                                            }
                                                        },
                                                        
                                                        // additional fields omitted...
                                                    }
                                                }
                                            }
                                        },

                                        editable : "incell",

                                        navigatable : true ,

                                        columns : [

                                                {
                                                    field : "bloodCenterId",
                                                    title : "bloodCenterId",
                                                    hidden : true,
                                                },
                                                
                                                {
                                                    field : "miles",
                                                    title : "Miles",
                                                    width : "15%"
                                                },
                                                
                                                // additional columns omitted...

                                                {
                                                    command : [ {
                                                        name : "deleteDistance",
                                                        text : "Delete Distance",
                                                        click : function(e) {

                                                            var tr = $(e.target).closest("tr"); // get

                                                            var data = this.dataItem(tr);

                                                            deleteDistanceClicked(data.bloodCenterId);
                                                        }
                                                    } ]
                                                }
                                        ],
                                    }).data("kendoGrid");
                });

function deleteDistanceClicked(bloodCenterId)
{
    vertScrollPos.value = $(document).scrollTop();

    document.getElementById('hiddenDeleteDistanceBloodCenterId').value = bloodCenterId;
        
    leavePageDialog = false;

    $('#viewForm').attr('action', 'deleteDistance.htm'); 
    $('#viewForm').submit();    
}

---------------------------------------------------------------------------------------------

And this is the table definition in the .jsp file:

---------------------------------------------------------------------------------------------

<table id="distancesTable" class="table table-bordered"style="clear: both;">
    <tbody>
        <c:forEach items="${locationModel.distancesList}" var="distance">
            <tr>
                <td>${distance.distanceId}</td>
                <td>${distance.bloodCenter.bloodCenterId}</td>
                <td>${distance.location.locationId}</td>
                <td>${distance.bloodCenter.name}</td>
                <td>${distance.miles}</td>
                <td>${distance.minutes}</td>
                <td></td>
            </tr>
        </c:forEach>
    </tbody>
</table>

Petur Subev
Telerik team
 answered on 15 Oct 2013
1 answer
108 views
Hi 

I have several views which I would like to display a common header that is data bound to a common viewmodel (MVVM).
The header is defined in a common layout. Is there a way of specifying a different viewmodel for for it to bind to?

Cheers
Aaron

Kiril Nikolov
Telerik team
 answered on 15 Oct 2013
6 answers
984 views
Hi All,

I have troubles witj DropDown editor ingrid, it  occasionally the window with the options will pop up in top left of computer screen. 

{ field: "ptcCode", title: "Package To", template: '#= kendo.toString(ptcName) #',
  editor: ptcDropDownEditor, width: 200 }
//
function ptcDropDownEditor(container, options) {
$('<input data-text-field="Name" data-value-field="Code" data-bind="value:' + options.field + '"/>')
.appendTo(container)
.kendoDropDownList({
   autoBind: false,
   dataSource: ptcDataSource,
 });
}

Any idea to resolve this?
Alexander Valchev
Telerik team
 answered on 15 Oct 2013
2 answers
159 views
Hi,

I have some difficulties to draw a graph when I use JSON-date format. I've reproduce the code at http://jsfiddle.net/saes/X5m93/1/
As you can see X-asis is not readable and it seems the graph is tighten.
When I use string instead of date in the JSON-file it works as it is expected. This is the same code as above but instead I've used string instead of date-format in the JSON file: http://jsfiddle.net/saes/5TRN2/2/

I wonder why I'm not able to use date-format in the JSON file and what's wrong in my code?

Regards,
Sam
Sam
Top achievements
Rank 1
 answered on 15 Oct 2013
1 answer
286 views
Hi guys.
I'm looking for example of Kendo UI grid working with dynamic data.
I tried this one:
http://www.kendoui.com/code-library/mvc/grid/binding-to-datatable.aspx
and it is working well with displaying data, but I was not able to find example with other operations (Add,Edit, Delete).
I tried add them by myself and got next exception:
The model item passed into the dictionary is of type 'System.Data.DataRowView', but this dictionary requires a model item of type 'System.Data.DataTable'.
I found that similar question was asked here:
http://www.kendoui.com/forums/kendo-ui-complete-for-asp-net-mvc/grid/problem-with-crud-operation-with-data-table-as-model.aspx
but it is still without an answer and this thread seems to be closed. Could You please tell me what should be the problem or give me some link
to working example with supported CRUD for Data table as Model.

Here is my code of Index.cshtml:

@model System.Data.DataTable

@(Html.Kendo().Grid(Model)
    .Name("Grid")
    .Columns(columns =>
    {
        foreach (System.Data.DataColumn column in Model.Columns)
        {
            columns.Bound(column.ColumnName);
        }
    })
    .Pageable()
    .Sortable()
    .Scrollable()
    .Filterable()
    .Groupable()
    .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("DataTableEditor"))
    .DataSource(dataSource => dataSource
        .Ajax()
            .Model(model => model.Id("ProductID"))
                .Model(model =>
                    {
                        model.Id("ProductID");
                        foreach (System.Data.DataColumn column in Model.Columns)
                        {
                            model.Field(column.ColumnName, column.DataType);
                        }
                    })
            .Read(read => read.Action("Read", "Home"))
        .Update(upd => upd.Action("Update", "Home"))
    )
)
Alexander Popov
Telerik team
 answered on 15 Oct 2013
3 answers
177 views
Is it possible to configure the behavior of sorting when setting a grid to sortable? Specifically I want to sort the data in the column without respect to case so that, for example, "angle" appears before "Apple" instead of after "Zebra"?
Himani
Top achievements
Rank 1
 answered on 15 Oct 2013
5 answers
100 views
Did I miss something that is not in the release notes for the 2013.2.716.340 release of Kendo UI?  All I did was install that version over the previous in my mvc project and now the series lines aren't showing up.  The plot lines still draw though.  Was there something we are supposed to do with that upgrade?  I know the data is coming across and I know the set of dependencies hasn't changed.  My code did not change.  I know my installation of Kendo UI is working because the scheduler and all the other controls are working fine.

I know this is a stab in the dark asking on this forum but I can't find anything on the boards and all my traces are returning nothing.
Entilzha
Top achievements
Rank 2
 answered on 14 Oct 2013
9 answers
680 views
Situation:

I have 1 kendo iframe window open.  I want to open a new kendo window from a trigger element within this window.  

Issue:
The 2nd window is bigger than the first, so I want to open it so that it displays "over top" of the 1st window.

So far unsuccessful attempts:
I have used window.top to dynamically create the div window element on the root window body but this still opens the window inside the 1st window.

How would I go about doing this?

Deepak Subhedar
Top achievements
Rank 1
 answered on 14 Oct 2013
2 answers
145 views
After quickly reviewing the demos and documentation, I assumed that the Week View allowed the day upon which the week starts to be configured (since there are multiple demos with different week start dates.  After doing some testing however I am having some issues making this happen.

I understand from reading some forums that the the way the week view is rendered is a bit more complex that the other views and that the start and end dates are somehow generated from separate logic.  It looks like you can change the start date by using a culture setting, however that only gives the Monday or Sunday selection allowance.

Is there any way to show a rolling week view, or 7-day view, that would always start with today?  It isn't often useful to show dates in the past for users to pick from when scheduling something.  Would it be possible to extend the culture setting to allow for all 7 selections of day of week?

Rosen posted - http://jsbin.com/URESExi/1/edit as an example.... does this multi-day view lose any of the functionality provided by the default WeekView?
andrew
Top achievements
Rank 1
 answered on 14 Oct 2013
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
Dialog
Chat
DateRangePicker
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
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?