Telerik Forums
UI for ASP.NET MVC Forum
3 answers
176 views
EditorTemplate:

<
div class="k-widget">
    @Html.HiddenFor(model => model.Id)
    <div class="edit-buttons">
        <a class="k-button k-button-icontext k-update-button" href="\\#"><span class="k-icon k-update"></span></a>
        <a class="k-button k-button-icontext k-cancel-button" href="\\#"><span class="k-icon k-cancel"></span></a>
    </div>
    <dl>
        <dt>
            @Html.LabelFor(model => model.SharedWith)
        </dt>
        <dd>
            @(Html.Kendo().MultiSelectFor(model => model.SharedWith)
                .DataValueField("Id")
                .DataTextField("Name")
                .Placeholder("Type user's name...")
                .DataSource(source =>
                {
                    source.Read(read =>
                    {
                        read.Action("Users", "User");
                    });
                })
                .TagTemplate("<div class=""tag-image""><img src=""#: Picture #"" height=""32"" /></div>")
                .ItemTemplate("<div class=""item-image""><img src=""#: Picture #"" height=""32"" /></div>"))
        </dd>
    </dl>
</div>
The list view display mode works fine, but as soon as I click edit, and it switches to the EditorTemplate, I get an error saying that Picture is undefined, even though the model that is being passed into the ListView constructor definitely has a fully populated SharedWith model.
Daniel
Telerik team
 answered on 30 Aug 2013
2 answers
151 views
Hello,
I've a kendo UI grid that has a column with editortemplate....
He're the grid

@(Html.Kendo()
    .Grid<DO.Admin.Utente>()
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(x => x.IDDipendente).Visible(false);
        columns.Bound(x => x.IDUtente);
        columns.Bound(x => x.Nominativo);
        columns.Bound(x => x.Societa);
        columns.Bound(x => x.Filiale);
        columns.Bound(x => x.Ruolo);
        columns.Bound(x => x.Profilo);
        columns.Bound(x => x.Funzioni);
        columns.Bound(x => x.Stato).EditorTemplateName("StatoTemplate");//ClientTemplate("#=stati.statiName#");
        columns.Bound(x => x.AccessoEureka);
 
    })
    .Pageable()
    .Scrollable()
    .Editable(editable => editable.Mode(GridEditMode.InCell))
    .DataSource(dataSource => dataSource
        .Ajax()
        .Model(model =>
        {
            model.Id(x => x.IDDipendente);
            model.Field(x => x.IDUtente).Editable(false);
            model.Field(x => x.Nominativo).Editable(false);
            model.Field(x => x.Societa).Editable(false);
            model.Field(x => x.Filiale);
            model.Field(x => x.Ruolo);
            model.Field(x => x.Profilo);
            model.Field(x => x.Funzioni);
            model.Field(x => x.Stato);
            model.Field(x => x.AccessoEureka);
                 
        })
        .Read(read => read.Action("GetListaUtenti", "GestioneUtenti"))
    )
)

And here's the editor template
@{
    Layout = null;
}
 
@(Html.Kendo().DropDownList()
          .Name("Stato")
          .HtmlAttributes(new { style = "width: 250px" })
          .DataTextField("Descr")
          .DataValueField("ID")
          .DataSource(source =>
          {
              source.Read(read =>
              {
                  read.Action("GetListaStati", "Common", new { Area = string.Empty });
              }).ServerFiltering(false);
          })
    )

Consider the List of Stato items
as

0 | Active
1 | Disactive

when I show the grid in read I've my columns that shows Active/Disactive based on a field called Stato that's string....
After I change the dropdown I got 0/1 instead.... how do I fix this?

Second question, in my model I also have a IdStato that's 0/1 and its used when updating the model.... should I put this as an Hidden column? how do I update that field as well?
Thank in advance
Paolo
Michele
Top achievements
Rank 2
 answered on 30 Aug 2013
1 answer
143 views
Hello,

I would like to implement a vertical menu and for the child or sub menus have them pull down like an accordion style rather than flyout.

Is this possible or does anyone have an example I can look at?

Thanks.
Dimo
Telerik team
 answered on 30 Aug 2013
