Telerik Forums
Kendo UI for jQuery Forum
1 answer
116 views
Hi I am using Kendo Grid with autorefresh each 5 seconds, The problem is that after refresh when table is rebuild, selection of the row is lost and restoration is visible, what I mean is I can see blinking of selection during data update.In telerik extension there was an event OnRowDataBinding wich was triggerd after each row data binding and we could restore selection very nice, but here is only event DataBound and Kendo says to loop throu all items but because of that selection restoration is very visible and it looks terrible. What I could do ?function onParkedOrderGridDataBound(e) {

var data = this.dataSource.view();
var dataItem = data[0];
var tr = $parkedOrderGrid.find("[data-uid='" + dataItem.uid + "']");
AcceleratorDealingUiKendoGridCheckBoxSelector.MarkRowAsSelected(tr, true);
var $row = $(tr);
$row.addClass("k-state-selected");
}
Dimo
Telerik team
 answered on 25 Feb 2014
3 answers
81 views
I have a simple mobile form using listview that works fine in safari. When pinning the app to the home screen the listview is pushed up by the keyboard and you cannot get to the input fields.

I have installed 2013.3.1414.

Thanks,
Richard
Kiril Nikolov
Telerik team
 answered on 25 Feb 2014
2 answers
127 views
For the navbar if the title is very long it goes over the top of the back button shown on the left. How would I go about padding the title so that it wordwraps rather than going over the back button?

I've tried some style settings with out any success.

<header data-role="header">
<div data-role="navbar">
<span data-role="view-title"></span>
</div>
</header>

Thanks
Keith Avery
Keith Avery
Top achievements
Rank 1
 answered on 25 Feb 2014
1 answer
754 views
I am attempting to use a ListView to create a simple discussion board style capability. So far, so good except for one nagging problem. I can't figure out how to get a new item to appear in edit mode at the bottom/end of the list. The documentation says that .add() adds the item as the first item. I've found some reference to using the data source to add an item at the end, but even if I do that it still seems to add at the top and doesn't go into edit mode anyway.

Is there any way to accomplish this?
Nikolay Rusev
Telerik team
 answered on 25 Feb 2014
1 answer
98 views
Hello,

I want to use a DataViz Chart (line chart or area chart) to display chronological data. It is necessary that the category axis covers a month from the beginning to the end. The baseUnit property will be set to "days".

The current month causes a problem: My application does not calculate any values in advance. Therefore, the chart hides all categories for dates in the future.

Is it possible to avoid this adjustment?
Iliana Dyankova
Telerik team
 answered on 25 Feb 2014
1 answer
1.0K+ views
I have a Kendo UI DataSource that works when I use fetch(), but when I use the exact same configurtation with read() it fails. This is a problem as I need to retrieve data more than once and I can't do that with fetch().

Here is the DataSource code - 

