Telerik Forums
UI for ASP.NET MVC Forum
2 answers
86 views
Hi,

Since we've updated to the 2015 Q1 update a number of our DropDownLists have stopped selecting the top item on page load.  This is the issue we're having, seems to be consistent with the following criteria:

-DropDownListFor a default int property (so value is 0 by default)
-DataSource is a small collection contained in the ViewBag with no item of ID 0

eg
@(Html.Kendo().DropDownListFor(x => x.ClientID)
                            .DataTextField("name")
                            .DataValueField("id")
                            .BindTo((System.Collections.IEnumerable)ViewBag.Clients)
                        )

These were working before the update, and just defaulting to an index of 1, but even trying to set the SelectedIndex property fails to alleviate the problem.   Any advice you might have would be much appreciated.

Thanks,
Kevin











Georgi Krustev
Telerik team
 answered on 27 Mar 2015
4 answers
1.7K+ views
Hello,
I have a context menu displayed on right clicking kendo grid like this.
@(Html.Kendo().ContextMenu()
        .Name("menuGrid")
        .Target("#Grid_ObjActivity")
        .Orientation(ContextMenuOrientation.Vertical)
        .Animation(animation =>
        {
            animation.Open(open =>
            {
                open.Fade(FadeDirection.In);
                open.Duration(500);
            });
        })
        .Items(items =>
        {

            items.Add()
               .Text("Herunterladen")
               .ImageUrl(Url.Content("~/Images/Download.png"));
            items.Add()
              .Text("Löschen")
              .ImageUrl(Url.Content("~/Images/Delete.png"));

        })
        .Events(e => e.Select("ContextClick"))

    )

This is ok but i would like to have the items added dynamically depending on type of row clicked on grid. Each row in grid has a different type and right clicking show a different context menu with different action.

How can i achieve this in my razor view.

Thanks

Anamika
Daniel
Telerik team
 answered on 27 Mar 2015
1 answer
380 views
Hello,

I have a grid that I'm grouping by the Value of a KeyValuePair property in my Model. I'm able to access the GroupedBy value (using "#= value#") in the ClientGroupHeaderTemplate, but I also need access to the Key (represented in the code below as "#= key#". Is it possible to do this?

@(grid.Name(Model.GridId)
.HtmlAttributes(new { @class = "kendo-grid", data_get_url = Url.Action("GetStaticPermissions", "PermissionSetRecord", new { permissionSetId = Model.PermissionSetId }) }) 
.DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action(Model.ReadAction, "PermissionSetRecord", new { category = Model.Category, permissionSetId = Model.PermissionSetId }))
        .Group(groups => groups.Add(permission => permission.PermissionGroupInfo.Value)))
    .Columns(columns =>
    {
        columns.Bound(d => d.PermissionGroupInfo.Value)
            .Hidden(true)
            .ClientTemplate("")
            .ClientGroupHeaderTemplate(GetTemplateTitle().ToHtmlString());
        columns.Bound(d => d.DisplayName)
            .Title(Saturn.Resources.Admin.Security.Permission);
        columns.Template(@<text></text>)
            .Title(Saturn.Resources.Admin.Security.AllowQuestion)
            .Width(100)
            .ClientTemplate(Html.Partial("Permissions/_Toggle", Model).ToHtmlString());
    }))

@helper GetTemplateTitle()
{
    <span>
          #= value# 
         
         
// I want access to the key of my property here
          #= key#
    </span>    
}

Thanks.








Petur Subev
Telerik team
 answered on 27 Mar 2015
1 answer
125 views
Latest version comes with many bugs in this widget:
1. Error on delete item using remove icon:
Scenario : Select 1 item from list then typing name and select another item, now delete previous item with click on remove icon
2. Duplicate on delete item using backspace key
Scenario : Select 1 item from list then typing name and select another item, now perform delete item using backspace keyboard
3. Select values contains empty string for previous item
Scenario : Select 1 item from list then typing name and select another item, now select it using js in developer console see its value

you can see my test video on attachment..
Any workaround for this? 
Georgi Krustev
Telerik team
 answered on 26 Mar 2015
2 answers
180 views
Hi,

