Telerik Forums
UI for ASP.NET MVC Forum
11 answers
3.6K+ views

When using a new form to post if adding model state errors with a key value other than string.empty the kendo().form throws error on return to view:

Message "Object reference not set to an instance of an object."string

Source: "Kendo.Mvc"string

Stack trace:

"   at Kendo.Mvc.UI.Form`1.BuildItems(IList`1 items)\r\n   at Kendo.Mvc.UI.Form`1.WriteInitializationScript(TextWriter writer)\r\n   at Kendo.Mvc.UI.WidgetBase.WriteHtml(HtmlTextWriter writer)\r\n   at Kendo.Mvc.UI.Form`1.WriteHtml(HtmlTextWriter writer)\r\n   at Kendo.Mvc.UI.WidgetBase.ToHtmlString()\r\n   at Kendo.Mvc.UI.Fluent.WidgetBuilderBase`2.ToHtmlString()\r\n   at System.Web.HttpUtility.HtmlEncode(Object value)\r\n   at System.Web.WebPages.WebPageBase.Write(Object value)\r\n   at ASP._Page_Views_User_CreateUser_cshtml.Execute() in C:\\CustomerVS2019Projects\\iCepts\\CustomerPortal\\Views\\User\\CreateUser.cshtml:line 17\r\n   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()\r\n   at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()\r\n   at System.Web.WebPages.StartPage.RunPage()\r\n   at System.Web.WebPages.StartPage.ExecutePageHierarchy()\r\n   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)\r\n   at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)\r\n   at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)\r\n   at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)\r\n   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)\r\n   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)\r\n   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)"

Dimitar
Telerik team
 answered on 11 Jun 2020
3 answers
1.5K+ views

If I get a failure during my upload process, how do I show that an error occurred and what it is?

<div>
    <hr />
    <h3>Upload Files to Session...</h3>
    <div class="demo-section k-content">
        @(Html.Kendo().Upload()
            .Name("files")
            .Async(a => a
                .Save("UploadSessionFiles", "Sessions", routeKeys)
                .AutoUpload(true))
        )
    </div>
    <hr />
</div>
Aleksandar
Telerik team
 answered on 10 Jun 2020
7 answers
217 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
195 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
968 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.8K+ 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
264 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
632 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
677 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
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
MultiSelect
Window
ListView
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
Rating
ScrollView
ButtonGroup
CheckBoxGroup
Licensing
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
AICodingAssistant
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?