Telerik Forums
UI for ASP.NET MVC Forum
1 answer
141 views
We are using the Kendo UI Scheduler for MVC. Is there any way to integrate with exchange and display events in an outlook calendar? 
Vladimir Iliev
Telerik team
 answered on 03 Mar 2016
2 answers
127 views

Every time the chart is drawn the background is set to gray. No matter if the theme is specified or not or if the chart area background is set to "", "transparent" or any color, or not at all.

You can see a blank chart with the correct background color prior to the read occurring and the chart being redrawn with the appropriate data. Each path element in the SVG has a stroke color set to "#dfdfdf"

Here is the code:

@(Html.Kendo( ).Chart<ViewModels.HistoryChartModel>( )
.Name( "chart" )
.ChartArea(c=>c.Width(800).Height(600))
.DataSource( dataSource => dataSource
    .Read( read => read.Action( "Series", "Home" ) )
    .Group( group => group.Add( model => model.BasinName ) )
    .Sort( sort => sort.Add( model => model.ReadingDateTime ).Descending( ))
)
.Series( series => {series.Line( model => model.LevelReading ).Name( "#= group.value # " ).Markers(false);} )
.Legend( legend => legend.Position( ChartLegendPosition.Bottom ))
.ValueAxis( a => a.Numeric( ).Min( 3 ).Max(10).MinorTicks(mt=>mt.Visible(false)).MajorUnit(.5) )
)

Iliana Dyankova
Telerik team
 answered on 02 Mar 2016
1 answer
117 views
Can I give  a AutoComplete object to a dropdownlist's CascadeFrom parameter? I have tried it  but it didn't work.(two dropdownlist worked fine)


public JsonResult GetCustomers()
        {
            return Json(CustomerRepository.Repository.Customers, JsonRequestBehavior.AllowGet);
        }
 
        public JsonResult GetVendors(int customerId,int customerId2)
        {
            return Json(VendorRepository.Repository.GetVendorsByCustomer(customerId), JsonRequestBehavior.AllowGet);
        }



function filterVendors() {
    return {
        customerId: $("#CustomerId").data("kendoAutoComplete").value(),
        customerId2: $("#CustomerId").data("kendoAutoComplete").value(),
 
    };
}
 
function filterProducts() {
    return {
        vendorId: $("#VendorId").data("kendoDropDownList").value()
    };
}

 

<dl>
    <dt>
        @Html.LabelFor(m => m.CustomerId):
    </dt>
    <dd>
 
        @(Html.Kendo().AutoCompleteFor(m => m.CustomerId).Name("CustomerId")
              .ValuePrimitive(true)
                      .DataTextField("CustomerId")
              .DataSource(dataSource =>
              {
                  dataSource.Read(read => read.Action("GetCustomers", "Home"))
                            .ServerFiltering(true);
              })
        )
        @Html.ValidationMessageFor(m => m.CustomerId)
    </dd>
</dl>
<dl>
    <dt>
        @Html.LabelFor(m => m.VendorId):
    </dt>
    <dd>
        @(Html.Kendo().DropDownListFor(m => m.VendorId)
              .AutoBind(false)
              .ValuePrimitive(true)
              .OptionLabel("Select Vendor...")
              .DataTextField("VendorName")
              .DataValueField("VendorId")
              .DataSource(dataSource =>
              {
                  dataSource.Read(read => read.Action("GetVendors", "Home").Data("filterVendors"))
                            .ServerFiltering(true);
              })
              .CascadeFrom("CustomerId")
        )
        @Html.ValidationMessageFor(m => m.VendorId)
    </dd>
</dl>

Kiril Nikolov
Telerik team
 answered on 02 Mar 2016
1 answer
122 views
Can I give  a AutoComplete object to a dropdownlist's CascadeFrom parameter? I have tried it  but it didn't work.(two dropdownlist worked fine)


public JsonResult GetCustomers()
        {
            return Json(CustomerRepository.Repository.Customers, JsonRequestBehavior.AllowGet);
        }

        public JsonResult GetVendors(int customerId,int customerId2)
        {
            return Json(VendorRepository.Repository.GetVendorsByCustomer(customerId), JsonRequestBehavior.AllowGet);
        }


function filterVendors() {
    return {
        customerId: $("#CustomerId").data("kendoAutoComplete").value(),
        customerId2: $("#CustomerId").data("kendoAutoComplete").value(),

    };
}

function filterProducts() {
    return {
        vendorId: $("#VendorId").data("kendoDropDownList").value()
    };
}


