Telerik Forums
UI for ASP.NET MVC Forum
1 answer
562 views
We are using kendo treeview to display hierarchial datasource in cshtml.

One of our requirement is to check/uncheck all children checkboxes when a parent is checked/unchecked, so we used checkChildren property to
achieve this.

@(Html.Kendo().TreeView()
      .Name("SampleList")
      .Checkboxes(chk => { chk.CheckChildren(true); })
      .DragAndDrop(false)
      .ExpandAll(true)
.....


But the issue is when we uncheck a child, the parent should not get unchecked, even if we have one child inside the parent.

Can you please provide jquery code snippet to achieve this?

Thanks.
Daniel
Telerik team
 answered on 27 Jan 2015
1 answer
256 views
Hi there
My question is about Gantt chart and ability to drag some div (pseudo task in my case) to Gantt area and drop it there, then i want to execute "task create event" and open new task window. Does MVC Gantt controls support such functionality?
Best Regards
Krzysiek
Bozhidar
Telerik team
 answered on 27 Jan 2015
4 answers
123 views
Hi,

Working with MVC5 and Kendo().Grid.
Using filter on columns, won't fire the javascript function with the right params or I don't understand how to !!
The aim is to remove the decimals from the integer in the filter box.

This is what I have:
.Columns(columns =>
    {
        columns.Bound(e => e.InternalId).Width(60).Filterable(filter => filter.UI("NumericFilter()"));
    })

-and the function:
function NumericFilter(control) {
    alert ("Got here...");
    $(control).kendoNumericTextBox({ "format": "n0", "decimals": 0 });
}

When the function is called, the param is null. If removing the parentheses from the function name in the filter definitions, the call is not fired at all.
The above code is found somewhere else on this site.
Thanks.
Rosen
Telerik team
 answered on 27 Jan 2015
1 answer
306 views

We are using Kendo controls (date picker, numeric text box, dropdown) in our cshtml pages along with other standard html controls.

When using "shift + tab", the reverse movement halts at a datepicker.

Dropdown and other kendo controls are working fine for same process.

Following settings are applied to all DatePickers:

datepicker.setOptions({
     format: "dd/MM/yyyy",
     parseFormats: ["dd/MM/yy"],
     culture: window.culture,
     min: new Date(1000, 0, 1),
     max: new Date(9999, 11, 31),
     value: dateValue
});

Please note:
    1. This behavior is common in all browsers like Internet Explorer, Firefox, Chrome
    2.  Kendo js version: Kendo UI Complete v2013.3.1324

Please advise how to make Shift+Tab work for this scenario.

Dimo
Telerik team
 answered on 26 Jan 2015
4 answers
136 views
A grid has a child grid in it, which opens on click of icon in a row.
The filter popup of the parent grid opens outside the height of grid but the child grid's filter popup is inside the parent's grid boundary/height.
Attaching snapshot of how it looks.
Is there a way to fix it ?
Dimo
Telerik team
 answered on 26 Jan 2015
3 answers
548 views
From the version 2014.3.1119 we have got export to PDF.  This feature is really nice, but I cannot find a way to correctly display polish charactes in PDF. Probably in other languages it will be the same. Export to Excel from then same place works fine. I've tried on your demo (Kendo.Mvc.Demo) changing unit pdf_export.cshtml. below is the changed code and the screens.
[code]@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.EmployeeViewModel>()
.Name("grid")
.HtmlAttributes(new { style = "width: 900px; font-family: Arial Unicode MS" })
.Columns(columns =>
{
columns.Bound(e => e.EmployeeID).Width(140).Title("Zdjęcie");
columns.Bound(e => e.Title).Width(400).Title("Szczegóły");
............................
.ToolBar(tools => tools.Pdf())
.Pdf(pdf => pdf
.FileName("Kendo UI Grid Export.pdf")
.ProxyURL(Url.Action("Pdf_Export_Save", "Grid"))
)
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Pdf_Export_Read", "Grid"))
)
..............................[/code]
Controler I've reminded unchanged. In webbrowse as well as in PDF Complete (and other pdf viewers) the polish characters are display wrong. Export to XLS  is OK. Is it possible in MVC to change default font name only for export to PDF.

Kiril Nikolov
Telerik team
 answered on 26 Jan 2015
3 answers
524 views
Hi,
I'm using a Grid popup editing with custom editor I'd like to use upload control with initially files loaded from a path that depends by the Id field (taskID) of the ViewModel (TaskViewModel).
Here it is the code I'm using:

   @(Html.Kendo().Grid<Telerik_Tecnim.Models.TaskViewModel>()
                    .Name("Grid")
            .Columns(columns =>
            {
                columns.Bound(o => o.taskID);
                columns.Bound(o => o.Cont);          
  ....
            })
            .DataSource(dataSource => dataSource
                .Ajax()
                .PageSize(10)
                .Model(model =>
                {
                    model.Id(o => o.taskID);
                    model.Field(o => o.taskID).Editable(false);
   ....
                  
                })
                                .Create(update => update.Action("Task_Create", "Task", new { id = "#=ticketID#" }))
                                .Read(read => read.Action("Task_Read", "Task", new { ticketID = "#=ticketID#" }))
                                .Update(update => update.Action("Task_Update", "Task"))
                                .Destroy(update => update.Action("Task_Destroy", "Task"))               
            )
            .Pageable()
            .ToolBar(toolbar => toolbar.Create())
            .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("Task")))
            .Sortable()
            .ToClientTemplate()The editor template, task.cshtml, is:@model Telerik_Tecnim.Models.TaskViewModel
...
<div>
    @(Html.Kendo().Upload()
              .Name("files")
              .Async(a => a
                  .Save("SaveAndPersist", "Upload", new { id = "#=taskID#" })
                  .Remove("RemoveAndPersist", "Upload", new { id = "#=taskID#" })
                  .AutoUpload(true)           
              )
                      .Files(files =>
                      {
                          foreach (var f in Model.UploadFiles)
                          {
                              files.Add().Name(f.Name).Extension(f.Extension).Size(f.Size);
                          }
                      })
    )
</div>

TaskViewModel is:
...
namespace Telerik_Tecnim.Models
{
    public int taskID { get; set; }
 ....
    public class TaskViewModel
    {
        .....
        public IList<Telerik_Tecnim.Models.UploadFileViewModel> UploadFiles
        {            get
            {                return SessionUploadInitialFilesRepository.GetAllInitialFiles(this.taskID);
            }            set
            {            }        }
    }
}

Unfortunately Model.UploadFiles in editor template seems to be empty (any file is show in uplaod control) but if I check the data with Fiddler UploadFiles is not empty!
How to use upload with initially files in editor template from a variable path depended by a field of the model?
Thanks in advance
Daniel
Telerik team
 answered on 26 Jan 2015
1 answer
130 views
Hi all,

I'm having a already existing code where currently it is using a ulrtawebgrid (infragistic control). Now I'm in the process of replacing the grid to telerik rad grid. 
The problem is that i need to bind the grid programatically and also need to set the group field and al. I have saw so many grouping C# code with a simple list.


If any of you have done the dynamic binding and grouping in C# from a list collection please let me know or share the code snippet.


Thanks in advance ,
Sabitha
​
Vladimir Iliev
Telerik team
 answered on 26 Jan 2015
1 answer
1.3K+ views
I set the selected item using the first code block below. But I need to pass the item and items value to the selected event function. Which is the second code block below.  i also included the code for the Dropdownlist, the third code block.  How do I do this?  Thanks
function onIncDataBound() {
var dropdownlist = $("#IncludeExclude").data("kendoDropDownList");
if (dropdownlist.dataSource.data().length == 1) {
debugger;
var items = $("li.k-state-selected", $("#IncludeExclude-list"));
dropdownlist.trigger("select", { item: items, value: dropdownlist.text() });
}
}
function onInExSelect(e) {
        debugger;
        var projSq = '@Model.Project.ProjSq';
        var typeDol = $('#type').val();
        var county = $('#county').val();
        var dataItem = this.dataItem(e.item);
        var incExc = dataItem.Value;
        var Url = '@Url.Action("GetDecision", "Shared")';
        $.ajax({
            url: Url,
            type: 'GET',
            dataType: 'HTML',
            data: { cnty: county, projSq: projSq, includeExclude: incExc, type: typeDol }
        })
@(Html.Kendo().DropDownListFor(d => d.RequestFlatten.IncludeExclude)
.Name("IncludeExclude")
.HtmlAttributes(new { style = "width:450px" })
.OptionLabel("Select Include/Exclude")
.DataTextField("Description")
.DataValueField("Value")
.CascadeFromField("Type")
.Events(e => e.Select("onInExSelect").DataBound("onIncDataBound"))
.CascadeFrom("FdolTypeCode")
.AutoBind(false)
.Enable(false)
.DataSource(ds => ds.Read(r => r.Action("GetIncludeExcludeByCountyAndType", "Shared").Data("filterIncludeEx"))
.ServerFiltering(true)))
@Html.HiddenFor(h => h.RequestFlatten.IncludeExclude, new { id = "incExc" })

Mike
Top achievements
Rank 1
 answered on 23 Jan 2015
3 answers
125 views
Our main window is vertically split into two. Left side has a grid and right has other views. We have also enabled Tooltip for the grid. We observed that even if the user moves the mouse pointer beyond the left splitter pane, the tooltip does not disappear. When we inspected the HTML elements, beyond the visible left pane, tr element of all grid rows extends to the right edge of the body and hence mouseout event does not occur.

We attempted to set the grid height and width to match the splitter pane without any success. We have observed this behavior in IE, Chrome and Firefox. We did not try in other browsers.

How to set the grid height and width same as that of splitter pane?
Dimo
Telerik team
 answered on 23 Jan 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
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
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?