Telerik Forums
Kendo UI for jQuery Forum
1 answer
118 views
All,

I am able to read, save, update, and delete my kendoGrid just fine.  The issue I have is that on a new form, the line grid is of course empty, so when you click the 'Add New Record', the new row displays and you can enter in data just fine, but the row is only big enough for that one line and so, if there is a validation on a field, you cannot see it, since you're already at the bottom of the grid.

Then if you click 'Add New Record' again, the grid only displays enough room for the one line. You have to then scroll down to see the 1st line. I may be missing something here, but I would think the grid would auto-grow after each newly created record, but it doesn't.

Let's continue with the example above where I created 2 lines. When I save the form data, it gets saved to the db and so when that same form is opened, the grid shows both lines just fine.  Now adding a new record again, will just push the 1st line down and only display a max of 2 lines in the grid. I guess this part is ok.

Is there a way so that when you have an empty grid and click the 'Add New Record' for the first time, there is enough room to display more than just 1 row of data so you can see the validations and so that when users continue to add a new record, they can see all the rows in the grid without having to scroll the grid one row at a time?

Thanks in advance!
K
Ravikiran
Top achievements
Rank 1
 answered on 05 Sep 2012
2 answers
159 views
hi,

I am new to Kendo UI controls. i need to show the content as per my attached image, is window control is suitable for this case or how can i get this type of control, i need to create this app for mobile.

content is coming from web service.

thanks,
Uma
Radu
Top achievements
Rank 1
 answered on 05 Sep 2012
2 answers
145 views
I want to ask you to add support for this type of call to kendo.format:
    kendo.format('{0} - {1}', [3, 5]);
Of course this is not useful if you have the parameters in seperate variables.
But it is useful if you get the format and the parameters from some external source and that delivers the parameters as an array.
It will be a small change in the kendo.format function. I have changed the first line to this:

var values = arguments;
if (arguments.length == 2 && isArray(arguments[1])) {
    values = arguments[1];
    values.unshift(undefined);
}
(Perhaps you have better ideas about the implementation, but this is the idea and works for me now)

Regards, Jaap
Radu
Top achievements
Rank 1
 answered on 05 Sep 2012
2 answers
391 views
i'm using window for show content, all is ok but animation not work.

My code:

$("#window").kendoWindow({
        modal: true,
        width: "250px",
        height: "150px",
        title: "Title",
        actions: ["Refresh", "Maximize", "Close"]
    });
$("#open").click(function () {
        $("#window").data("kendoWindow").center().open();
    });
$("#close").click(function () {
         $("#window").data("kendoWindow").close();
    });

What is wrong?
Window have default animation?
Thanks.
Mythox
Top achievements
Rank 1
 answered on 05 Sep 2012
1 answer
156 views
I have two separate js files. one contains a kendo observable object. when I set viewmodel's object property from another js file, the object is set but object's properties are still undefined.

<script type="text/javascript">
    var previewModel = kendo.observable({
        question: {}
    });
    kendo.bind($("#preview-question"), previewModel);
</script>
<div id="preview-question">
    <div data-bind="text: question.QuestionText"></div>
</div>

another-js-file.js
previewModel.set("question", ko.toJSON(self.question()));

this code sets the question object but its properties still undefined.
Ahmet
Top achievements
Rank 1
 answered on 05 Sep 2012
0 answers
92 views
Hi im trying out KendoUi Mobile and need some help

I want to style a view with my own style (backgrounds etc.)
The app should load the different views from a database and each view may have its own backgrounds etc.
So what i want to do is :
<div data-role="view" data-layout="overview-layout" id="testview" data-title="testview title" style="
background:url('.$pageinfo['backgroundimage'].');
background-repeat:no-repeat;
-moz-background-size:100% 100%;
background-size:100% 100%;">

In this case i need the background image to fill the screen even if there is no content

It seems like when rendering my custom styling is not used at all.


Any solutions ?

Thanks alot guys.

Tom



Tom
Top achievements
Rank 1
 asked on 05 Sep 2012
2 answers
177 views
Hi,
I am in the process of updating our Company Website and found Kendo UI, which seems exactly what I need.
Though, there is one problem I came across, which seems like I can't find an easy solution to it. We are using Graphs (mainly bar and line) and I would need a dropdown field/html code in the title of the chart (or anywhere else in/on/around the chart).
When I try HTML code in the Title, it either just doesn't work or messes everything up.

The only solution I can think of, is with another div unrelated to the chart, but this would be a really unsatisfying solution. So I was wondering, is there any way this can be done or added?
Otherwise this seems like a really great product!

Cheers,
Markus
uzi
Top achievements
Rank 1
 answered on 05 Sep 2012