<dl>
    <dt>
        @Html.LabelFor(m => m.CustomerId):
    </dt>
    <dd>

        @(Html.Kendo().AutoCompleteFor(m => m.CustomerId).Name("CustomerId")
              .ValuePrimitive(true)
                      .DataTextField("CustomerId")
              .DataSource(dataSource =>
              {
                  dataSource.Read(read => read.Action("GetCustomers", "Home"))
                            .ServerFiltering(true);
              })
        )
        @Html.ValidationMessageFor(m => m.CustomerId)
    </dd>
</dl>
<dl>
    <dt>
        @Html.LabelFor(m => m.VendorId):
    </dt>
    <dd>
        @(Html.Kendo().DropDownListFor(m => m.VendorId)
              .AutoBind(false)
              .ValuePrimitive(true)
              .OptionLabel("Select Vendor...")
              .DataTextField("VendorName")
              .DataValueField("VendorId")
              .DataSource(dataSource =>
              {
                  dataSource.Read(read => read.Action("GetVendors", "Home").Data("filterVendors"))
                            .ServerFiltering(true);
              })
              .CascadeFrom("CustomerId")
        )
        @Html.ValidationMessageFor(m => m.VendorId)
    </dd>
</dl>
Kiril Nikolov
Telerik team
 answered on 02 Mar 2016
1 answer
411 views

Can I give a dropdownlist's CascadeFrom parameter a AutoComplete? I have tried it  but it didn't work.

 

public JsonResult GetCustomers()
        {
            return Json(CustomerRepository.Repository.Customers, JsonRequestBehavior.AllowGet);
        }
 
        public JsonResult GetVendors(int customerId,int customerId2)
        {
            return Json(VendorRepository.Repository.GetVendorsByCustomer(customerId), JsonRequestBehavior.AllowGet);
        }

function filterVendors() {
    return {
        customerId: $("#CustomerId").data("kendoAutoComplete").value(),
        customerId2: $("#CustomerId").data("kendoAutoComplete").value(),
 
    };
}
 
function filterProducts() {
    return {
        vendorId: $("#VendorId").data("kendoDropDownList").value()
    };
}

<dl>
    <dt>
        @Html.LabelFor(m => m.CustomerId):
    </dt>
    <dd>
         
        @(Html.Kendo().AutoCompleteFor(m => m.CustomerId).Name("CustomerId")
              .ValuePrimitive(true)
                      .DataTextField("CustomerId")
              .DataSource(dataSource =>
              {
                  dataSource.Read(read => read.Action("GetCustomers", "Home"))
                            .ServerFiltering(true);
              })
        )
        @Html.ValidationMessageFor(m => m.CustomerId)
    </dd>
</dl>
<dl>
    <dt>
        @Html.LabelFor(m => m.VendorId):
    </dt>
    <dd>
        @(Html.Kendo().DropDownListFor(m => m.VendorId)
              .AutoBind(false)
              .ValuePrimitive(true)
              .OptionLabel("Select Vendor...")
              .DataTextField("VendorName")
              .DataValueField("VendorId")
              .DataSource(dataSource =>
              {
                  dataSource.Read(read => read.Action("GetVendors", "Home").Data("filterVendors"))
                            .ServerFiltering(true);
              })
              .CascadeFrom("CustomerId")
        )
        @Html.ValidationMessageFor(m => m.VendorId)
    </dd>
</dl>

Kiril Nikolov
Telerik team
 answered on 02 Mar 2016
1 answer
369 views

I have a Razor for that has several Autocomplete fields on it.

 

Some of these fields are required, some are not required.

 

I need to show the required fields in a red border and a blue background, while non-required fields are white, with a blue border.

 

My css works for a regular text field, but i cannot figure out how to make it work for an autocomplete field.

 

How would I do that?  I have tried " .HtmlAttributes(new { @class="rsireqtext",style = "width: 99%;" }) " in the autocomplete (rsireqtext is my 'required' styling),

but that doesn't do it.

 

Any ideas?

 

TIA,

Bob Mathis

Dimo
Telerik team
 answered on 02 Mar 2016
2 answers
374 views

Using Kendo UI for ASP.NET MVC, I am creating and passing in a Model that contains a collection of objects (called ChartSeries) that has fields for Color, SeriesName, and a collection of a second class (ChartSeriesValue) which contains fields Value, Date. I am trying to create a line chart using this local data with a dynamic number of series. Using a foreach statement, I can get the different series values plotted, but am unable to get the Dates to display using CategoryAxis. Will I have to go the route of using DataSource to group the flattened data, or is it possible to accomplish this using localdata? 

Here are the chart-related classes I am using:

public class ChartSeries
    {
        public string SeriesName { get; set; }
        public string ValueType { get; set; }
        public string HexColor { get; set; }
        public IList<ChartSeriesValue> ChartSeriesValues { get; set; }
    }
 
