Telerik Forums
Kendo UI for jQuery Forum
2 answers
456 views
Hello,

I have a grid with virtual scrolling on it due to huge data.
On all my grids I would like to create new lines only at the bottom of the grid.
When the grid has to display a validator ("field required" as for exemple) the validator is hidden at the bottom of the grid (we only see the arrow but not the complete message).
I don't think it will be hard to reproduce, is there a workaround ? Thanks
@(Html.Kendo().Grid<Integraal.Models.ImmoBaseCptTiersCompte>()
                .Name(Model.idView + "immoBaseCptTiers_grilleTiers")
                .HtmlAttributes(new { @class = "immoBaseCptTiers_grilleTiers" })
                .Columns(columns =>
                {
                    columns.Bound(m => m.ct_num_compte).Width(80);
                    columns.Bound(m => m.ct_titre);
                    columns.Command(command => command.Destroy().Text(" ")).Width(40);
                })
                .Editable(editable => editable.Mode(GridEditMode.InCell)
                    .CreateAt(GridInsertRowPosition.Top) 
                    )
                .Navigatable()
                .Resizable(resize => resize.Columns(true))
                .Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
                .Scrollable(scrollable => scrollable.Enabled(true)
                    .Virtual(true
                    )
                .Sortable(s => s.AllowUnsort(true).Enabled(true).SortMode(GridSortMode.MultipleColumn))
                .AutoBind(false)
                    .Events(e => e
                        .Edit("immoBaseCptTiers_grilleTiersEdit")
                        .Change("immoBaseCptTiers_grilleTiersChange")
                    )
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(10)
                    .Batch(true)
                    .ServerOperation(true
                    .Events(events => events
                        .Error("kendoGridErrorHandler")
                        .Sync("immoBaseCptTiers_grilleTiersSync")
                    )
                    .Read(read => read.Action("Editing_Read", "ImmoBaseCptTiers").Data("baseCptTiers_additionnalData_read"))
                    .Create(create => create.Action("Editing_Create", "ImmoBaseCptTiers").Data("baseCptTiers_additionnalData_create"))
                    .Update(update => update.Action("Editing_Update", "ImmoBaseCptTiers").Data("baseCptTiers_additionnalData_update"))
                    .Destroy(destroy => destroy.Action("Editing_Destroy", "ImmoBaseCptTiers").Data("baseCptTiers_additionnalData_destroy"))
                    .Model(model =>
                    {
                        model.Id(m => m.ct_num_compte);
                        model.Field(m => m.ct_soc_code).DefaultValue(Global.GlobalSession.societe.code);
                    }))
                )
THOMAS
Top achievements
Rank 2
 answered on 17 Apr 2013
2 answers
167 views

I am having issues getting endlessScroll to work to work with API.  Maybe I am just not putting two and two together.  I have seen options of converting IEnumerable to IQueryable OData, but that did not work either.  Watching the Network trace, it appears that it is passing the correct parameters to the Web API controller.

The current issue is that when I scroll down, the endlessScroll does not get triggered for more records.   It returns the pageSize specified but does not make another request to the Web API Get().  Please help!  And thanks in advance for the assistance.


HERE IS MY INDEX.HTML PAGE SCRIPT.  BELOW IS MY WEB API GET()

<script>
    var dataSource;
    function listViewInit(e) {
        dataSource = new kendo.data.DataSource({
            pageSize: 10,
            page: 1,
            serverPaging: true,
            transport: {
                read: {
                    url: "/api/Message/?isArchive=false",
                    dataType: "json",
                    type: 'GET'
                }
            },
            parameterMap: function (options) {
                var parameters = {
                    take: options.take,
                    skip: options.skip,
                    pageSize: options.pageSize,
                    page: options.page //next page
                };
                return parameters;
            },
            schema: {
                data: function (data) {
                    return data.Data;
                },
                total: function (data) {
                    return data.Count;
                }
            }
        });
 
        e.view.element.find("#secure-inbox").kendoMobileListView({
            endlessScroll: true,
            dataSource: dataSource,
            template: $("#listTemplate").text(),
            scrollThreshold: 10
        })
        .kendoTouch({
            filter: ">li",
            enableSwipe: true,
            touchstart: touchstart_inbox,
            tap: navigate_inbox,
            swipe: swipe_inbox
        });
    }
 
    // Other Functions Removed For Forum Post //
</script>


// GET api/<controller>
       public object Get(bool isArchived = false, int page = 1, int pageSize = 20)
       {
           IEnumerable<Message> data;
 
           int count;
 
           triagedbEntities db = new triagedbEntities();
           db.Configuration.ProxyCreationEnabled = false;
 
           data = (from x in db.view_secure_messages
                       where (x.TriageDecision != null) == isArchived
                       select new Message
                       {
                           msg_id = x.MessageID,
                           message_subject = x.MessageSubject,
                           message_received = x.MessageReceived
                       }).OrderByDescending(a => a.message_received).Skip((page - 1)*pageSize).Take(pageSize).ToList();
           count = data.Count();
 
           return new
           {
               Count = count,
               Data = data
           };
       }
Alexander Valchev
Telerik team
 answered on 17 Apr 2013
1 answer
158 views
How to set the trigger only for the third column td,not all the td in a grid?
I had set all the td like this:
my.contextMenu({
trigger: '#Grid td ',
rightButton: true,
menu: '#testMenu',
callback: ctxCallback
});
Vladimir Iliev
Telerik team
 answered on 17 Apr 2013
3 answers
927 views
Hi,

i try to load a kendo grid in partial view. But i found that edit from inline is not able to work even it was fine at a normal page in this case, i try to copy the same code in index page, grid was working fine.

so i have already upload my test codes, please help to find out what problem exactly it is, thanks!

Daniel
Telerik team
 answered on 17 Apr 2013
1 answer
106 views
I need help on the Add / Edit buttons in toolbar of grid which is bound using local data. Once we add or edit next time when I hit cancel grid is bound with duplicate records except for newly added or updated data. I am sharing the code here http://jsfiddle.net/cE3uM/11/ Its not functioning in fiddle, but in my project its working fine except for this bug. Could please help me find a solution?

Thanks
Vladimir Iliev
Telerik team
 answered on 17 Apr 2013
6 answers
948 views
Hello Kendo,

With your latest 2013Q1 release, we just encountered an error every time when trying to add a new row on ui.Grid, which a templated column was involved. A simple code sample shows as below:

    <script>
        $(function() {
            $('#grid').kendoGrid({
                dataSource: {
                    data: [
                        { a: "dafdsf" }
                    ]
                },
                columns: [
                    {
                        field: "a",
                        width: 120,
                        template: 'template: #= a #'
                    }
                ]
            });

            $('#add').click(function() {
                $('#grid').data('kendoGrid').addRow();
            });
        });
    </script>
</head>
<body>
    <div id="grid"></div>
    <button id="add">add</button>
</body>

When the add button was clicked, an error "Uncaught ReferenceError: a is not defined " went out.

Can you please take a look at this, as this is so much urgent for us. Or could you suggest any other work around?

Thanks,
Wenhao
Wenhao
Top achievements
Rank 1
 answered on 17 Apr 2013
1 answer
92 views
How do you make an area chart whose first x-axis data point is not aligned with the y-axis start the "area" from the y-axis (origin)?

In my specific example, January is our first x-axis data point, and since the January data point is not aligned with the y-axis, there is a space of "emptiness" that looks funny on the chart.  I would like the area chart to begin at the intersection of the x-axis and y-axis so that gap is filled (the January data point does not need to move, the area chart just needs to start at the origin and move to the first data point, which will be January).  The reason the area chart does not begin at the y-axis is because the exhibit includes both an area chart and line chart.

I've added a photo to help describe the problem.

Thanks in advance for the help.

 
Iliana Dyankova
Telerik team
 answered on 17 Apr 2013
1 answer
113 views
Hi,

I'm having an issue whereas if my data is in negatives, the categoryAxis still stays base at zero. Ideally, I would like it not to be zero-based. Coming from a Flex background, a simple solution would be "baseAtZero = false". Is there a property similar or perhaps another way that can fix the positioning of my categoryaxis?

Thanks,
Tonih
Iliana Dyankova
Telerik team
 answered on 17 Apr 2013
3 answers
261 views
We are using Kendo async upload across PC and Mobile platforms, and are encountering issues when trying to upload documents over the mobile-data (3G) network.  Pictures from the iPad (around 250KB) are only successfully uploaded about 25% of the time.  This issue is only occurring on the iPad, in the Safari browser, and when we are not using WiFi.  When using Google Chrome on the device, or when using WiFi, we are able to successfully upload documents without any issues.

This appears to be a network problem, since smaller files (14KB) can be consistently uploaded, while larger files cannot.

When checking the Status and StatusText returned in the onError method, the Status is 0 and the StatusText is empty.  We are able to successfully upload the same documents when attempted on the Kendo upload demo site.

Has anyone encountered similar problems, or have any ideas on what could be causing the inconsistency?
T. Tsonev
Telerik team
 answered on 17 Apr 2013
1 answer
90 views
Hello,

We need advice for 2 changes at kendoStockChart, see attachment:
- we don't know how to change the number of displayed (visible) labels. For example we have chart with date values from 2005 to 2012 and we want to show only 2004, 2009 and 2012 values. Not all years. Is it possible?

- we don't know how to change formatting of displayed labels. We have same chart as above with years formatted as 2005 and would like to change to '05 format. 

Any advice please?

Thank you
Iliana Dyankova
Telerik team
 answered on 17 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?