Telerik Forums
Kendo UI for jQuery Forum
4 answers
814 views

I have an MVC5 application in which I have an editable grid. On the grid is a byte field named "Level" which only saves a value of either 1 or 2. When the grid is in display-mode, I would like it to say "Level 1" or "Level 2". When the grid is being edited, I would like to display radio buttons for the user. I believe MVVM is necessary in order to bind the field to the viewmodel. Could you help me wire this up so it will retrieve & update properly?

ViewModel

public class MasterLotViewModel
{
    public int MasterLotId { get; set; }
 
    [Display(Name = @"Master Lot")]
    [Range(1, 2)]
    [DataType("MasterLotLevel")]
    public byte Level { get; set; }
 
    [Display(Name = @"Start Date")]
    [DataType(DataType.Date)]
    [Required]
    public DateTime StartDate { get; set; }
 
    [Display(Name = @"End Date")]
    [DataType(DataType.Date)]
    public DateTime? EndDate { get; set; }
}

 Editor Template

@model byte
 
@Html.HiddenFor(model => model)
 
<input class="masterLotRadios" id="Level1" name="Level" type="radio" value="1">
<label for="Level1">Level 1</label>
<input class="masterLotRadios" id="Level2" name="Level" type="radio" value="2">
<label for="Level2">Level 2</label>

 Grid

@(Html.Kendo().Grid<MasterLotViewModel>()
    .Name("masterLotGrid")
    .Columns(columns =>
    {
      columns.Bound(x => x.MasterLotId).Visible(false);
      columns.Bound(x => x.Level).ClientTemplate("Level #: Level #");
      columns.Bound(x => x.StartDate);
      columns.Bound(x => x.EndDate);
      columns.Command(command => { command.Edit(); }).Width(100);
    })
    .ToolBar(toolbar => toolbar.Create())
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable()
    .Sortable()
    .AutoBind(true)
    .DataSource(dataSource => dataSource
      .Ajax()
      .ServerOperation(false)
      .PageSize(10)
      .Events(events => events.Error("errorHandler"))
      .Model(model =>
      {
        model.Id(x => x.MasterLotId);
        model.Field(m => m.Level).DefaultValue(1);
      })
      .Read(read => read.Action("GetMasterLots", "Lot").Data("formatMasterLotData"))
      .Create(create => create.Action("CreateMasterLot", "Lot").Data("formatNewMasterLotData"))
      .Update(update => update.Action("UpdateMasterLot", "Lot").Data("formatUpdateMasterLotData"))
    )
)

ImNotTed
Top achievements
Rank 1
Iron
 answered on 08 Sep 2015
3 answers
230 views

Hello, what I'm trying to build is exactly like image in the attachment. My first question is how can I add a caption to scrollview ? Second and most important one is should I use remote view or responsive images in the down below.. And I couldnt make it work, no matter what I do nothing shows up under the image gallery ? I appreciate all the help I can get, thanks.

 

Here is my code in kendo dojo..

http://dojo.telerik.com/@oguzhanodenekli/uFaYa/2

 â€‹

Petyo
Telerik team
 answered on 08 Sep 2015
3 answers
126 views

Hello,

We use the following dojo: http://dojo.telerik.com/edihi

Our goal is to use the k-on-change event, which provides the selected row data in the callback function. This data then later is is reused in the parentscope in some selected rows confirmation scenario.​​

Our user should not be able to select multiple rows by clicking into the rows. Selection in our case should be only possible by selecting the checkbox in the first column. This then "poses" as if the uses clicked the whole row.

This behaviour is already achieved in the dojo(see link above). But we could not manage to disable the mouseclick selection into the rows(columns apart the chkbox column). If we omit <selectable: "row"> in the grid options, an exception results.

 

Can anyone give us an hint to a solution?

Viktor Tachev
Telerik team
 answered on 08 Sep 2015
3 answers
261 views