public class ChartSeriesValue
    {
        public decimal? Value { get; set; }
        public DateTime Effective { get; set; }
    }

 

Thus far, I have been able to get either the lines with proper values, or just the X-Axis date labels to display, but not both. Here's my current attempt that displays proper line series data without X-Axis labels:

@(Html.Kendo().Chart<ChartSeriesValue>()
              .Name("myChart_" + Model.MyChart.Id)
              .Title(Model.MyChart.Name)
              .Legend(legend => legend
                  .Position(ChartLegendPosition.Bottom)
              )
              .ChartArea(chartArea => chartArea
                  .Background("transparent")
                  .Width(250)
                  .Height(250)
              )
              .SeriesDefaults(seriesDefaults =>
                  seriesDefaults.Line().Style(ChartLineStyle.Smooth)
              )
              .Series(series =>
              {
                  if (!Model.ChartSeriesList.IsNullOrEmpty())
                  {
                      foreach (var metSeries in Model.ChartSeriesList)
                      {
                          if (!metSeries.ChartSeriesValues.IsNullOrEmpty())
                          {
                              series.Line(metSeries.ChartSeriesValues)
                                  .Field("Value")
                                  .Name(metSeries.SeriesName)
                                  .Color(metSeries.HexColor);
                          }
                      }
                  }
              })
              .CategoryAxis(axis => axis
                  .Categories(x => x.Effective.Date)
                  .Name("Effective Date")
                  //.Name("Effective")
                  //.MajorGridLines(lines => lines.Visible(true))
                  //.Date().BaseUnit(ChartAxisBaseUnit.Months)
                  .Labels(labels => labels.Visible(true))
                  .Color("Red")//.Rotation(-60))
                               //.Type(ChartCategoryAxisType.Date)
              )
              ))

 

Please let me know if you need further clarification. Thanks!

 

 

Iliana Dyankova
Telerik team
 answered on 02 Mar 2016
3 answers
910 views

 

I have a very simple grid. For this grid only is there a way to disable the row hover highlight? I want it everwhere else, just not for this grid.

@(Html.Kendo().Grid<SalesRepSummaryItem>()
                      .Name("grid")
                      .NoRecords()
                      .Sortable()
                      .Columns(columns =>
                      {
                          columns.Bound(c => c.SalesRepFullName).Title("Sales Rep");
                          columns.Bound(c => c.TotalSales).Title("Invoiced Sales").Format("{0:c}").HtmlAttributes(new { @class = "money" }).Width(150);
                          columns.Bound(c => c.CalculatedTotalSales).Title("Total Sales").Format("{0:c}").HtmlAttributes(new { @class = "money" }).Width(150);
                          columns.Bound(c => c.NumberOfOrders).Title("# of Orders").Format("{0:0}");
                          columns.Bound(c => c.NumberOfItems).Title("# Of Items").Format("{0:0}");
                          columns.Bound(c => c.TotalOrdered).Title("Qty Ordered").Format("{0:0}");
                          columns.Bound(c => c.TotalShipped).Title("Qty Shipped").Format("{0:0}");
                      })
                      .DataSource(dataSource => dataSource
                          .Ajax()
                          .Read(read => read.Url(Url.HttpRouteUrl("Default", new { controller = "SalesRep", action = "Sales_GetSalesData" })).Data("getFilterValuesForGridRead")))

Milena
Telerik team
 answered on 01 Mar 2016
3 answers
146 views

I am evaluating the Scheduler Components, specifically the TimeLine mode.

Does this component allow me to create an event that is comprised of smaller events? For example, I have a Process comprised of Steps. The Steps also have a Start/Stop Time. 

I was wondering if TimeLine would allow me to customize the Series Bar so that I could display the Steps Inside of the Process?

Does that make sense?

Chuck

Vladimir Iliev
Telerik team
 answered on 01 Mar 2016
4 answers
194 views
I'm trying to fill a column of the my grid with images from the Content/images folder of the project, but for some reason the column doesn't display any content.

Since maybe I wrote the path in a wrong way, I tried to follow an example of the web with only some text, without any luck.

This is my custom column:

    columns.Template(@<text>
       custom content here, which is not related to the data
       </text>).Title("Column Title");

I'm using Ajax binding, and because of that columns.ClienteTemplate is not an option (I need to use aggregates, which is not possible when Server binding.

This is my data source (abreviatted):

    .DataSource(dataSource => dataSource
              .Ajax()
              .Read(read => read.Action("Products_Read", "Home"))
              )

 Any help will be really appreciated.
Maria Ilieva
Telerik team
 answered on 29 Feb 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
DropDownButton
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
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
LLM Kit
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?