Telerik Forums
UI for ASP.NET MVC Forum
7 answers
206 views

re: https://demos.telerik.com/aspnet-mvc/grid/filter-multi-checkboxes

 

Is there a way to do filtering with check boxes but via LoadSettings? There does not seem to be a property in 'Field' that corresponses to 'Multi'

Viktor Tachev
Telerik team
 answered on 10 Jun 2020
1 answer
183 views

     Hi

 

We are trying to create a grid which will have columns added dynamically. Once the grid is bound properly it complaints about not having a default value to the dynamic columns. How can we provide a dynamic columns with default values.

 

Also we did initialize these values in model constructor, logically those should have been picked up but somehow grid wants explicit default values for all columns.

 

Regards

M.

Neli
Telerik team
 answered on 10 Jun 2020
1 answer
920 views

I would like to merge multiple footer column to get a right-aligned column footer to span or merge a couple columns to the left. I didn't find any post like that in this forum. I came across this approach for Kendo UI for jQuery: https://docs.telerik.com/kendo-ui/knowledge-base/grid-merge-footer-cells

Since it described using styles to achieve the effect of merging footer cells, I figured it would work for Kendo UI for MVC as well. Since I don't want/need any cell boarders in the footer, I set the .k-footer-template td border to none. I put the style block below just after my @model declaration line in the view.

<style>
    .k-footer-template td {
     border: none;
    }
    .k-footer-template td:nth-child(4) {
        overflow: visible;
        white-space: nowrap;
    }
</style>

 

 

However, the above has no effect on the appearance; I still see each footer cell's border and my sum total of the 4th column (assuming td:nth-child is zero-based) is limited to its cell. Why are the above styles not being applied?

 

2nd request for help: I want to format the sum total of a column with comma delineated number formatting: #,##0.00 

Here is my client footer template:

.ClientFooterTemplate("<div style='float: right'>#= kendo.toString(sum, '0,000.00') #</div>");  /*#,##0.00 didn't work; nothing appears in the cell*/

 

 

As you can see, I ended up using 0,000.00 instead of #,##0.00. The latter works in c# formatting of numeric strings, but I'm guessing the # symbol is interfering with the #= # syntax.  My work-around isn't acceptable as it shows "0," in front of numbers less than 1,000 (e.g., 0,999.99). How can I apply a custom number format such as #,##0.00?

Ivan Danchev
Telerik team
 answered on 10 Jun 2020
23 answers
7.7K+ views
I am starting a new project.
I was going to use the usual MVC extensions, but i understand that Kendo UI is replacing those.
I installed Kendo UI for ASP.NET MVC using my Telerik Control Panel.
But when i try to start a new project I don't see any templates in my Visual Studio.
Either the installation did not work, or i am not doing this right.
Are there any instructions on how to start working with Kendo UI for MVC.
A maybe a short video?

Thanks.
Shah
Top achievements
Rank 1
 answered on 10 Jun 2020
5 answers
1.7K+ views

Each user is able to store grid filters in the database as a JSON string for use later.

We now have to iterate through these filters on the server to do some analytics with what the user is filtering the grid on. Is there a way in C# using Kendo.Mvc namespace to deserialize the JSON string stored into the database back into an IList<IFilterDescriptor> Filters? 

Alex Hajigeorgieva
Telerik team
 answered on 10 Jun 2020
1 answer
251 views

Hi,

I have implemented the export to excel of client detail of Grid using function of export excel in the below link

 

http://docs.telerik.com/aspnet-mvc/helpers/grid/how-to/Export/detail-grid-export

 

But i am not able to implement the same function in external button or div click i tried passing event also but its not working, can you help on this,i dont want toolbar click instead external button click event export function should work.

Thanks

Mohammed

Petar
Telerik team
 answered on 10 Jun 2020
6 answers
612 views

Hi,

Is it possible to activate the InlineEdit mode when the user clicks on a row? In other words "open" all cells on a row for editing when the users clicks on the row.

It should work the same as when the user presses the update button to call the InlineEdit mode.

When a user presses enter the row should be saved and the next row (if there is any) should be selected and "opened".

I want to simulate (a little) the behavior of a normal winform/silverlight grid.

Is such a scenario possible?

Thanks in advance.

David
Top achievements
Rank 1
 answered on 09 Jun 2020
5 answers
597 views

Hi,

The filter icon is not appearing on the right side or default position when header template applied to the Grid column, it is showing in left side , but i want it to appear right side even though header template applied also color to be black.Can  you please help on this?

 

Thanks

Mohammed

Ivan Danchev
Telerik team
 answered on 09 Jun 2020
1 answer
503 views

I am trying to get a basic FileManager widget working in our app, but cannot get a remote data bind working correctly.  

My Javascript looks like this:

