Telerik Forums
UI for ASP.NET MVC Forum
2 answers
336 views

I have implemented a hierarchy grid, and I would like to implement an event to launch a kendowindow on doubleclick of the subgrid.

 

Since the grid is named dynamically "grid_[ID OF ITEM]" I am not sure how to grab the row in script like I would if I knew the grid name.

$('#grid_#=CustomerCode# table tr').live('dblclick', function () {
           // code
  }); 

does not work,and I assume because I cant shove that type of name into JS as it is an asp element. How would I write that query correctly?

Kevin
Top achievements
Rank 1
 answered on 21 Jan 2016
5 answers
191 views
Hi,

I would like to use the Map control to display an overlay of our building layout. That is, I have an image of our offices, cubes, floors, etc. and I would like to use that with the map control, including zooming in/out.

Is there an example of doing that or some documentation explaining the process?
T. Tsonev
Telerik team
 answered on 21 Jan 2016
1 answer
129 views

Hello,

I need to set stroke color of individual connections between shapes depending on Model data from Controller.

 Is that possible with Html.Kendo() helper?

 

.DataSource(d => d
        .Read(read => read.Action("_SomeDiagram", "Diagram"))
        .Model(m => {
            m.Children("Entities");
            m.Id("Name"); }))  
.ConnectionDefaults(c => c.Stroke(s => s.Color("#979797").Width(2)))

 

ViewModel structure is simple with one root entity and three children.

T. Tsonev
Telerik team
 answered on 21 Jan 2016
1 answer
98 views

I cant apply correct page size to exported pdf from kendo editor. Is it bug? Is there some solution at this situation? 

It always set page size to size of content

http://c2n.me/3t7fNrQ

 

Alexander Popov
Telerik team
 answered on 21 Jan 2016
1 answer
110 views
We have telerik version 2015.2.805 which was used for MVC4 application. Now we are migrating to MVC5. I checked in NuGet. There Telerik UI package is available only for MVC6. My question is if same 2015.2.805 can be used for MVC5? What code changes are needed to make them to work with MVC5? Also by going to properties of Kendo.mvc.dll,can we know what MVC version that is supporting or is there any other way to identify the MVC version being supported?
Sebastian
Telerik team
 answered on 21 Jan 2016
7 answers
479 views

I've noticed there's a small visual issue occurring while using the date picker when going up (clicking on the month name, clicking on the year number) or going down (clicking on the selected year, clicking on the selected month).

 

When you go up or down a level, the elements in opened window starts off at a size which is slightly larger than what it should be when it finishes loading, so then when the widget finishes loading, it "jumps" to thesmaller size.

 

This currently happens on all styling, but its the most pronounced when using the material theme (e.g. using the bootstrap theme will make the elements jump very slightly towards the bottom).

 

Is there a way to stop this from happening?

 

Thanks

Dimo
Telerik team
 answered on 21 Jan 2016
2 answers
161 views

Hello everybody,

I have a TreeList, which displays Data from an external DataSource. I asked my self, how I can access the filter by a textbox. I tried alot, but nothing of that worked. Is there any way to do this?

 This is what i got so far:

LogEntryView:

02.<div class="form-group">
03.        @(Html.Kendo().TextBox()
04.            .Name("tree-text-search")
05.        )
06.        @(Html.Kendo().Button()
07.            .Name("Search")
08.            .Content("Search")
09.            .Events(e => e.Click("onClick"))
10.        )
11.</div>
12.@(Html.Kendo().TreeList<HrLaborRelation.Web.Models.LogEntryViewModel>()
13.    .Name("Entries")
14.    .Columns(columns => {
15.        columns.Add().Field(f => f.EntityName);
16.        columns.Add().Field(f => f.SpecifiedType);
17.        columns.Add().Field(e => e.ColumnName);
18.        columns.Add().Field(e => e.NewValue);
19.        columns.Add().Field(e => e.OldValue);
20.        columns.Add().Field(e => e.Action);
21.        columns.Add().Field(e => e.CreatedBy);
22.        columns.Add().Field(e => e.EntryDate).Format("{0:dd/MM/yyyy HH:mm}");
23.    })
24.    .Resizable(true)
25.    .Reorderable(true)
26.    .ColumnMenu()
27.    .Filterable(true)
28.    .DataSource(dataSource => dataSource
29.        .Read(read => read.Action("GetEntries", "LogEntry"))
30.        .Model(m => {
31.            m.Id(f => f.LogEntryId);
32.            m.ParentId(f => f.ParentLogEntryId);
33.            m.Field(f => f.EntityName);
34.        })
35.    )
36.)
37.//I actually don't really know what this does
38.function onClick(e) {
39.        alert("Click");
40.        var treeview = $("#Entries").data("kendoTreeView"),
41.        searchContext = $("#tree-text-search").val()
42.        alert(searchContext)
43.        item = treeview.findByText(searchContext),
44.        dataItem = treeview.dataItem(item),
45.        nodeText = dataItem.EntityName;
46. 
47.        alert(nodeText);
48.        while (dataItem.parentNode()) {
49. 
50.            alert("Iterating");
51.            dataItem = dataItem.parentNode();
52.            dataItem.children.filter({ field: "EntityName", operator: "contains", value: nodeText });
53.            nodeText = dataItem.text;
54.        }
55.}

LogEntryController:

