Telerik Forums
Kendo UI for jQuery Forum
5 answers
283 views
So I've been working a lot with the Kendo Grid lately. I've been able to get Server side filtering, sorting and virtual paging working in MVC. Now that I've found that out I want to be able to update the columns of the grid when I'm filtering data.

For example I have a grid which will list a set of people. I have the ability to filter those people by sub sets such as workers, farmers, or managers. Each of these filters would cause me to want to display different column information which is more pertinent to the subset I'm filtered on.

I've tried a few things:

1. Breaking the parameter for a grid's columns out into a separate variable (similar to how you would with a data source). This will work when the page loads, but my postback with the filters will not refresh the column list in the grid.
2. I've tried making a function that will look at what changed and pass a new array of columns, that doesn't work either
3. I've tried calling $("#MyGrid").empty(); and then re-building the object. This works about 1 of 3 times or less...I'm not quite sure what occurs as I'm getting errors from the minified web ui javascript. The errors I've gotten are:
     - d.dataSource.group() is undefined
     - f is not a function

I'm looking for any way in which I can refresh the column list with new data. Or a way in which I can display this information without making multiple grids which I would have to then show or hide.

EDIT: I want it to be known that I'm not trying to show/hide columns (as I know that is currently in feature request) but I'm looking instead to refresh the column collection used on the current grid.
Alexander Valchev
Telerik team
 answered on 19 Jun 2012
0 answers
207 views
Hi,
I want to my  horizotal  navigation. all navigation text bind with calling a web service(dynamically)
is there are way bind my data like horizontal like navigation.png image or any other alternate to bind data like it

Rajinder
Top achievements
Rank 1
 asked on 19 Jun 2012
1 answer
110 views
Can you share a data set between multiple iframes on a page so that if one updates they all update?
Alexander Valchev
Telerik team
 answered on 19 Jun 2012
2 answers
445 views
I apologize if this has been asked before, the forum search didn't seem to turn up the answer.

I am creating a grid with editable=false. Later on, if conditions are satisfied, I want to set editable=true. I haven't been able to find anything in the API, is this even possible in 2012.1.311? Or am I going to have to destroy and recreate the grid?
Steve
Top achievements
Rank 1
 answered on 19 Jun 2012
1 answer
105 views
Hi, 

Not been able to Unbind KendoDraggable from KendoGrid. Is there any way of doing?

Thanks
Mohammed
Top achievements
Rank 1
 answered on 19 Jun 2012
1 answer
136 views
I just used the ThemeBuilder for the first time and I'm noticing that within the generated CSS, there are references to your cdn.  Is there a way to prevent the usage of the cdn references?  Our product is a global enterprise product that may be used by customers that have very tight firewalls and will not have access to the cdn urls.

Any information you can provide will be greatly appreciated.

Thanks!
Troy
Top achievements
Rank 1
 answered on 19 Jun 2012
3 answers
151 views
Hello support,

I downloaded a ASP.NET MVC examples package to try out the grid, especially the filter functionality. In the "Grid basic usage" example, some filters do not work, e.g. the "contains"-filter. Is this by design, as it is an example/trial version? Are all filter options that are displayed available in the (commercial use) package?

Thanks for your reply,

Joachim
Iliana Dyankova
Telerik team
 answered on 19 Jun 2012
1 answer
110 views
Hi all,

First of all I want to say thanks for this great tools to accelerate web development. I am new to Kendo UI, and just learning about the KendoUI Grid. I am using a remote data source with server paging, filtering, sorting. Most of all the things already working nicely (thanks to this great tools). But right now I am facing a problem which related to the paging. 

The problem is actually very simple, I have data with several pages. If I navigate through the grid pager, for example currently right now I am navigating to page 3. The I apply a filter to the grid, which only have 1 page in total, the grid will display no data since the page displayed by the grid right now is 3. Is there any way/workaround to this problem? For example querying local data after retrieve from the remote data to set the page automatically to page 1 when the available page is less than current page navigated in the pager.

Thanks before for help. Thanks !!
Jackie
Top achievements
Rank 1
 answered on 19 Jun 2012
3 answers
158 views
Per my requirements i needed to pagers in the page.  This is how i accomplished it.  I think it can be simpler though?

1. create two pagers in the html
2. detach and move one on databound event.

http://jsfiddle.net/wolfpackt99/VAhLk/4/

I stumbled onto the two divs with same class as pager working.  I guess that is if you have table first method.  but how do i get the table in the middle?
Alexander Valchev
Telerik team
 answered on 19 Jun 2012
2 answers
554 views
I fetch data from the server using like so (the fetch url has been predefined using jQuery.ajaxSetup()):

var dataSourceStatistics = new kendo.data.DataSource({
    transport: {
        read: {
            data: {
                f:'getCustomerStats',
                fromDate:function () {
                    return kendo.toString(kendo.parseDate(calendarstart.value()), "yyyy-MM-dd")
                },
                toDate:function () {
                    return kendo.toString(kendo.parseDate(calendarend.value()), "yyyy-MM-dd")
                },
                custStats:null
            }
        }
    },
    schema: {
        data: function(data) {
            return data.result.custStats.Record;
        },
        model:{
            id: "Employee",
            fields: {
                Employee: "Employee",
                Value: "Value",
                ValueUsed: "ValueUsed",
                ValueLeft: "ValueLeft"
            }
        }
    },
    pageSize: 10
 
});

After I execute read() the DataSource contains data, and the objects look OK. 
Example:

[{"Employee":"John Doe","ValueUsed":"50","ValueLeft":"0"}]


But executing the method total() returns 0 and get(index) always returns undefined. 
What am I doing wrong?
Jesper
Top achievements
Rank 1
 answered on 19 Jun 2012
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?