Telerik Forums
UI for ASP.NET MVC Forum
1 answer
524 views

Hi,

 

I have following kenodgrid

 

(Html.Kendo().Grid<SSAIFCN.Domain.evViewModel>()
        .Name("evGrid")
        .Columns(columns =>
        {
            columns.Bound(x => x.evId).Visible(false);
            columns.Bound(x => x.PId).Title("Company").HeaderHtmlAttributes(new { style = "white-space: normal" }).EditorTemplateName("PEEditor")  .ClientTemplate("#=CompanyName#")

  columns.Command(command =>
            {
                command.Edit();
                command.Destroy();
            });

 .ToolBar(toolbar => toolbar.Create())
    .Editable(editable => editable.Mode(GridEditMode.InLine))

.DataSource(dataSource => dataSource
           .Ajax()

 .Create(update => update.Action("CreateEV", "EVController"))

 

------------------PEEditor.cshtml

@model object

@(Html.Kendo().ComboBoxFor(m => m)
    .DataTextField("PEtext")
    .DataValueField("PEID")
     .Placeholder("--Select--")
     .DataSource(source =>
     {
         source.Read(read =>
         {
             read.Action("GetPEData", "EVController"); //Set the Action and Controller names.
         });
     })

 

---------------- CreateEV controller

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult CreateEV([DataSourceRequest] DataSourceRequest request, evViewModel evt)

{

// create code here

}

 

Dropdown shows value perfectly in edit mode

Question: when I select he values and update/create the record I don't see any value in "evt.PID ". it is null.

In other words how do I get the value selected in dropdown  to model grid and pass on create action

 

Thanks for your help

 

 

 

Eyup
Telerik team
 answered on 20 Dec 2016
1 answer
494 views

The MVC Kendo Grid supports a custom EditorTemplate via the EditorTemplateName property. Can you please provide an example showing how to apply a custom DisplayTemplate as well, or a ClientTemplate that allows the ForeignKey column to continue to function properly?

 

Thanks!

Christopher
Top achievements
Rank 1
 answered on 19 Dec 2016
1 answer
172 views

We're a bit confused about how to connect the release numbers with the release history page (http://www.telerik.com/support/whats-new/aspnet-mvc/release-history).

For example our version of Kendo UI for MVC is 2016.3.914, but the release history pages have titles (such as UI for ASP.NET MVC R3 2016) that can't easily be matched.

Is there a cross reference table somewhere?

Vessy
Telerik team
 answered on 19 Dec 2016
3 answers
272 views

So I'm seeing some weird behavior.  

When ever the grid is navigatable and you are using the popup grid editing and user hits cancel, the grid scrolls to the bottom of the list.  You can best see the bug when you choose to edit the first record.  Additionally, after clicking cancel, then going to edit the first row again, the scrolling issue doesn't happen.

I've created a dojo to help display the issue: http://dojo.telerik.com/@jhinnen@momentum3.biz/aBUkA

Thanks,

Jeff

Konstantin Dikov
Telerik team
 answered on 19 Dec 2016
6 answers
689 views
I am new to Kendo UI and wanted to use Kendo grid inline editing .

 

Couple of columns in my grid  needs to have Combo box  for new record or update. I did not find any clear example on this.

Can you  please direct me to proper link or give an example on how to  use  combo box for inline editing.

 

Thanks for your help

Eyup
Telerik team
 answered on 19 Dec 2016
3 answers
218 views

It appears the Spreadsheet component doesn't have a way to automagically size the columns, and I was hoping there might be a workaround for this somewhere?  I am loading CSV files into the spreadsheet, all of which could have completely different formats, so cannot just hard code column widths...

 

Or at the very least, in Excel I can select all rows and columns, double click on a dividing line between headers, and it will automagically resize columns.  Perhaps there's a way to implement this behaviour?

Veselin Tsvetanov
Telerik team
 answered on 19 Dec 2016
1 answer
161 views

I have a grid that I am using as a matrix (see attached), and I have even been able to create rows and columns

 

But I would really like to be able to add a label for both the X and Y directions, preferably on the top and left side. Any ideas how I could do this without it being too difficult and weird?

 

 

Danail Vasilev
Telerik team
 answered on 19 Dec 2016
4 answers
137 views

 I have a grid with a specific height set with the following code:

.Scrollable(s => s.Height(400))

 

And one of the columns locked:

columns.Bound(p => p.Line).Width(180).Locked(true);

 

The locked column has no height set and is one long column. (see attachment)

 

 

Konstantin Dikov
Telerik team
 answered on 16 Dec 2016
5 answers
529 views

I have a timepicker in my MVC form.

@Html.Kendo().TimePickerFor(model => model.ShipmentCallTime).Format("HH:mm")

 

The user enters an invalid time like "2343" then clicks save. On postback, ModelState.IsValid is false as the control recognizes that as an invalid time and the validation message is displayed properly.

 

The user then corrects the time entry to a valid time "23:43" and clicks save.  On postback, ModelState.IsValid is true but the valid time the user entered is not in the model.  The property is NULL. 

Why??  It seems like the TimePicker is nuking the valid time for some reason.  If I go back after the save and enter a valid time it works correctly.  I can repeat these steps and have this happen every time.

Vasil
Telerik team
 answered on 16 Dec 2016
8 answers
1.6K+ views
Hello again,
How to add a dropdownlist in the popup,when editing a grid?

I reproduced the Popup editing on server side, with products as the data and it works fine ,and i would like now to add also the Category,so to have now a dropdownlist with all the categories,in the popup among the others.
i noticed that for each field kendo knows what type of control to use,so assuming that,i put at columns a ForeignKey just like in inline editing example:
@(Html.Kendo().Grid(Model)    
    .Name("Grid")
    .Columns(columns => {  
 columns.Bound(p=>p.ProductName);
 columns.ForeignKey(p => p.CategoryID, (System.Collections.IEnumerable)ViewData["categories"], "CategoryID", "CategoryName");
 ....
});
but as a result,for categoryID i have just a textbox,so,do i need again an EditorTemplate or what?and how do i use it in this context?

Regards
Pavlina
Telerik team
 answered on 15 Dec 2016
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
Security
ColorPicker
DateRangePicker
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
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?