Hello, I am working on an update to one of my company's internal tools, and a feature that's been requested is a Format Painter feature similar to Microsoft Word.  I was a little apprehensive at first since that seemed like a huge undertaking, but looking at the Kendo Editor control, your overview page claims to support just this sort of tool. (See here: http://www.telerik.com/kendo-ui/editor under Creating and Formatting header)

 I however cannot find how to enable the toolbar button(s) to show up in the Editor.  Can someone point me in the right direction?  Much obliged!

 

 

Dimo
Telerik team
 answered on 08 Sep 2015
5 answers
842 views
Hi fellas,

my problem is relatively simple, I believe. I am trying to embed a pdf file and I have tried via object and iframe, but I can never force a 100% height. Why is that? Is there a workaround to do so? Right now I use 
<object data="file.pdf" type="application/pdf" width="100%" height="100%"></object>
and I only get about 100px height. By changing the style it does not work either. My problem can be viewed here:
http://jsbin.com/OzOhelAK/9#test

Thank you so much,
Chris
Petyo
Telerik team
 answered on 08 Sep 2015
1 answer
100 views

Hi guys, 

I am having an issue where the thumbnail image does not refresh when uploading large images (2MB) the loading icon just remains. It appears to work fine with smaller images. This is happening both in my application and within the demo located here: http://demos.telerik.com/kendo-ui/editor/imagebrowser 

Any help with this would be greatly appreciated. 

Plamen Lazarov
Telerik team
 answered on 08 Sep 2015
16 answers
270 views
We have received a bug report from a user with our app, and we believe we have an idea where the cause might be.

Our App does a local-datasource set when the user edits a record, it then calls an API on our server and if the results from this API is OK, we perform a datasource sync. 

Sometimes (it is not consistent) - the list-view scrolling gets stuck on an iPhone (we were unable to reproduce in Chrome, did not test it on Android) following one or more of these edit operations.

We managed to recreate the issue with a small sample (remember, you need to test it from a device, it does not happen in Chrome).

http://dojo.telerik.com/aReBU/10

We tried to simulate our app by doing the following:

When we edit, we do a set on the record, wait a random amount of time (to simulate the round trip to our server) and perform a sync on the datasource.

Please notice that to make the debugging easy, you actually do not need to change any values in the edit screen, just press the done button in it - and it will add a suffix to a field which will be set to the datasource and later synced.

It is important to remember to try and scroll the listview once the edit-dialog is closed - and repeat the edit/done/scroll until it gets stuck - it does not happen consistently and sometimes takes us 5 or 6 tries to get it stuck.

We suspect that the issue is related to the sync operation, but are not sure.

Ron
Top achievements
Rank 1
Veteran
 answered on 08 Sep 2015
1 answer
56 views

Hello Guys, 

 I get from the Server some data like, information as plain text, form type lik checkboxes, input field and so on. I want to view all this information. So i assumed that I do NOT need a viewModel, just to show the Data. But further I have to read the values of the forms. So How shouls I do this. Only with DataSources, or a mix of observable and datasource ? WIll I need an obseravable to read the entered Text in the input field, the selected Answer in the checkboxes? Do you have some advises

Boyan Dimitrov
Telerik team
 answered on 08 Sep 2015
1 answer
128 views
Does anyone know how to add a caption to Kendo Mobile Scrollview? Is it even possible? Should I use 3rd party plug-in? Even the smallest tip would help. Thanks
Oğuzhan
Top achievements
Rank 1
 answered on 08 Sep 2015
6 answers
271 views

Hello,

I was able to change the label text successfully but no the text position.​

I'm using :

kendoDiagram.connections[0].redraw({content: {text: 'myLabel', x: 20, y: 50}})​;

In fact, the position changes but temporary until:

 - selecting other connection/shape

 - clicking in the background of the diagram

 - calling  kendoDiagram.connections[0].re​fresh();

H​ow can I proceed to change the position of the label please?

Best regards,

Seifeddine

In fact, the position  
Seifeddine
Top achievements
Rank 1
 answered on 08 Sep 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?