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

I am using Kendo Grid and also using its Foreign Key column editing option.

When I build my project on local host, it seems everything is perfect.

However, when I publish it, it does not working as on my local host.

On my local, it is a dropdownlist but when I publish it, it seems like its a numeric textbox.

How can I fix this ?

Konstantin Dikov
Telerik team
 answered on 09 Jun 2016
7 answers
3.2K+ views
I'm having trouble figuring out how to use a Kendo Comobox in an editor template for a Grid cell (both ajax).  Is there an example of this anywhere? I have a typical scenario where the Combobox has an id for the value and but text for the display.  The text needs to appear in the grid cell and combobox, but the id needs to be posted when the grid is submitted.  Below is a code snippet for what I have at the moment.

The column binding for the grid of employees:

columns.Bound(c => c.Employee).EditorTemplateName("EmployeeId");

The editor template:

@(Html.Kendo().ComboBox()
          .Name("EmployeeId")
          .DataTextField("value")
          .DataValueField("key")
          .Filter("startswith")
          .DataSource(source => {
              source.Read(read =>
              {
                read.Action("GetEmployees", "Employee");
              })
              .ServerFiltering(false);
          })
    )

This loads the combobox values and the startswith filtering is working fine, but when I make a selection, the grid doesn't take the selected value.  It works if I switch to a column bound to the EmployeeId, but then the column displays the id rather than the text.

What is the right way to handle this?  I would think this is a really common scenario, so assume there is a straight forward way to deal with it.

Thanks, DanO
lucerias
Top achievements
Rank 1
 answered on 09 Jun 2016
1 answer
420 views
I am working on Kendo UI Grid.  I have requirement where role will added dynamically.  So in a single column there should be multiple checkbox. Is there is any way to fix it.
Marin
Telerik team
 answered on 08 Jun 2016
3 answers
568 views

Hi!

After a while, I was able to have a working EditorTemplate for a List<MyObject> type. I'm calling the Template using UIHint over the collection property n the parent ViewModel. The grid on the EditorTemplate is however complete Widget-based now. It is working with the data array woth matching properties as of the actual ViewModel. How do I map the final rows of a kendo grid to the Model?

Shafi
Top achievements
Rank 1
 answered on 08 Jun 2016
3 answers
576 views
It appears that something with the tooltip is preventing the bootstrap row from sizing the 12 columns correctly and less then 12 seem to fit in a row by default.

You can see an email here: http://dojo.telerik.com/uCamu (you will need to expand the results side so the columns aren't stacked)

Thanks,
~L
Dimo
Telerik team
 answered on 07 Jun 2016
2 answers
653 views

This isn't really specific to MobileView but I'm using a MobileView in a partial view that I'm using as a layout template and I want to make the Title dynamic by using ViewBag.Title as the string.

@(Html.Kendo().MobileView()
                .Title(ViewBag.Title)
                .Name("two-drawer-home")
                .Header(obj => Html.Kendo().MobileNavBar().Content(navbar =>
                    @<text>
                        @(Html.Kendo().MobileButton().Name("btnLeftDrawer").Align(MobileButtonAlign.Left).Rel(MobileButtonRel.Drawer).Url("#left-drawer").ClickOn("down"))
                        @navbar.ViewTitle("Hello there")
                        @(Html.Kendo().MobileButton().Name("btnRightDrawer").Align(MobileButtonAlign.Right).Rel(MobileButtonRel.Drawer).Url("#right-drawer").ClickOn("down"))
                    </text>)
                .HtmlAttributes(new { style = "height: 46px;" })
                )
                .Content(@<text>@RenderBody()</text>)
)

 

But this isn't valid. I've also tried @ViewBag.Title and various other incarnations. I'm wondering if this type of thing is possible in the Title of the MVC controls. 

Mike
Top achievements
Rank 1
 answered on 07 Jun 2016
0 answers
210 views
From the official 2016 Q2 Release (2016.2.504) the Scheduler will start using comma (previously semicolon) as delimiter for the recurrence exceptions. Also the Scheduler will no longer add trailing delimiter to the recurrence exception.

This change was required as the previous behavior does not conform to the RFC5545 spec:

