Telerik Forums
Kendo UI for jQuery Forum
1 answer
132 views
Hi all,

Below is a cut of from my JS, CS, etc of how I create the kendo GRID. For IE9 after the read() the ajax call hangs and nothing is populated. On FF, Chrome it works fine. What do I do wrong. Please help.

// templates
<script id="rowTemplate" type="text/x-kendo-template">
    <tr style="height: 24px;">
        <td colspan="1">
           #= Id #
        </td>
    </tr>
</script>
<script id="altRowTemplate" type="text/x-kendo-template">
    <tr class="k-alt" style="height: 24px;">
        <td colspan="1">
           #= Id #
        </td>
    </tr>
</script>

// createGrid
function createGrid(gridId, locale, controller, action) {
    $(document).ready(function () {
        grid = $(gridId).kendoGrid({
            dataSource: {
                transport: {
                    read: {
                        url: "/" + locale + "/" + controller + "/" + action,
                        type: "POST",
                    },
                    parameterMap: function (options) {
                        return JSON.stringify(options);
                    },
                    pageSize: 10
                },
                schema: {
                    data: function (response) {
                        var d = JSON.parse(response);
                        return d.Data;
                    },
                    total: function (response) {
                        var d = JSON.parse(response);
                        return d.Count;
                    },
                    errors: function (response) {
                        if (response.Errors !== undefined) {
                            alert(response.Errors.e.errorThrown);
                        }
                    }
                },
                error: function (e) {
                    alert("Received error: " + e.errorThrown);
                },

                total: 0,
                page: 1,
                pageSize: 10,
                filter: [],

                serverPaging: true,
                serverFiltering: true,
                serverSorting: true,
                serverGrouping: true,
                serverAggregates: true
            },

            autoBind: false,
            groupable: false,
            selectable: true,
            scrollable: false,

            rowTemplate: kendo.template($("#rowTemplate").html()),
            altRowTemplate: kendo.template($("#altRowTemplate").html()),

            pageable: true,
            columns: [{ field: "Id", width: 40, groupable: false, encoded: true }],
        });
    });

    $(gridId).data("kendoGrid").dataSource.read();
}

// controller
[HttpPost]
public string GetEmployees(KendoGridDataSourceRequest request)
{
    if (_usersLoaded == null)
    {
        var users = _userService.FindUsersByName("a%", null, 12);
        _usersLoaded = ViewModelBuilder.CreateEmployeeItemVMList(users).ToList();
    }

    var items = _usersLoaded.Skip(request.Skip).Take(request.Take).ToList();
    var jsonString = JsonConvert.SerializeObject(new
        {
            Data = items,
            Count = _usersLoaded.Count()
        });
    return jsonString;
}
Alexander Valchev
Telerik team
 answered on 28 Jan 2013
3 answers
274 views
When I access a site using the Kendo grid on a touch enabled device like the iphone or ipad, the row selection isn't ideal.  As you try to drag to scroll the page the grid selects all rows along the scroll (actually it seems to be a bit weirder than this as to what rows are selected).

Is there a preferred method for selecting rows when being used on a touch device?
Nikolay Rusev
Telerik team
 answered on 28 Jan 2013
1 answer
317 views
Hi,  i'm currently using a ajax call to append the TH and TD rows on a table template and then using the table ID i use the kendo grid to stylize it. 

my template is the following :
<table cellpadding="0" cellspacing="0" border="0" class="display" id="data-table{id}" width="100%" role="grid" data-role="grid">
<thead>
<tr id="append_head{id2}">

</tr>
</thead>
<tbody id="append_data{id3}">

</tbody>
</table>

if i hard code data into the head TR and in the tbody and then append the table on the HTML  and then use the :
$("# data-table" + id).kendoGrid({
   });
it works flawlessly .

But if i attach the TH and the TD rows using ajax and then  then append the table on the HTML  and then use the :
$("# data-table" + id).kendoGrid({
   });

then the fuctionally of the table is broken and also is not displaying correctly.

Can you please tell me if im doing something wrong? or missing something?

thanks
Alexander Valchev
Telerik team
 answered on 28 Jan 2013
