How to make Kendo Grid data culture specific? - kendo-ui

I am using kendo for displaying data to the different chart like Area or Bar Chart. .
I want that column name to be culture specific that column name coming from the database
Is this possible ??
Give me solution
Thanks in Advance

I don't really understand what you are asking, but you can annotate the data field with an attribute [Display(ResourceType = "MyApp.Resources.NameOfField")]. Then create resource file for each language and the ASP.NET MVC will decide which resource file to load (depending on users language) and KendoUI will use this display name in the grid column header.

Related

Xamarin Forms - Hidden field that hold Unique id on page

I want to store id in back of the page. in web application we are using Hiddenfield for this. but i am not getting any way in xamarin forms. how do i hold unique id on page?
Is there any way to to hide any label or any text field so that i can store ID in it.
I'm not sure what do you want to here, but why don't you just add a Label and set its IsVisible property to false? It'll act like a HiddenField.
Or you can just set the value Tag property of any of your other fields with the Unique ID.
Another way is why not use MVVM Pattern? In order for you to easily work with data, which I would recommend but will take you alot of time to set up.
But I guess what you're looking for is a quick fix, The first two would suffice.
Hope it helps!
As #mindofai says, if you use MVVM then your Id can just be a field or property of the PageModel associated with the Forms page. You don't need hidden UI elements.
If you don't find Tag property for some reasons, you can still use ClassId for bindable field or StyleId for plain text.

using ajax i am binding kendo grid in the date column it returns kendo grid returns /Date(1403789061723)/?

using ajax i am binding kendo grid in the date column it returns kendo grid returns /Date(1403789061723)/ other Fields are binding properly.In case of Normal binding its working perfectly.is there any way to fix this error...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Ok. The first thing I would ask is what is the model structure of your data that is being presented back to the grid.
I suspect that you are using a complex model that is not flattened eg. You have some custom classes with multiple properties within them.
If this is the case the grid and the datasource can not figure out what the actual data type is and treats anything not at the top level of data as a string.
To get around this either flatten out the viewmodel data that is being assigned to the grid or use the parsing functions to present the date back. Something like this should work:
columns.Bound(c => c.Date).ClientTemplate("#=kendo.format(\"{0:ddd, dd MMM yyyy}\",kendo.parseDate(Date))#")
Obviously putting what ever date time format you want.

in kendo grid column how to use autocomplete

In a Kendo grid, how to bound the column with auto complete option in MVC web application. Want to display grid product name in autocomplete option. In that option need to bound Product item code and Product Item Name. Have any custom editor in a Kendo grid?
You can find one way on how to do it at How to have an autocomplete field inside kendoUI grid using asp.net mvc wrapper. Basically you will have to create EditorTemplate and reference it from grid.
Hope this helps.

Telerik MVC3 Grid Differentiating Filtered Column Name

Can anybody suggest me the possibilities to differentiate the filtered Telerik grid column with other columns. Meaning that I can provide different color scheme to differentiate the filtered column.
Thanks
Speaking as someone who has had to deal with the Telerik MVC grid in a similar manner, I will share with you my solution for doing this:
1) Run the web page that has your grid, and view the source.
2) Find out, by viewing the source, what exactly happens when the filter is turned on (i.e. an attribute change, some function being called, etc.).
3) Using jQuery, set the color scheme of that column when that event occurs.
It's rather annoying that you can't just do it using Telerik's control itself, but this should help you out.

Dynamic editable table/grid generation with postback in MVC

I need to generate a table in MVC that can have a variable set of horizontal columns (years). I need to render a textbox in each cell and I need to postback the values to a action method. I have seen examples where the editable cells are generated but the columns are fixed (using partials). I have also seen examples where the table can be rendered with dynamic columns but without the editable cells/textboxes. Can anyone suggest an approach?
I would recommend creating the dynamic table with a textbox in each cell with an onchange action to send the data via ajax to the controller for the update.
You will probably need to pass a multidimensional array within the model and use it to create and load your table.
The question is though how are you expecting to handle this on the server side?
If you name them all sequentially and know the # of columns ahead of time the model binder CAN bind to a list for you if they are all named in the appropriate format. Do you want to generate the list from a model or some other method?
Phil Haack covers how the naming format is, although the EditorFor will handle this automatically in some cases. If it doesnt work in yours, simply naming them in this scheme should work.
http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx

Resources