01.namespace HrLaborRelation.Web.Controllers
02.{
03.    public class LogEntryController: BaseController {
04. 
05.        // GET: LogEntry
06.        public ActionResult Index() {
07.            return View(db.LogEntries.Where(x => x.EntityId == -1).ToList());
08.        }
09.        public JsonResult GetEntries([DataSourceRequest]DataSourceRequest request, int? id, /*string searchText*/) {
10. 
11.            var entries = db.LogEntries.Include(e => e.ColumnLogEntries);
12.            if (id.HasValue) {
13.                entries = entries.Where(e => e.ParentLogEntryId == id);
14.            }
15.            //if(!string.IsNullOrEmpty(searchText)) {
16.            //    entries = entries.Where(e => e.EntityName.Contains(searchText));
17.            //}
18.            var result = entries.ToList().Select(e => new LogEntryViewModel(e, e.ColumnLogEntries.Any()));
19. 
20.            return Json(result.ToTreeDataSourceResult(request), JsonRequestBehavior.AllowGet);
21.        }
22.    }
23.}

Thanks for your help.

 Kind regards 

 Brian Haller

Brian
Top achievements
Rank 1
 answered on 21 Jan 2016
3 answers
276 views

Hi,

 

I have applied different colours for different events but I need to show different gradient colours or 2 colours for each event. Is there any way to do this?

 

Thanks in advance.

Iliana Dyankova
Telerik team
 answered on 20 Jan 2016
1 answer
4.2K+ views

Hi,

 

I have to get the values user entered on edit in the inline grid. So I have kept save event on gird and trying to access the values on the method but I am not sure how to the get the values.

   @(Html.Kendo().Grid<BHEBS.Areas.Admin.Models.ContractBudgetModel.contractBudgetBUModel>()
        .Name("ContractBudgetBUGrid")
                 .Events(e => e.Save("onSave"))
        .Columns(columns =>
        {
            columns.Bound(p => p.Id);
            columns.Bound(p => p.BusinessUnit);
            columns.Bound(p => p.Description);       
            columns.Bound(p => p.ServiceType);
            columns.Bound(p => p.BUAuthAmt);
            columns.ForeignKey(p => p.SpendPriority, (System.Collections.IEnumerable)ViewData["SpendPriority"], "Value", "Text").Width(120);
            columns.Bound(p => p.ContractBUAmt);
            columns.Bound(p => p.BUBudgetAmt);
            columns.ForeignKey(p => p.contractSpendPriority, (System.Collections.IEnumerable)ViewData["SpendPriority"], "Value", "Text").Width(120);
            columns.Command(command =>
            {
                command.Edit().HtmlAttributes(new { @class = "btn-primary" });               
            });         
        })       
        .Pageable(pageable => pageable.Refresh(true).PageSizes(true).ButtonCount(5))      
        .Sortable()
        .Scrollable()
        .Filterable()
        .Selectable()
        .Resizable(resize => resize.Columns(true))
        .HtmlAttributes(new { style = "height:450px;" })
        .DataSource(dataSource => dataSource.Ajax().PageSize(10).Read(read => read.Action("ContractBudgetBU_Read", "ContractBudget").Data("additionalInfo"))
                                .Model(model => { model.Id(p => p.Id); model.Field(p => p.Id).Editable(false); model.Field(p => p.BusinessUnit).Editable(false); model.Field(p => p.Description).Editable(false); model.Field(p => p.ServiceType).Editable(false); model.Field(p => p.BUAuthAmt).Editable(false); model.Field(p => p.BUBudgetAmt).Editable(false); model.Field(p => p.SpendPriority).Editable(false); model.Field(p => p.contractSpendPriority).DefaultValue("Normal"); })
                        .Update(update => update.Action("Update_ContractBudgetBU", "ContractBudget"))))
 
 
 function onSave(e) {
        var data = e.values;
//I am getting error e.values is undefined.
}

 

 

Thanks,

Veena

Boyan Dimitrov
Telerik team
 answered on 20 Jan 2016
1 answer
144 views

I am using asp.net mvc 6 and your example chart code below.  I get an compile error on .bar -  ChartSeriesFactory' does not contain a definition for 'Bar' and no extension method 'Bar' accepting a first argument of type 'ChartSeriesFactory' could be found (are you missing a using directive or an assembly reference?

I'm using your latest code 2016.1.112 trial version and set up exactly as described in your documentation.

<div class="demo-section k-content wide">

    @(Html.Kendo().Chart()
        .Name("chart")
        .Title("Site Visitors Stats \n /thousands/")
        .Legend(legend => legend
            .Visible(false)
        )
        .ChartArea(chartArea => chartArea
            .Background("transparent")
        )
        .Series(series =>
        {
            series.Bar(new double[] { 56000, 63000, 74000, 91000, 117000, 138000 }).Name("Total Visits");
            series.Bar(new double[] { 52000, 34000, 23000, 48000, 67000, 83000 }).Name("Unique visitors");
        })
        .CategoryAxis(axis => axis
            .Categories("Jan", "Feb", "Mar", "Apr", "May", "Jun")
            .MajorGridLines(lines => lines.Visible(false))
        )
        .ValueAxis(axis => axis
            .Numeric()
            .Max(140000)
            .Line(line => line.Visible(false))
            .MajorGridLines(lines => lines.Visible(true))
        )
        .Tooltip(tooltip => tooltip
            .Visible(true)
            .Template("#= series.name #: #= value #")
        )
    )
</div>

T. Tsonev
Telerik team
 answered on 20 Jan 2016
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
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
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
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?