ASP.Net MVC Webgrid custom pager - asp.net-mvc

I just started using webgrid helper ,seem to be good, but having issue in creating pager. I want to create a pager on top and bottom of grid.
pager format is |dropdown| |previous button| |text|1-10 of 230 rows|text| |Nextbutton|
if i change dropdown number of rows shud change per selection . any thoughts how it can be implemented.

AFAIK this is not supported at the moment by the WebGrid helper. The pager only supports FirstLast, NextPrevious, Numeric and any combination of those. A dropdown is not supported.

Related

Recommended way to do the search and populating the grid in ASP.NET Core MVC 6

I am creating a project where I need to create a view with search textboxes and a dropdown which would be populated from the server. Same view also have a grid which would be populated based on the search criteria enter/selected by user.
I want to know what would be the design of the page in terms of showing both on same page. Should I create a partial view for the grid or Search panel or add both in the single view?
Note that dropdown list would need to be populated from the ViewModel. So what is the common practice in the situation. I am new to this I have done few pages but with lot of code, session and ViewBags and I think I am not following recommended practice.
Actually, the design for your web application is according to your requirement.
For example, if you want grid to work with other datasource or view, you could build it as a component, then if you want to use it, you could directly use this component to avoid write the same codes for multiple time.
If you want to use same grid to show in some other page, you could build it a partial view, then you could directly call this view to show something.

display multiple checkbox in a single row of kendo UI Grid

I am working on Kendo UI. How to display multiple checkbox in a single row of Kendo UI Grid ?
each Kendo component accepts a template which is in kendo's own format. You could setup that grid cell any way you want with as many checkboxes as you want.
have a look here for an example on how to do it :
http://www.telerik.com/forums/checkboxes-in-kendo-grid
http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/Selection/select-multiple-rows-with-checkboxes
You might want to use telerik's forums for this kind of questions, they are very good at answering and you get replies from the people who actually created it.

Manipulate Kendo Grid Column Design

How to displayed records in grouping,I mean hide the column data if its in same group.Please refer below screen shot.
Is it possible in Kendo Grid(with asp.net MVC)?
Thanks in advance.
You should consider using grid hierarchy or aggregates, whichever suits you best.
Here's a working demo for hierarchy and a working demo for aggregates.

color a cell of a KendoUI grid via MVC controller

In a ASP.Net MVC application I wish to show in a kendo grid column a cell () colored via a color I receive in the form #FFAABB from the controller... how can I do that?
can I just apply the color via style received in the viewbag or is there a better way?
Thanks in advance
First of all, is the color is going to be only one that is being passed from the Controller and if so then you can use Viewbag or a Static variable.
But if the colors are going to differ with each rows of the Grid then its better to pass them along the Model and use a template to set the color, please see a demo I created for the same: Column Coloring from Model

How to make Kendo ComboBox or Kendo Dropdownlist to appear as CheckBox?

I have a Kendo UI MVC ComboBox which works fine. However, I want to display the list of items in the ComboBox as a multiselect check boxes. Is there a way to achieve this functionality?
Here is my code snippet.
#(Html.Kendo().ComboBox()
.Name("Country")
.DataValueField("Id")
.DataTextField("Name")
.BindTo((System.Collections.IEnumerable)ViewData["Countries"])
)
I am passing the viewdata from the controller.
Thanks in advance.
Have you considered using the KendoUI MultiSelect control?
http://demos.kendoui.com/web/multiselect/index.html
You might also consider a multi-select grid. I would post a link to the demo, but I lack the reputation. Look for the selection demo within the grid demos.
If you are set on checkboxes, check out this thread. It has a custom template solution using the DropDownList control: http://www.kendoui.com/forums/permalink/5owXK3xeQUKGrE0MgS-Jog

Resources