1 answer
184 views
Hi!
I have following issue: if "this" keyword used in source binding, MVVM recreates the whole DOM starting from this node if any child value of "this" observable model changes. here is a fiddle to reproduce it:
http://jsfiddle.net/uBgnr/21/ 

If instead of "this" model member is used, DOM is not recreated, here is another fiddle:
http://jsfiddle.net/uBgnr/20/

In this case I could avoid this behavior, but I have following scenario and I could not change data structure:
I have an array of elements to be bind in a div. But the problem is: each of element has it's own template, stored in field "template", so I could do following:
<div data-template="element" data-bind="source:elements"></div>
<script id="element" type="text/x-kendo-template">  
    <div data-template="#=template#" data-bind="source:this"></div>
</script>

this will work, but as I said if any child field of  my view model will be changed, MVVM recreates div with "source:this" binding

using "#if" inside element template is not an option, templates are huge, and could be used also not only within "elements" binding, so I need to copy/paste them, its dirty. 

Suggestion: it would be nice something like this:
<div data-template-field="template" data-bind="source:elements">

Please help.
Alexander Valchev
Telerik team
 answered on 05 Sep 2012
5 answers
86 views
Hi Kendo guys,

When I try to force platform blackberry on android, all the icons show blank boxes.

app = new kendo.mobile.Application($(document.body), {platform: "blackberry" });

Everything works great on the desktop browsers, i.e. Safari and Chrome, but on Android I get empty boxes.

I tried to debug the issue, using Chrome Debug Console, I found that I can replicate the same on Desktop by removing the tick from the style:
-webkit-mask-image: url("images/icons.png");

If I use, ios or android as platform, everything works. Except the blackberry.

On a side note, I already tired this CSS and it has no impact.
.km-blackberry
{
    -webkit-transform: translatez(0);
    -webkit-transition: -webkit-transform .0001ms;
}

Any solution?
Kamen Bundev
Telerik team
 answered on 05 Sep 2012
3 answers
569 views
Hello,

I want to create an admin module to create states/provinces. I have a database with two tables, states and countries.
In the states table, we have a name and country_id, referring to the table countries.

I've used CRUD for the countries, which is working great.

For the states i collect the data: states.id, states.name, states.country_id, showing in the table.
When i edit a row (popup), I use a kendoDropDown which is also working correctly. 

Now what i want to achieve is when showing the grid, i don't show the country_id, but i want to see the corresponding countries.label.

I've tried to change the transport:read to remove the country_id and replacing it with countries.label, but then the combobox isn't working properly. 

Can anybody help me?

Thanks,
vince


I use the following code:
$(document).ready(function () {
            var crudServiceBaseUrl = "/crm/api.php?",
                        dataSource = new kendo.data.DataSource({
                            transport: {
                                read:  {
                                    url: crudServiceBaseUrl + "class=States&action=view",
                                    dataType: "json"
                                },
                                update: {
                                    url: crudServiceBaseUrl + "class=States&action=update",
                                    dataType: "json"
                                },
                                destroy: {
                                    url: crudServiceBaseUrl + "class=States&action=delete",
                                    dataType: "json"
                                },
                                create: {
                                    url: crudServiceBaseUrl + "class=States&action=add",
                                    dataType: "json"
                                },
                                parameterMap: function(options, operation) {
                                    if (operation !== "read" && options.models) {
                                        return {models: kendo.stringify(options.models)};
                                    }
                                }
                            },
                            batch: true,
                            pageSize: 30,
                            schema: {
                                model: {
                               id: "id",
                                    fields: {
                                        id: { editable: false, nullable: true, type:"number" },
                                        name: { type:"string", validation: { required: true } },
                                        country_id: { type:"string", validation: { required: true } },
                                    }
                                }
                            }
                        });


                    $("#grid").kendoGrid({
                        dataSource: dataSource,
                        pageable: true,
                        height: 400,
                        toolbar: ["create"],
                        sortable: {
                            mode: "single",
                            allowUnsort: false
                        },
                        filterable:true,
                        columns: [
                            { field:"id", title: "ID" , width: "80px"},
                            { field: "name", title:"Name"},
                            { field: "country_id", title:"Country", editor: cntry_combo_editor},
                            { command: ["edit", "destroy"], title: "&nbsp;", width: "185px" }],
                        editable: "popup"
                    });
                });
           
function cntry_combo_editor(container, options) {
                $('<input name="' + options.field + '"/>').appendTo(container).kendoDropDownList({
                            autoBind: false,
                            dataSource: {
                                type: "json",
                                transport: {
                                    read: "/crm/api.php?class=Countries&action=view"
                                }
                            },
                            optionLabel: "Select Country",
                            dataTextField: "label",
                            dataValueField: "id"
                        });
            }
Paolino
Top achievements
Rank 1
 answered on 05 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
ScrollView
Switch
TextArea
BulletChart
Licensing
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
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?