Telerik Forums
UI for ASP.NET MVC Forum
3 answers
3.9K+ views
I am using kendo button the following way.

    @(Html.Kendo().Button().Name("deleteButton").HtmlAttributes(new { type = "button", @class = "k-primary pull-right" }).Content("Delete").Events(ev => ev.Click("Delete(1)")))

I need to call a javascript function with parameters

        function Delete(value)
        {
            alert(value)
        }

But it doesn't work when I click the button.
Everything works fine without arguments.

Does telerik support passing arguments to javascript functions from buttons?
Dimiter Madjarov
Telerik team
 answered on 20 Feb 2015
2 answers
516 views
I have the following grid in my table. I am using the first column with a checkbox for selectig teh row.
And it has a header for multiselect(selects all check boxes using jquery)

 @(Html.Kendo().Grid<Customer>()
          .Name("grid")
          .Columns(columns =>
          {
              columns.Template(@<text></text>)
                  .ClientTemplate("<input name='chkSelect' id='select_#= Id #' type='checkbox' value='#= Id #' />").Width(30)
                  .HeaderTemplate("<input id='chkSelectAll'  type='checkbox'/>").Locked(true);    
      
     
              columns.Bound(c => c.Name)
                  .ClientTemplate("<a href='" + Url.Action("Edit", "Customer") + "/#= Id #' " + ">#= Name #</a>").Width(140)

              columns.Bound(c => c.CustomerName).Width(110).Filterable(ftb => ftb.Cell(cell => cell.ShowOperators(false)));
          })


Now I also have  feature for show/hide column and I persist them using localstorage like this


        function SaveHiddenState() {
            var grid = $("#grid").data("kendoGrid");
            localStorage["customer-grid-options"] = kendo.stringify(grid.getOptions());
        }

And I retreive the saved options using this

        $(function () {
            var grid = $("#grid").data("kendoGrid");
            var options = localStorage["account-grid-options"];
            if (options) {
                grid.setOptions(JSON.parse(options));
            }
        });

All these work fine.
But strangely I am losing my header template for my first column alone if I get data from the localstorage. I  just get a blank header as if I hadnt included a headertemplate.
 Anything that I am missing ?




prakash
Top achievements
Rank 1
 answered on 20 Feb 2015
3 answers
114 views
We've run into the situation where a chart is rendering one of the labels too high, so it gets hidden under the (kendo) window title bar. I've attached pictures of it rendered incorrectly in firefox (chrom does the same) and rendered correctly in IE. I'm guessing this related to the box model.

We're currently running an older version (2012.2.710.340) because we ran into some issues trying to get current and I haven't got them sorted out yet. So wondering if this has perhaps already been fixed in a later version? I'm able to work around the issue by calculating a max and setting it, but it'd be nice if I didn't have to do that.
Iliana Dyankova
Telerik team
 answered on 20 Feb 2015
1 answer
102 views
Hi, is there any way to have the Filter Row tabbing not cause the data to mis-aligned?  I want to be able to tab through Filter Row fields but I want column headers to still be aligned with their column data.

Steps:
1) Resize page so that grid requires horizontal scroll bar
2) Set focus on first filter row input
3) Tab over until you are on filter input outside of visible area and notice that filter row will be coming mis-aligned with data

http://demos.telerik.com/aspnet-mvc/grid/filter-row
Alexander Popov
Telerik team
 answered on 20 Feb 2015
9 answers
461 views

Hi,

Is it possible to use DataSourceRequest when using a Combobox with auto suggest?

For example: I have created T4 templates for simple CRUD operations with the read action like so:

public ActionResult Read([DataSourceRequest] DataSourceRequest request)

I was hoping to use this Read method when populating comboboxes and server filtering for suggesting.

At the moment I have had to add the following action to get it to work.

public ActionResult Lookup(string text)

As the objects are small it would be great if there was a way to reuse the Read action and the ToDataSourceResult() extension to create the filters etc.

Is there a way? Am I missing something? Like a custom model binder or an extension method which takes the query string e.g “text=MySearch&filter[logic]=and&filter[filters][0][value]=dsds&filter[filters][0][field]=DisplayName&filter[filters][0][operator]=contains&filter[filters][0][ignoreCase]=true”

Thanks Matt

Georgi Krustev
Telerik team
 answered on 20 Feb 2015
3 answers
98 views
I'm looking in the documentation but it seems that it is not possible to set the Highlight.Line.Width for a line chart as you can with a OHLC type chart. The JS equivalent would look as follows: 

<script>
$("#chart").kendoChart({
  series: [{
      type: "ohlc",
      data: [
        { open: 1, high: 3, low: 0, close: 1 },
        { open: 2, high: 4, low: 1, close: 1.5 },
      ],
      highlight: {
        line: {
          width: 5
        }
      }
  }]
});
</script>

In our case when you hover over the line itself the dot appears on the series line with the data at that point, but the line width stays the same, which is acceptable. However, when you hover over the legend the line width increases dramatically. So if your line was set to 5 to begin with, you end up with a pretty ugly looking line on hover. 

Why isn't this possible, or where have I missed the documentation for this configuration? 
Danail Vasilev
Telerik team
 answered on 20 Feb 2015
1 answer
132 views
Hi,

We are using the "simple" telerik legacy theme in our new kendo project. We have trreview,treelist,grid and toolbar controls on the page,which are all kendo controls.
The treeview,treelist and grid looks fine with the "simple" telerik legacy theme we are using but the kendo toolbar is not looking good as we think the CSS is missing from the legacy theme.

Can you please let us know if you can make this available for the "simple" telerik legacy theme for Kendo.

Thanks
Iliana Dyankova
Telerik team
 answered on 19 Feb 2015
1 answer
222 views
Is it possible to set the color of a Line chart series based on the grouped data received from the DataSource?
Iliana Dyankova
Telerik team
 answered on 19 Feb 2015
4 answers
395 views
Hi,
In your demo http://demos.telerik.com/aspnet-mvc/treelist/editing i can add new item.
1. But how can i add sub item on selected item?
2. How move item to another level?

Thanks.

 
Nikolay Rusev
Telerik team
 answered on 19 Feb 2015
1 answer
70 views
How would I get and select the first detail row for a group?
Dimiter Madjarov
Telerik team
 answered on 19 Feb 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
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
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
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
Rob
Top achievements
Rank 3
Bronze
Bronze
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
Bronze
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?