4 answers
88 views
When I double click on a event to edit it in IE 10, the edit window opens and closes by itself, if I open it a second time it stays open.
If I click on the event wait a second and then double click the edit window opens and stays open as it should.
But as explained above, the first double click on a event causes the windows to open and close.
Thanks
Alan Mosley
Top achievements
Rank 1
 answered on 30 Aug 2013
1 answer
101 views
I am trying to implement a simple Pageslide Jquery plugin, however it will not work using the Kendo version of Jquery - I am using the following version:

kendo/2013.2.716/jquery.min.js

Please advise if there is an update or patch that I can use to get this working.

Thanks.
Alexander Valchev
Telerik team
 answered on 30 Aug 2013
1 answer
110 views
I have kendo grid have some columns and one of these columns is foreign key and implemented as combobox inside editor template and the datasource is a collection of values retrieved from database. when the grid loaded and when edit or insert the first row the read function will run and will get the values from DB but in the second edit or insert the read function will not run and the combobox will retrieve his datasource from the first edit. My question is how to make the combobox run the read function in every edit or insert?
This is my code:
columns.Bound(p => p.Employee).ClientTemplate("#=Employee.EmployeeText#").Width(110);//This column for foreign key

and my view model:
[UIHint("EmployeeForeignKeyEditor")]
public EmployeeViewModel Employee { get; set; }

and the EmployeeForeignKeyEditor is in EditorTemplates folder inside Shared:
@model SpinePOCViewModel.ViewModels.EmployeeViewModel
@(
Html.Kendo().ComboBox()
.DataTextField("EmployeeText")
.DataValueField("EmployeeID").Name("Employee")
.Placeholder("Select Employee")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("MarketingCoordinatorcb_Read", "Marketing");
})
.ServerFiltering(true);
})
.AutoBind(false)
)

and read function:
public ActionResult MarketingCoordinatorcb_Read()
{
ViewBag.Employees=SomeFunctionToGetData();
return Json((List<EmployeeViewModel>)ViewBag.Employees, JsonRequestBehavior.AllowGet);
}

and Employee view model:
public partial class EmployeeViewModel
{
public int EmployeeID { get; set; }
public virtual string EmployeeText { get;set;}
}
Vladimir Iliev
Telerik team
 answered on 30 Aug 2013
5 answers
263 views
Using the editable template I want to have a drop down for my resources, so far I have
<div class="k-edit-field" data-container-for="TeamId">
    <input data-role="combobox" data-bind="value: TeamId" />
</div>
This gives me the value, but not the list, how do I get the list ?
 thanks


Alan Mosley
Top achievements
Rank 1
 answered on 30 Aug 2013
1 answer
94 views
Recreated this http://demos.kendoui.com/web/treeview/remote-data.html using latest nightly

On expanding, the root folder seems to contain itself, the returned id never seems to be bound to the tree view at all.
Daniel
Telerik team
 answered on 29 Aug 2013
1 answer
168 views
Hello,
please excuse me if I post you this but I was wondering what's the best approach for implementing this...
I've got a Grid witch has 3 column that will be editable and will have to show a dropdown while editing... we can call them Country,Profile and Status
I've to prefix that I came from SL world so what I do in that world would be
  • call the services GetCountries,GetProfiles and GetStatus
  • save those datas in 3 different collection
  • at the cell edit open the dropdown loading the corresponding collection as possible values and selecting the selected matching the IdCountry,IdProfile.IdStatus

How can I do this in the MVC world? I think I can't have all done via Mvc without using javascript... or should I create a viewmodel that holds those collections?

If I use "pure" js I would have 3 calls to the service from js, store the values and perform as I've written above

Any suggestion?
Thanks

Petur Subev
Telerik team
 answered on 29 Aug 2013
4 answers
254 views
Hello folks,
     If I set up an editor and set .Encode() to false OR specify .ViewHtml(), as soon as I click in the editor or show the Html by pressing the View Html button, the change event is fired which isn't really true from a user perspective.
Is there a way to prevent that behavior OR is there a way to know it's the encoding (or any other internal mechanism of the component) that fires the change so I can handle it properly?
What I want to achieve is, when the editor changes, I want to set a page dirty flag so I can notify the user something changed and wasn't saved in the editor.

Regards,

Stephan
Stéphan Parrot
Top achievements
Rank 1
 answered on 29 Aug 2013
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
ColorPicker
DateRangePicker
Security
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?