Telerik Forums
UI for ASP.NET MVC Forum
3 answers
660 views
This question arose while configuring grids, but it's a more general question, which is why I'm posting it here. Here's the situation.

I was trying to set up a grid hierarchy using server binding and couldn't get the subgrid data to show up. Then I switched to using curly braces, @{ ... }, to surround the grid instead of parentheses, @( ... ), and it worked beautifully. So, here's the question: What is the difference between the syntax for the two grids below? (They both result in the same output.)

Grid with Parentheses:
@(Html.Kendo().Grid(Model)   
    .Name("JobCodesGrid")
    .Columns(columns =>
    {
        columns.Bound(m => m.RegionID).Title("Region");
        columns.Bound(m => m.JobCodeText).Title("Job Code");
    })
)

Grid with Curly Braces:
@{Html.Kendo().Grid(Model)   
    .Name("JobCodesGridBraced")
    .Columns(columns =>
    {
        columns.Bound(m => m.RegionID).Title("Region");
        columns.Bound(m => m.JobCodeText).Title("Job Code");
    })
    .Render();
}

Why is it better, if that's true, to use curly braces for a hierarchy scenario (with subgrid in DetailTemplate) than parentheses?

Thanks for any help!

Ken

Dimiter Madjarov
Telerik team
 answered on 11 Mar 2013
1 answer
1.3K+ views
I am using Html.Kendo().DatePicker()
I have a requirement to disable the previous dates (i.e dates > today)

Is it posisble, if so how? Also what if the model contains a value > today

Is it possible to achieve both with Kendo datePicker
Dimiter Madjarov
Telerik team
 answered on 11 Mar 2013
1 answer
505 views
Hi

When using the MVC wrappers to bind a treeview to a model I have certain nodes that I don't want to have enabled.  When I set the appropriate property the node is given the correct "k-state-disabled" style. However the associated checkbox with the node remains enabled and is still selectable by the user.

Is this expected behaviour and if so is there a method that I could use to disable the checkbox.

Thanks
Alex Gyoshev
Telerik team
 answered on 11 Mar 2013
1 answer
171 views
Hi,

I want to create an asp.net MVC page where I want to display image and give next and previous buttons to display the next and previous images similar to viewing a photo album. I get these images as byte array from WCF call, can any one please point met to a right telerik control for this and really appretiate if you can please give a code sample.

Thanks in Advance
SA
Sebastian
Telerik team
 answered on 11 Mar 2013
11 answers
238 views
Hi,

I've got an issue about the display of a grid in a splitter.

If I add a grid in my display, everything is broken ... Any idea ? :(
Daniel
Top achievements
Rank 1
 answered on 11 Mar 2013
14 answers
777 views

I'm trying to have a group of 2 radio buttons (each button in different column but the same row) in my Kendo grid popup template but without success. I defined the type of the parameter as a string. But after clicking the radio button, it will set it to null type.

 It works fine with checkboxes, though

<div class="editor-field">
            @Html.RadioButtonFor(model => model.Status, "Avail")Available
            @Html.RadioButtonFor(model => model.Status, "Not Avail") Not Available
</div>

when I debuged, model.Status = null,  every time.


Fred
Top achievements
Rank 1
 answered on 08 Mar 2013
1 answer
161 views
We are using Kendo 2012.3..1315.340. Here is the issue. We are using the EditorTemplate for DateTime?, which calls DatePickerFor. This works wonderfully in a standard cshtml view and the POST contains the name/value TransactionDate = "03/19/2013". However, if I use the same view model in a grid and use either inline editing or popup editing I get a POST with TransactionDate = "Tue Mar 19 2013 00:00:00 GMT-0700 (Pacific Daylight Time)". This value does not automatically populate the view model on submission and the date property on the model defaults to DateTime.MinValue. Since this is an identical view model with and identical editor template, does anyone have any ideas on why the POST values are different (and seemingly improperly formatted from the grid)?
montgomery
Top achievements
Rank 1
 answered on 08 Mar 2013
4 answers
906 views
Is there a way to iterate over a grids datasource in it's sorted state. the view() only returns a pageful of data, but I need to assemble the fully sorted set of IDs in the grid's sequence. data() provides access to all the elements, but they are not necessarily in the same sequence.

Any recommendations?

Thanks.
Patrick
Top achievements
Rank 1
 answered on 08 Mar 2013
1 answer
946 views

I'm working through some Kendo UI tutorials and have a problem with the look of my text boxes on the grid. The demo I'm following is http://demos.kendoui.com/web/grid/editing-inline.html.

I've figured out how to format the date in the grid and use a datepicker for the date in the editor. To do this I've used an Editor template.

I've added an editor template for the name column just so I could apply a css class and it looks better but it doesn't function correctly. When the editor opens up the value in the text box is empty (see image). Surely there must be an easier way to apply a css class.

Do I have to create an editor template for all text boxes in the grid? If so, how can I have it bring the value when editing?

Here's the code for the grid:

@(Html.Kendo().Grid<Product>()    
.Name("Grid")    
.Columns(columns => {        
    columns.Bound(p => p.Name);
    columns.Bound(p => p.UnitPrice).Width(140);
    columns.Bound(p => p.Units).Width(140);
    columns.Bound(p => p.Discontinued).Width(100);
            columns.Bound(p => p.Date).Width(100).Format("{0:d/M/yyyy}");
    columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200);
})
.ToolBar(toolbar => toolbar.Create())
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Sortable()
.Scrollable()
.DataSource(dataSource => dataSource        
    .Ajax()                 
    .Events(events => events.Error("error_handler"))
    .Model(model => model.Id(p => p.Id))
    .Create(update => update.Action("EditingInline_Create", "Home"))
    .Read(read => read.Action("EditingInline_Read", "Home"))
    .Update(update => update.Action("EditingInline_Update", "Grid"))
    .Destroy(update => update.Action("EditingInline_Destroy", "Grid"))
)

Here's the code for the name editor template:

@using Kendo.Mvc.UI
@model KendoUiOne.Models.Product

@Html.TextBoxFor(x=>x.Name, new {@class = "k-input k-textbox"})

I also posted on stackoverflow.

http://stackoverflow.com/questions/15257247/how-to-specify-style-in-kendo-ui-asp-net-mvc-grid-editor
Petur Subev
Telerik team
 answered on 08 Mar 2013
1 answer
163 views
Hi,

I saw quite a few examples how you could get the KendoUI controls to work with WEBApi controllers. But all of those examples used "native " JS, not the Server Wrappers and HTML Helpers.

Can you get both to working together, i.e setting up e.g. AJAX for grid with using the wrappers?

Thanks!
Sebastian
Telerik team
 answered on 08 Mar 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
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
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?