From the official 2016 Q2 Release (2016.2.504) the Scheduler will start using comma (previously semicolon) as delimiter for the recurrence exceptions. Also the Scheduler will no longer add trailing delimiter to the recurrence exception. This change driven by the RFC5545 spec (previous behavior was incorrect):


http://tools.ietf.org/html/rfc5545#page-120
The following changes are required to all events that have "recurrenceException" set:
  1. Remove the trailing semicolon delimiter
  2. Replace all occurrences of semicolon with comma
//Old recurrence exception:
recurrenceException:"20160603T050000Z;20160503T050000Z;"
  
//New recurrence exception:
recurrenceException:"20160603T050000Z,20160503T050000Z"

Apologies for the caused inconvenience.
Kendo UI
Top achievements
Rank 1
 asked on 07 Jun 2016
1 answer
1.9K+ views

I'm using a kendo grid popup editor. I have a custom template (partial view) for edit. I have a drop down and on change event, I'm populating a TextBox. The problem is when I am sending the model to the controller, the TextBox value is null. It's not updating the model with the populated value. Any idea why?

@(Html.Kendo().DropDownListFor(w => w.AddressID)

.DataTextField("Name")

.DataValueField("AddressID")

.DataSource(source =>{ source.Read(read =>{ read.Action("GetAddressType", "DataSource")

.Data("filterAddressTypes");})

.ServerFiltering(true);})

.CascadeFrom("CodeIDAddressType")

.Events(e => e.Change("addressSubType"))

)

 

@Html.TextBoxFor(model => model.AddressLine1)

On an AJAX done function, I'm populating the value.
$("#AddressLine1").val(response.AddressLine1)

I can see the new value in the text box but when submitted, it sends null to the controller. If I enter the value in the AddressLine1 field instead of populating, it sends the entered value to the controller.

Eyup
Telerik team
 answered on 07 Jun 2016
2 answers
240 views

I have a form that is used to search for people's names and display them in an Telerik MVC Grid. Grid uses Ajax binding and paging. I have a problem with paging. My situation is that when a user searches for names and the search returns say 3 pages of results. The user flips a page and performs a search again narrowing it down to say 1 page of the results, the grid refreshes but stays on the flipped page which shows up empty because again there is only 1 page of results. Is there a way to reset the paging after each search? I handle the searching explicitly on client side by calling $("#gridElement").data("kendoGrid").dataSource.read();

Any help is appreciated.

Nik

Nikita
Top achievements
Rank 2
Iron
Iron
 answered on 06 Jun 2016
3 answers
1.3K+ views
I try to validate my model that has a date with fluentvalidation:
RuleFor(x => x.Aanvang)
    .InclusiveBetween(
new DateTime(2008,01,01), new DateTime(2100, 01, 01)).WithMessage("Wrong");


web.config has:
<globalization uiCulture="nl-NL" culture="nl-NL" enableClientBasedCulture="true" />

The kendo culture stuff is in place:
<script src="@Url.Content("~/Scripts/kendo/2016.2.504/kendo.aspnetmvc.min.js")"></script><br><script src="@Url.Content("~/Scripts/cultures/kendo.culture.nl-NL.min.js")"></script>

 Now when i enter 05-05-2015 in the datepicker, it throws the "Wrong" error. While it is accepted when i comment the fluentvalidator out. I figured that the gegenerated html is:

<input data-val="true" data-val-date="The field Aanvang must be a date." data-val-range="Onwaarschijnlijk" data-val-range-max="01/01/2100 00:00:00" data-val-range-min="01/01/2008 00:00:00" data-val-required="'Aanvang' mag niet leeg zijn." id="Aanvang" name="Aanvang" type="text" value="1-1-0001" data-role="datepicker" class="k-input k-invalid" role="combobox" aria-expanded="false" aria-owns="Aanvang_dateview" aria-disabled="false" aria-readonly="false" data-bind="value:Aanvang" style="width: 100%;" aria-activedescendant="01ceca7f-c8ee-45ed-87b9-e1357df3799c_cell_selected" aria-invalid="true">

 

That shows 01/01/2008 instead of 01-01-2008 format, nut sure if this is the problem, but it is differant and the only thing related thing i could find. Any advice?

 

as

 

Ianko
Telerik team
 answered on 06 Jun 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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?