1 answer
313 views
Hi All,

How to get current page index when I click on kendo pager button?
I have tried in following way to get page index. But it is not working.
$('.k-link').live('click', function (e) {
    alert($(this).text()); 
});

How we can get page index? Immediate help would be appreciated.

Regards,
Partha.

Iliana Dyankova
Telerik team
 answered on 28 Jan 2013
8 answers
326 views
I created a Kendo Chart that uses xml remote data for the dataSource. I added a "seriesClick" event to the Kendo chart and I added an alert statement in the seriesClick callback function. When I load the Kendo chart on an IPAD, I click one of the bars (series) on the bar chart, but it usually takes 2 or 3 clicks before the alert statement appears. Also, when I click one of the bars on the chart, the whole chart is highlighted as well. I don't have any of these issues when I run it in a browser on my PC, it only happens when using the Safari browser on an IPAD.

Is this a limitation of the Kendo chart on an IPAD, or am I doing something wrong? Thanks.
T. Tsonev
Telerik team
 answered on 28 Jan 2013
3 answers
237 views
Hello,

When I use data-value-update="keyup" in input text element
model is not updated when I inserted text by mouse ("paste" operation).
Even when I click to "Save" button (focus is lost) model still has no value.

If I remove data-value-update="keyup" all starts working well.
This is very inconvenient because I need both these functions: "on key up" update and update on "paste" by mouse.

Can I use both these update events?

Vladimir
Petur Subev
Telerik team
 answered on 28 Jan 2013
2 answers
254 views
Hi,

I'm using kendo autocomplete in MVC Razor as
 @(Html.Kendo().AutoComplete()
                                    .Name("txtWorkAssignedTo")
                                              .Filter("startswith")
                                              .Placeholder("Select Employee...")
                                              .DataTextField("EmployeeFirstName")
                                              .BindTo(Model.Employees)
                                              )
where Model.Employees datasource class contains
EmployeeFirstName
EmployeeKey
EmployeeLastName and so.

I want to get EmployeeKey in formcollection if they chosen corresponding EmployeeName in autocomplete.
I used telerik in my last project and know that's possible. Here i cnat able to understand few things.
Expecting Team's Help...

Thanks,
PreethiBaskaran.
Bspreethi
Top achievements
Rank 1
 answered on 28 Jan 2013
2 answers
341 views
As a developer who's invested a considerable amount of time and work into Knockout I'm wondering how much of that knowledge can be leveraged using Kendo UI's Databinding. Could someone point the biggest differences, disadvantages (if any) or advantages?
Jaime Weise
Top achievements
Rank 1
 answered on 27 Jan 2013
8 answers
1.7K+ views
Hello geeks,

I have an issue concerning the pagination. I set the paging features for the grid but when I move to the next page there is no link to come back to the previous. Can you please assist me. This is the code I used:

$("#users-list").kendoGrid({
        dataSource: {
            transport: {
                read: "<%=request.getContextPath() %>/UsersServlet?action=8"
            },
            schema: {
                data: "data",
                total: "total"
            },
            pageSize: 2
        },
        columns: [ 
                  { title: "Full Name", field: "fullName" },                   
                   { title: "User Name", field: "userName" }, 
                   { title: "Status", field: "status" },   
                   { title: "Expiry Date", field: "expiryDate" },                   
                   { title: "Creator", field: "createdBy"},
                   { title: "Creation Date", field: "creationDate" }
                 ],
        scrollable: false,
        pageable: true,
        sortable: true,
        filterable: true,
        
    });
});


I have two records in the result
Mark
Top achievements
Rank 1
 answered on 27 Jan 2013
6 answers
467 views
I need to use characters like "plus minus" or "lambda" symbols, and I would normally use &plusmn; and &lambda;, but those key references simply display like that, and not encoded as the characters. 

Does anyone know how I can get these types of characters into a template?  I'll be populating the template from JSON data.

Thanks,

King Wilder
King Wilder
Top achievements
Rank 2
 answered on 26 Jan 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
Drag and Drop
Map
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
Licensing
ScrollView
Switch
TextArea
BulletChart
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
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?