Telerik Forums
UI for ASP.NET MVC Forum
1 answer
83 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
332 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
402 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
256 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
157 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
219 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
108 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
129 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
205 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
2 answers
182 views
When I group the Grid, the vertical lines are broken that separates the columns. Is there a way to force the Grid to have those lines not broken by the grouping rows. Please see attached Image.

VP
Top achievements
Rank 1
 answered on 17 Nov 2014
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
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
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
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
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?