var FieldsDataSource = new kendo.data.DataSource({
transport: {
read: {
url: "../WebServiceAddress",
dataType: "json",
type: "POST",
contentType: 'application/json; charset=utf-8',
cache: false
},
parameterMap: function() {
return "{some mapping that has been confirmed to work}";
},
schema: {
data: function (data) {
if (data && data.d) {
//execution gets to here and stops
return data.d;
}
else {
return [];
}
},
}
 
});


Here is the code that calls the DataSource.read() function - function loadFields() {

FieldsDataSource.read(function() {
var data = this.data();
if (data.length > 0) {
 
for (var i = 0; i < data.length; i++) {
var dataitem = data[i].Key;
$("#" + dataitem + "_field").prop("checked", data[i].Value);
}
}
});
}


If I change "FieldsDataSource.read(function()" to "FieldsDataSource.fetch(function()" everything works, but that doesn't make sense as I was under the impressionthat read and fetch do the same thing the difference being fetch only gets data once.

What I do know is that the data is being returned from the server, I can see it in fiddler - but the execution stops in the schema section where I flagged it in my code sample.

Apologies if I am asking a really obvious question, but I'm very new to Kendo.
Rosen
Telerik team
 answered on 25 Feb 2014
2 answers
112 views
Hi guys,
I'm working with a kendo mvc grid
here it is

@(Html.Kendo().Grid<Entity>(Model)
        .Name("valueGrid")
        .ToolBar(commands => commands.Create())
        .Columns(columns =>
        {
            columns.Bound(c => c.DOMAINID);
            columns.Bound(c => c.CODE);
            columns.Bound(c => c.VALUE);
            columns.Command(command => { command.Edit(); command.Destroy(); });
        })
        .Sortable()
        .Scrollable()
        .DataSource(dataSource => dataSource       
        .Ajax()
        .ServerOperation(false)      
        .Model(m => m.Id(v => v.DOMAINID))
        .Update(update => update.Action("UpdateValue", "DomainValue"))
        .Create(create => create.Action("CreateValue", "DomainValue"))
        .Destroy(delete => delete.Action("DeleteValue", "DomainValue"))
     )
    )


and that's my controller

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult CreateValue([DataSourceRequest] DataSourceRequest request, Value domValue)
{
    if (ModelState.IsValid)
    {
        db.Values.Add(domValue);
        db.SaveChanges();
    }
    DataSourceResult result = db.Values.Where(v => v.DOMAINID == domValue.DOMAINID).ToDataSourceResult(request, ModelState);
    return Json(result);
}

The whole operation works fine, the only issue is that the grid display wrong values...

ex

grid with values (id: 5, name: test, value: test)

if I add a new object (6, trial, trial); the new object is correctly added to the database but the new object appears with the same values as the first one in grid (in this case with 5, test, test...

I attached 2 screenshots to better explain my issue.

Thanks
Fabio
Gaetano
Top achievements
Rank 1
 answered on 25 Feb 2014
3 answers
183 views
Ok, I have wore Google out searching for possible solutions so I hope you here can help me. It is something simple I am sure but I have spent a couple of days (no laughing) on this. All I get is "Loading" on trying to load a list view view from a JSON remote datasource...it works fine if I declare the data locally in the file. so here is the code and what is being returned in Fiddler:

     
<div data-role="view" data-title="Brokers" id="side-root">
     <ul id="lvBroker" data-role="listview" data-style="inset" data-source="brokers1" data-template="brokerTemplate">
     </ul>
 </div>
 
 <script id="brokerTemplate" type="text/x-kendo-template">
 <table>
   <tr>
     <td>
       #: data.LastName #, #: FirstName # <br/>ph: #: Phone #
     </td>
   </tr>
 </table>
    
 </script>
var brokers1 = new kendo.data.DataSource({
    transport: {
        read: {
            type: 'GET',
            url: 'http://website.com/api/brokers' + '/' + 1 + '/all',
            dataType: 'json'
            }
        }
    });
 
$(document).ready(function(){
    var app = new kendo.mobile.Application(document.body, {
        transition: "slide"
        //platform: "android"
    });
  // brokers1.fetch(function(){
  //  brdata = this.data();
  // });
});

Fiddler screenshot and loading screenshot attached.

Thanks much!
Richard



Kiril Nikolov
Telerik team
 answered on 25 Feb 2014
1 answer
98 views
Hi,

The ScrollView works fin on iOS devices but when i try it on Androids.  The page element can be moved in both horizontal and vertical direction; which is very strange for scrollable element.  Please check the link for more clarification:  https://app.box.com/s/4iutxf9uu7ul8vip4zbb

 What should I do to fix this behavior?
Alexander Valchev
Telerik team
 answered on 25 Feb 2014
5 answers
138 views
Hi, can I somehow figure out (in the close event or similiar) that cancel was clicked or that the actionsheet was closed without anything being selected? Or is the best approach to just set a variable somethingClicked = false before opening the sheet that I set to true in my data-action events and check for true/false in the close event?
Kiril Nikolov
Telerik team
 answered on 25 Feb 2014
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
Accessibility
Effects
PivotGridV2
ScrollView
Switch
BulletChart
Licensing
QRCode
ResponsivePanel
TextArea
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
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?