Telerik Forums
UI for ASP.NET MVC Forum
4 answers
1.0K+ views
Hi,

What is the best way to make a grid responsive on different screens. I added 'hidden-xs' class to html attribute on the grid column and headers. It seems to hide the column header and values but not the actual column. See the image attached.


Is there any way to achieve responsiveness? 

Thanks for your help.

Uday
Uday
Top achievements
Rank 1
 answered on 19 Nov 2014
1 answer
72 views
Hi,

We've got a simple server bound grid which show aggregates in the footer and sets the Footer Template format to be currency - ...

.FooterTemplate(f => f.Sum.Format("{0:c}")).

Good if there are rows, but this throws an error if there are zero rows returned in the model.

How can we apply the correct formatting only if there are rows returned?

(Found this thread but the last response says the answer was through a support call - http://www.telerik.com/forums/conditionals-embedded-in-client-templates )

Many Thanks,

Dan.
Daniel
Top achievements
Rank 1
 answered on 19 Nov 2014
6 answers
280 views
I am trying to add sorting inside grouped columns, So the Grid is grouped by X and Y columns and then I need to sort for the rows in it.
I need to sort by CustomSortIntegerValue if CustomSort = true, and Alphabetically by Name if CustomSort = false. The last line does not work. Can you please give an pointers/examples on how to achieve this.

@(Html.Telerik().Grid(Model)
    .Name("Grid")
    .NoRecordsTemplate("Loading ..... Please Wait")
    .Columns(c =>
    {
        c.Bound(x => x.Name).Title("Name");
        c.Bound(x => x.CustomSortIntegerValue).Title("Custom Sort"); 
        c.Bound(x => x.Id).ClientTemplate(Html.ActionLink("Edit", "Edit", new { id = "<#=Id#>" }).ToString()).Filterable(false).Sortable(false).Title("").Width(50);
    })       
          .DataKeys(keys =>
          {
              keys.Add(x => x.Id);
          })

    .DataBinding(dataBinding => dataBinding.Ajax()
        .OperationMode(GridOperationMode.Client)
                      .Select("RetrieveAllData_AjaxBinding", "CDController"))
    .Groupable(grouping => grouping.Groups(groups =>
             {
                 groups.Add(x => x.X);
                 groups.Add(x => x.Y);
             }).Visible(false))
          //.Sortable(sort => sort.OrderBy(sortOrder => sortOrder.Add(x => x.CustomSort ? "CustomSortIntegerValue" : "Name").Ascending()).Enabled(false))
    )
Rosen
Telerik team
 answered on 19 Nov 2014
4 answers
358 views
Hi,

Not exactly sure if I'm in the right place, but here goes. I've included the default Sitefinity file upload widget into my form and have set it to be required. However, when I submit the form it doesn't validate whether a file has been selected or not. The unobtrusive validation is visible if you cancel when selecting a file but does not stop the form from being submitted. 

Is this an error in the widget, of am I missing a different setting?

Kind regards,

Aidan Langelaan
FenĂȘtre Internet Applicaties
Aidan
Top achievements
Rank 1
 answered on 19 Nov 2014
2 answers
237 views
I am new to asp.net and Telerik and having hard time finding a simple tutorial example online for displaying database table data in a grid.

I need a complete tutorial from scratch like below to display calendar.
http://docs.telerik.com/kendo-ui/aspnet-mvc/asp-net-mvc-5

I want to do this is MVC 5 and visual studio 2013. I am using Telerik trial for now.

Please help.

Thanks.
Dimiter Madjarov
Telerik team
 answered on 19 Nov 2014
1 answer
139 views
Hi Team,
             I have two issues with Ajax Binding
                    1) Remote Validation is Not Working with Ajax Binding ( Works With Server Binding) .
                    2) ForiegnKey Column (combo box) Values return null to Controller if i doesn't change combobox value . ( Works With Server Binding)
Alexander Popov
Telerik team
 answered on 18 Nov 2014
4 answers
199 views
My tasks are going to be all day tasks only.  The All Day row has several tasks in it but they are bunched up.  I need to remove the time rows in the Day view.

I've tried this as a databound event:

function scheduler_dataBound(e) {
    var scheduler = this;
 
    var ele = scheduler.wrapper.find(".k-scheduler-layout>tbody>tr:nth-child(2)");
    ele.remove();
    if (!isResizedManually) {
        isResizedManually = true;
        scheduler.view().refreshLayout();
        $(window).trigger("resize");
    } else {
        isResizedManually = false;
    }
}

This gets rid of the time rows but the all day row is still the same height.  Another problem with this is that it removes the time rows for all views: Month, Week, Day, etc...  I only want them removed for Day.

How can I get this to work?


Edward
Top achievements
Rank 1
 answered on 18 Nov 2014
1 answer
96 views
I have a situation where i need a foreign key column in a grid and the field doesn't exist in the model.   Is there a way to do this?

Thanks for your help.
Nikolay Rusev
Telerik team
 answered on 18 Nov 2014
1 answer
109 views
Hi all,

I've tried several times to create a dropdown list inside a grid by following  this link. But I still cannot create a dropdown list inside a grid. It always shows error when I run the program. It says ""An exception of type 'System.ArgumentException' occurred in mscorlib.dll but was not handled in user code. Additional information: Object of type 'POSF.Models.ProductViewModel' cannot be converted to type 'System.String'." I don't know how to do, I have done all like the link said.

Please help me

Here I attach my grid, controller, model, and error message

Best Regards

Rudy
Alexander Popov
Telerik team
 answered on 18 Nov 2014
2 answers
127 views
I've been developing an app for some time now using the Kendo UI MVC wrappers. I just updated my Telerik components with version 2014.2.1008 this weekend. All of a sudden, the DatePickerFor is not working correctly for nullable DateTime values where it had been working before. Instead of a non-null date value being displayed, I see something like {0:17} in the edit box and it won't validate.

Assuming my model has a property like this:

     public DateTime? DueDate { get; set; }

The following .cshtml markup produces the erroneous result:

    @Html.Kendo().DatePickerFor(model => model.DueDate)

The following .cshtml markup produces the correct result, but I can't use it because the value may be null:

    @Html.Kendo().DatePickerFor(model => model.DueDate.Value)

I can't deploy other code I've been working on tonight because of this problem. I need a resolution to this ASAP.
Bryan
Top achievements
Rank 1
 answered on 17 Nov 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?