createFileManager: function () {
    $("#fileManager").kendoFileManager({
        dataSource: {
            schema: kendo.data.schemas.filemanager,
            transport: {
                read: {
                    url: "myController/Read/",
                    method: "POST"
                },
            },
            change: function (e) {
            },
            error: function (e) {
            },
        },
        toolbar: {
            items: [
                { name: "sortDirection" },
                { name: "sortField" },
                { name: "changeView" },
                { name: "spacer" },
                { name: "details" },
                { name: "search" }
            ]
        },
        draggable: true,
        resizable: true,

        dataBound: onDataBound

    });
},

 

And my controller code is thusly:

// borrowed from Kendo service example...
public class FileManagerEntry
{
    public string Name { get; set; }
    public long Size { get; set; }
    public string Path { get; set; }
    public string Extension { get; set; }
    public bool IsDirectory { get; set; }
    public bool HasDirectories { get; set; }
 
    public DateTime Created { get; set; }
    public DateTime CreatedUtc { get; set; }
    public DateTime Modified { get; set; }
    public DateTime ModifiedUtc { get; set; }
 
    public IEnumerable<FileManagerEntry> Directories { get; set; }
}
 
// CONTROLLER snippet....
public JsonResult Read(string target)
{
    var content = GetContent();
 
    var result = content
        .Select(f => new
        {
            name = f.Name,
            size = f.Size,
            path = f.Path,
            extension = f.Extension,
            isDirectory = f.IsDirectory,
            hasDirectories = f.HasDirectories,
            created = f.Created,
            createdUtc = f.CreatedUtc,
            modified = f.Modified,
            modifiedUtc = f.ModifiedUtc
        });
 
    return Json(result, JsonRequestBehavior.AllowGet);
}
 
// Hardcoded data for testing...
private IEnumerable<FileManagerEntry> GetContent()
{
    return new List<FileManagerEntry>
    {
        new FileManagerEntry
        {
            Name = "Folder",
            Size = 0,
            Path = "folder",
            Extension = "",
            IsDirectory = true,
            HasDirectories = false,
            CreatedUtc = DateTime.UtcNow,
            Created = DateTime.Now,
            ModifiedUtc = DateTime.UtcNow,
            Modified = DateTime.Now
        },
        new FileManagerEntry
        {
            Name = "Image.jpg",
            Size = 20,
            Path = "folder/Image.jpg",
            Extension = ".jpg",
            IsDirectory = false,
            HasDirectories = false,
            CreatedUtc = DateTime.UtcNow,
            Created = DateTime.Now,
            ModifiedUtc = DateTime.UtcNow,
            Modified = DateTime.Now
        },
        new FileManagerEntry
        {
            Name = "Image2.jpg",
            Size = 20,
            Path = "folder/Image2.jpg",
            Extension = ".jpg",
            IsDirectory = false,
            HasDirectories = false,
            CreatedUtc = DateTime.UtcNow,
            Created = DateTime.Now,
            ModifiedUtc = DateTime.UtcNow,
            Modified = DateTime.Now
        }
    };
}

 

Most of the code, I cobbled together from the Kendo examples for FileManager. 

When I run my app....  The FileManager renders & the FileManager dataBound event fires.  But the three objects in the manager are all undefined.  I jave attached screengrabs of the filemanager.datasource and also the file "details" as shown by FileManager. 

i do not know why the data isn't binding appropriately.  Is this a problem with the results coming from my controller?  

Appreciate any help.

 

 

 

Ianko
Telerik team
 answered on 09 Jun 2020
1 answer
68 views

Hi,

I am supporting an application where I need to apply some aggregate function to grid for calculating sum of columns.

Below is sample code

<%: Html.Telerik().Grid(Model.AgentSalesList)
.Name("AgentSalesList")
.DataBinding(dataBinding =>
{
dataBinding.Server()
.Select("AgentSalesGridAction", "AgentSales");
})
.Columns(columns =>
{
columns.Bound(o => o.AgentID).Width("25").Title("Agent ID");
columns.Bound(o => o.NetSales).Width("25%").Title("Net Sales");
columns.Bound(o => o.NetSeatsSold).Width("25%").Title("Net Seats Sold");
})
.Pageable(paging => paging.Enabled(true).PageSize(25))
.Footer(true)
.Sortable()
.Resizable(resizing => resizing.Columns(true))
.Scrollable(o => o.Enabled(false))
%>

There are few option available for same with MVC Kendo UI Grid but when I am trying to install MVC Kendo package from Nuget I am getting unsupported .net framework issue(4.0).

So don't we have support for aggregate function with Html.Telerik().Grid?

OR only option is to upgrade target .net framework and use MVC Kendo UI ?

 

Thanks,

Anurodh Kimni

 

Viktor Tachev
Telerik team
 answered on 08 Jun 2020
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?