I have a requirement of kendo editable Grid  where Simply I click on each cell and it goes to editable mode and once I came out of text box it should commit the change. So its actual In Cell edit but no batch updates required. It will be In Cell editing and once you loos focus of the cell changes needs to be committed.
(Dont want to Use toolbar as its not batch update.)
Can you please provide some example ASAP?

Thanks,
Aarti
Aarti
Top achievements
Rank 1
 answered on 26 Mar 2015
3 answers
184 views
Hello

I have a grid containing product registrations, fetched from a table(registration) in a DB. One of the columns in the registration table is for countryName, country is stored as a FK countryID (int) in the registration table. But in the grid i'm showing the corresponding countryname. I have a popup editor for rows in the grid with a dropdowlist for chosing country, this dropdownlist fetches data from the country table with id as datavaluefield and name as datatextfield. 

The code for the country column in the grid:
columns.Bound(c => c.countryName).Width(120).Locked(true);

The code for the dropdownlist:
@(Html.Kendo().DropDownListFor(model => model.countryId)
              .HtmlAttributes(new { style = "width: 183px", required = "required" })
              .DataTextField("name")
              .DataValueField("id")
              .OptionLabel("Select country...")
              .DataSource(source =>
              {
                  source.Read(read =>
                  {
                      read.Action("GetCountries", "Home");
                  });
              })
            )

As you can see the column in the grid is mapped to countryName and the dropdownlist is mapped to countryId. This means changes made in the dropdownlist doesn't get updated in the grid. How can I update the countryName cell in the grid with the selectedTextvalue from the dropdownlist?

/Jonas
Boyan Dimitrov
Telerik team
 answered on 26 Mar 2015
1 answer
126 views
Hi Telerik,

I am currently working with the trial version of UI for ASP.NET MVC and noticed that at this link no source code can be found. Could you please update it or, at least, provide some code samples in this thread as I really prefer/expect to use Html Helpers for input fields with an icon either left or right rather than straightforward Html which is superfluous in my case, that is:

@(Html.Kendo().TextBoxFor(m => m.Property).Icon("some css class or whatever").Left())

I am looking forward to hearing from you soon. Thanks in advance!

Kind regards,
Mor
Dimo
Telerik team
 answered on 26 Mar 2015
1 answer
85 views
Is there a way to define your own EndCap Definition. There are now three type 'none', 'FilledCircle' and 'ArrowEnd'. I'd like to have my own rectangular end.
Daniel
Telerik team
 answered on 26 Mar 2015
0 answers
99 views
Is there a way to set the EndCap to an own defined Type. I'd like to have it a rectangle of instance.
Iwan van Ee
Top achievements
Rank 1
 asked on 26 Mar 2015
1 answer
1.3K+ views
Hi there,

I have a query over the out of the box approach used to control the max and min properties of a MVC DatePicker. I am using the Q3 2014 release and Kendo validation with MVC 5.

Without applying the .Max() or .Min() attributes, here is what we have being rendered out of the box:

$(function () {
        $("#DOB").kendoDatePicker({
            "format": "d",
            "min": new Date(1900, 0, 1, 0, 0, 0, 0),
            "max": new Date(2099, 11, 31, 0, 0, 0, 0)
        });
    });

This does correctly apply the range to the picker element - it is not possible to use this to input a date outside this range. However, the effect of this on the keyboard input is altogether different.

  • If I type in a date within the range, i.e. 01/01/2000, but then add an extra digit to the year, this will be automatically truncated. So 01/01/20000 becomes 01/01/2000.
  • However, if I type in a date which falls outside the min/max range, i.e. 01/01/1800 and then add an extra digit, nothing happens.
Surely this approach is very inconsistent? Why have the autocorrect functionality at all if it is only applied within the range?

I have read other responses to similar queries (Kendo DatePicker Max and Min values not limiting text entry). The suggestion there was to make the input control read only to achieve the desired behaviour (meaning that only the picker can be used). Surely this isn't really acceptable from an accessibility point of view?

I would also have expected the date control to be able to enforce the Max and Min values which are part of its own API - for both keyboard and the picker? There is obviously some script running which recognises it is within or without the range - or else why do we observe the behaviour above?

Thanks,

Paul
Alexander Popov
Telerik team
 answered on 25 Mar 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
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?