Telerik Forums
UI for ASP.NET MVC Forum
5 answers
254 views

My need is relatively straight forward, but I am not normally a report person, nor a charting kind of person, so my knowledge of different charting types and values is practically nil.

I have a List<ClientBreakdown>, which is just a collection of a very simple class:

public class ClientBreakdown
{
    public string State { get; set; }
    public int Count { get; set; }
}

 

What I'd like is a Bar Chart, with the States alphabetically along the bottom, and the number of Clients in each state as the value of the bar.

I've done this:

@(Html.Kendo().Chart<ClientBreakdown>()
    .Name("chart")
    .Title("Breakdon of Client States")
    .Legend(l => l.Position(ChartLegendPosition.Bottom))
    .Series(s => s
        // pie chart is too busy, let's try it as a bar chart
        // .Pie(m => m.Count, m => m.State).Padding(5).Labels(l => l.Visible(false).Template("#= category # - #= value #"))
        .Column(m => m.Count, m => m.State).Labels(l => l.Visible(false).Template("#= category # - #= value #"))
    )
    .DataSource(ds =>
    {
        ds.Read(r => r.Action("ClientsByState", "Clients").Type(HttpVerbs.Get));
    })
    .Tooltip(tp => tp.Visible(true).Template("#= category # - #= value #"))
)

 

It gives me a bar chart ok, but each column is black, and there are no labels.  (See attached image)

Could someone give me a few tips on how to best accomplish this?

Daniel
Telerik team
 answered on 04 Nov 2016
2 answers
1.5K+ views

Hi There,

I am newbie to Kendo. I am having issue with DropdownlistFor while binding to Viewbag selectlist. In the below code  ViewBag.AddressList has a disabled value and it is not binding as disabled item in dropdownlist.

Please see below Code

 ViewBag.AddressList = new SelectList(model, "CodeOrder", "CodeDisplay",

                                         selectedValue: model[0].CodeOrder.ToString(),

                                          disabledValues: model[0].CodeOrder.ToString());

@Html.Kendo().DropDownListFor(m => m.AddressType)

                        .BindTo((SelectList)ViewBag.AddressList)

                       .HtmlAttributes(new {  @id = "ddlAddressType" })

 

In the attached image , Address Type is considered as option label and has to be disabled as well as not allowing user to select it.

Best Regards,

Phani

Phani
Top achievements
Rank 1
 answered on 03 Nov 2016
3 answers
242 views

Hi Guys

I have been told the format of the dates at the top of the 'weekly' view is wrong by the customers in Sweden.. but I don't see anywhere in the culture file to amendit

Please see screen shot attached.. it should be .. "short day of week", then the day and then the Month.. not the "short day of week", Month and day.

How can I change this please?

Thanks

Rob

 

 

 

Ivan Danchev
Telerik team
 answered on 03 Nov 2016
4 answers
1.3K+ views
Hi everyone,

I'm using a Grid to ajax edit a simple model in the inline mode and on the Controller the ModelState.IsValid is always false.
The error message is "The value '/Date(-62135578800000)/' is not valid for Expiration."

I have attach the relevant code of my test application and would appreciate any help.


Thanks,
Alexandre Lefebvre
Marcel Härry
Top achievements
Rank 1
 answered on 01 Nov 2016
1 answer
154 views
How to create multiple sub columns in grid headers where the titles can be read from datasource? The number of parent header and sub columns depends on datasource.
Niko
Telerik team
 answered on 01 Nov 2016
1 answer
360 views

I have a nullable Guid column in my grid that is using an editor template to display a the text value associated with the Guid in the lookup table.

columns.ForeignKey(p => p.NotAcceptableReason, (System.Collections.IEnumerable)ViewBag.NotAcceptableReasons, "NotAcceptableReasonId", "NotAcceptableReasonName").Width(200);

 

The editor template:

@using Kendo.Mvc.UI
@model object
 
@(
 Html.Kendo().DropDownListFor(m => m)
        .BindTo((SelectList)ViewData[ViewData.TemplateInfo.GetFullHtmlFieldName("") + "_Data"])
        .OptionLabel("--- Select ---")
        .ValuePrimitive(true)
)

 

On that column's column filter popup,I get all the text values from the lookup table in a drop down list and the filtering work as expected.

However, when I try to filter the column on "Is null" or "Is not null" I get an error -> System.FormatException: Unrecognized Guid format.

I suspect this is because there is no NULL entry in the lookup table I'm binding the drop down list to.  Any suggestions for getting the "Is null" or "Is not null" column filters to work correctly in this scenario?

 

Danail Vasilev
Telerik team
 answered on 01 Nov 2016
1 answer
256 views
I want to make the rich text editor control shorter. I've tried applying a "height" style to the css as well as directly to the control but cannot get it shorter than 175px. Is it possible to shorten it?
Rumen
Telerik team
 answered on 31 Oct 2016
3 answers
134 views

Hello,

I am trying to use the AutoComplete editor with MVC6.  Kendo Version 2016.3.914

I keep getting, Uncaught TypeError: jQuery(...).kendoAutoComplete is not a function when I run the page.

I found this post from last year:  http://www.telerik.com/forums/missing-textboxfor-and-autocomplete#a-GwYBg2-ECJCMqxHipYVQ

Has support for AutoComplete been added yet?

 

Thank you!

 

Rumen
Telerik team
 answered on 31 Oct 2016
3 answers
1.0K+ views

I'm wondering if anyone has tried and would like to share how to dynamically store the telerik html code in a database and render it onto a MVC view dynamically. I have a project I'm currently working on and have been unsuccessful so far.

 

Thanks,

Neil

Vessy
Telerik team
 answered on 31 Oct 2016
1 answer
1.2K+ views

Is there any way to declare the value of a checkbox? Currently the value is always 'true'.

<input name="AppleYN" class="k-checkbox form-control" id="AppleYN" type="checkbox" value="true">

I would like to specify the values for check box lists:

<input name="AppleYN" class="k-checkbox form-control" id="AppleYN" type="checkbox" value="21">

<input name="BananaYN" class="k-checkbox form-control" id="BananaYN" type="checkbox" value="22">

<input name="OrangeYN" class="k-checkbox form-control" id="OrangleYN" type="checkbox" value="23">

Danail Vasilev
Telerik team
 answered on 31 Oct 2016
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
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
Security
ColorPicker
DateRangePicker
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?