I want to make the grid editable by using different types of editors based on row value in kendo mvc. Please suggest some suitable approach.
I tried with Javascript event handling but that did not worked.
Related
I would like to be able to add some custom text within the built in pager area of Telerik's Grid component for Blazor. It would also be nice to be able to change the predefined text, but the image below shows what I would like to accomplish.
I have found several resources showing how to do this using other Telerik products, but I haven't been able to find anything for Blazor. Here is an example I found for Kendo UI for Angular Changing the text of the paging area in the grid and another one I found but for ASP.NET AJAX Change label text of pager item. However, these did not help me much.
Does anyone know of a way I can accomplish this?
If you want custom markup within the Pager, they have a logged item for that - https://feedback.telerik.com/blazor/1557339-pager-template
If you just want to update the label/s, you should be able to do this through the localization strings - https://docs.telerik.com/blazor-ui/globalization/localization
I have a grid that shows quotes, I'd like to use a ComboBox to show a list of available clients and users that can be assigned to the quote (From the database).
Can anyone advise on how to achieve this?
Perhaps this example will be useful? - http://demos.kendoui.com/web/grid/editing-custom.html
That uses a DropDownList in edit mode, rather than a ComboBox, but the two controls are very similar.
I would like to make text selection possible inside grid with multirow selection enabled.
My solution to this problem is to use for example CTRL key to temporary disable multi selection, use single row selection to enable default text selection mechanisms.
I do not know if there is a solution to change grid options after it is being initialized (and I couldn't figure it out myself)
I use Kendo MVC in C# and Razor extension to create the grid.
Any ideas?
Use the same approach as the one suggested in this question. Basically for your case it would look like this:
$(function(){
$('#GridName').data('kendoGrid').tbody.on('mousedown',function(e){
if(e.ctrlKey){
e.stopImmediatePropagation()
}
})
})
I am struggling to get the Telerik MVC Grid to display number formatted according to Indian standards. Basically, I have a number, for example - 55555555555 and I want it to be displayed by Telerik MVC grid as 55,55,55,55,555. So I tried to use the pattern "##,##,##,##,###". This worked well for the above example. However, if I use 555555555 (two 5's less than the earlier example), then it displays as 555,555,555 instead of 55,55,55,555. I am not sure why this happens.
How do I have a Telerik MVC grid display number according to Indian number formatting as mentioned at start?
You can localize all values on the grid by setting the .Localizable("hi-IN") on the grid itself.
Telerik MVC Grid Localization
There is a jquery globalization plugin available at https://github.com/jquery/globalize#format. That makes the task of formatting very easy particularly if the formatting is to be done at client side.
regards,
Nirvan.
Is it possible to have multiple display templates for the same object in asp.net mvc?
In my situation I have a Comment object. I would like to use DisplayFor to automatically loop throught an IEnumerable in my view and display the proper template for each item. This works great. Now say I have another view where I also need to display a list of comments in the same manner...But I wants these comments to be editable by the user.
So basically, Can I have 2 display templates, one for read-only display and one for editable display(or other similar scenarios)?
You are looking for EditorTemplate
You could also specify the templateName in the DisplayFor methods.