Telerik Forums
UI for ASP.NET MVC Forum
1 answer
113 views

Hi,

I was wondering if there is a generic way to refresh the grid clientside, no matter if the grid uses paging or not.

This works:

    var grid = $('#' + gridId).data("kendoGrid");
    grid.dataSource.query({
        page: 1,
        pageSize: 10
    });

But that code is for paged grids only.

This code below also works, but doesnt set pageIndex to first page.
$('#ProductsGrid').data('kendoGrid').dataSource.read();

 

I was actually looking for something like a generic .refresh() function, which is also there, but doesnt work (anymore?).

 

Martin

 

Tsvetomir
Telerik team
 answered on 19 Mar 2021
1 answer
142 views

Hi,

How can I achieve a column formatted to show buth date as time part. Something like: dd-MM-yyy HH:mm:ss

I tried this format, but it showed only the date part.

And also: how can I achiveve this dependdant of the users' culture ? (available in my application in bith a serverside as a clientside variable).

I prefer to achieve this serverside.

Martin

 

Nikolay
Telerik team
 answered on 19 Mar 2021
1 answer
1.1K+ views

Hi,

I would like to format date columns and decimal number columns in the correct format, according to the logged in users' culture.
I found examples / code snippets of that, but those didnt work. Maybe because a clientside culture variable was needed but not present or so. or maybe because the formats were not supported I dont know.

Anyway, how can I achieve culture formatting in the grid ?

Preferably in a simple serverside way. And also preferably not on application level (by setting application culture), but controller level, or just custom formatting myself serverside, without setting the culture on application level.

For example, I live in the Netherlands, where the date format is: dd-MM-yyyy, and the decimal number format N2, or e.g.: 2.500.000,95

I have the culture of the logged in user both serverside as clientside in a variable.

 

Martin

 

Tsvetomir
Telerik team
 answered on 19 Mar 2021
21 answers
2.2K+ views
Hi,

in one of my usecases, I have a custom command.  When clicked it does some server side calculations and returns an updated data model for the row.  This is kind of like a row edit except the editing is not done by the user directly in the row but via some business logic on the server and the updated row is returned to the grid.

The grid as to overlay this data in to the row.

Is there a way to do this with a regular click action, but then grab the returned row viewmodel and through javascript update the row?

I see the client side click event, but it seems then I would have to wire the ajax call in there.  It would be nice to razor script the action that's invoked when the command is clicked, then intercept the returned data on the client side and amend the row data.

Could you maybe post a couple of lines of code for the best practice to do this?

Thanks
Eyup
Telerik team
 answered on 19 Mar 2021
2 answers
211 views

The input tag used by DropDownList is sometimes briefly visible on the page while JavaScript and CSS assets are loading.

If the input tag is meant to be hidden anyway, why aren't you writing the style attribute out with the HTML from the tag helper?

Instead it's being set by the associated scripts, which means the input is visible until the script has loaded and run.

Ivan Danchev
Telerik team
 answered on 18 Mar 2021
3 answers
129 views

I have a chart with a date axis, set to show weeks. This works, but it is showing the month first, ignoring the UK culture setting. How can I set the weeks display to days first, then month?

 

Thanks

Anton Mironov
Telerik team
 answered on 18 Mar 2021
1 answer
107 views

I have designed the master-details grid using this example

https://demos.telerik.com/aspnet-mvc/grid/detailtemplate

But, I have noticed that it it the controller (as database) multiple times. Only difference between this code and my code is that I am using asynchronous action method.

Could you please let me know how to stop multiple hits to database / controller on load of grid?

Tsvetomir
Telerik team
 answered on 18 Mar 2021
2 answers
107 views

I am new to Kendo Grid I am gring to show data from a API using kendo and then add an addtional column for Quanity that would be an input field.

The idea is a list of items that a person can add quaity to and then click add to cart and another script runs.The script would add the items to a separate area.

I believe I have the button working to add items but I am having difficulty with adding the input column as it is not bound to the data source.

Is this possible?  I have looked at using Row Templates but they seem to bond back to the data source.  Can some one help provide some idea?

Georgi Denchev
Telerik team
 answered on 18 Mar 2021
2 answers
249 views

Hi everybody,

I am continuing my diagram development and facing the following issue.

I need to have a Yes No check on the component (as per the drawing), I would like to know if it is doable and if it can be linked to the component data.

thanks for the support

Ray

 

Tsvetomir
Telerik team
 answered on 17 Mar 2021
3 answers
801 views

Hello, I would like to localize a kendo grid so that all messages and formats are using a specific language (german in my case).

By default, the grid uses english language.

I tried to include the language script and kendo.culture in the view.

<script src="@Url.Content("~/lib/kendo-ui/js/cultures/kendo.culture.de-DE.min.js")"></script>

kendo.culture('de-DE');

This causes two problems. The culture is now changed globally, whereas I would only like to localize a specific control.

Secondly, if I edit a cell in the grid, it does not display the german format, but uses english format.

Neli
Telerik team
 answered on 17 Mar 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?