Telerik Forums
UI for ASP.NET MVC Forum
5 answers
693 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
528 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
76 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
9 answers
1.1K+ views
I have a Kendo Grid and a DropDown List that work well.  Thee is a field in one of the models (model:Products Field:Status),  What I want is if the Field Status = "discontinued" I need to not display that record in the grid or the dropdown. How would I go about doing that? 
Nikolay
Telerik team
 answered on 08 Jun 2020
9 answers
4.6K+ views

I have a popup edit screen that has a few dropdown list on it.  They work great until I do into a screen and add an item for that dropdown list and low and behold I go back to that edit screen I don't see the new item unless I exit out and go back in.  I have found dropdownlist.dataSource.read(); but I am not sure how to use that. Can someone tell me how to refresh the dropdown list please?  I would think that when I open the edit pop up screen it would do it but it does not.  I need to get an answer to this quickly.

Thanks

Christine
Top achievements
Rank 1
Veteran
 answered on 04 Jun 2020
10 answers
1.3K+ views
I need to save the expanded/collapsed state of Kendo UI Treelist so that nodes are expanded when I visit another page and come back.

It can be done for Treeview but not able to replicate the same. (http://jsfiddle.net/lhoeppner/rwfsf/)
Sivaramakrishna Reddy
Top achievements
Rank 1
Veteran
 answered on 03 Jun 2020
1 answer
421 views

Is there a form to put a 'label for' on a old version @(Html.Kendo().TextBox() 2015.1.429.545?

It has not the .label prop

 

Thanks

Sergio

 

Eyup
Telerik team
 answered on 03 Jun 2020
15 answers
4.9K+ views

How do you get the selected rows in the grid? I found some articles that explained on how to do this. But none of them worked (it seemed like things changed in the latest beta).This is my grid:

@(Html.Kendo().Grid(Model)
        //The grid will be bound to the Model which is the Products table     
.Name("dg") //The name of the grid is mandatory. It specifies the "id" attribute of the widget.     
.Columns(columns =>
    {       
        columns.Bound(dg => dg.Title);         
        columns.Bound(dg => dg.Version);
        columns.Bound(dg => dg.Created).Format("{0:d}");
        columns.Bound(dg => dg.CreatedBy);
        columns.Bound(dg => dg.Modified).Format("{0:d}");
        columns.Bound(dg => dg.ModifiedBy);
        columns.Bound(dg => dg.CheckedOutDateTime).Format("{0:d}");
    })
.Sortable()
.Pageable()
.Navigatable()
.Sortable()
.Filterable()
.Selectable(s => s.Mode(GridSelectionMode.Multiple))
.DataSource(dataSource => dataSource
        .Server()
        .Model(model => model.Id(dg => dg.DocumentGroupID)))
.Events(events => events.Change("dgChange"))       
)

<script>
    function dgChange()
    {
 // What should I put here to get the ID of the selected rows?
       
    }
</script>

Petar
Telerik team
 answered on 02 Jun 2020
2 answers
8.8K+ views
I'm testing out some conversion of MVC grid to Kendo grid, and i'm running into several issues with template columns.  Am I doing something wrong here?

In some scenarios, I get "undefined" showing in the column, others I'm getting a javascript error "cannot call kendoSortable
on undefined".  I assume they're both the same issue related to the rendering of the column.


@(Html.Kendo().Grid(Model)
    .Name("Grid")
    .Columns(columns =>
                 {
                     columns.Template(o => Html.ActionLink(o.ProductID.ToString(), "Index", "Home"));
                     
                     columns.Bound(p => p.ProductName);
                     columns.Bound(p => p.UnitPrice);
                     columns.Bound(p => p.UnitsInStock);
                 })
    .Groupable()
    .Pageable()
    .Sortable()
    .Scrollable()
    .Filterable()
    .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("Products_Read", "Grid"))
    )
)

Thanks!
Jason
yongkai
Top achievements
Rank 1
 answered on 02 Jun 2020
11 answers
1.9K+ views
Hi,
The lastest release version (2015.2.624) add a useful feature that display 'all' option in pager.
But I didn't find it in ASP.NET MVC Wrapper function.
I try insert '0' pagesize and it seems as same as 'all' option.

.Pageable(pager => pager.PageSizes(new int[] { 5, 10, 20, 0 }))

But it displayed '0' in pager and I didn't find the method that change the 'all' message by MVC Wrapper.
It seems not exist in pager.Messages.

Can someone advise me, please?
Petar
Telerik team
 answered on 01 Jun 2020
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?