Telerik Forums
UI for ASP.NET MVC Forum
1 answer
163 views
How can I set my treelist to expanded state by default ?
Alex Gyoshev
Telerik team
 answered on 19 Mar 2015
3 answers
284 views
Hi,

We need to set different colors for different events based upon a status value (Approve/Reject) dynamically.
We tried the sample on your site. 
.Resources(resource =>
{
resource.Add(m => m.OwnerID)
.Title("Owner")
.DataTextField("Text")
.DataValueField("Value")
.DataColorField("Color")
.BindTo(new[] {
new { Text = "Alex", Value = 1, Color = "#f8a398" } ,
new { Text = "Bob", Value = 2, Color = "#51a0ed" } ,
new { Text = "Charlie", Value = 3, Color = "#56ca85" }
});
})
But our requirement is to load datasource for resource dynamically with StatusId and StatusColor.

Thanks,
Jazeel
Vladimir Iliev
Telerik team
 answered on 19 Mar 2015
4 answers
724 views
Hi

I'm trying to reproduce the custom editing sample with dropdownlist inside the gridcell.
For some reason, the combo is not created...

I'm attaching the project to this message.

Do I miss any script for the project?

Thank you in advance,
Shabtai
Vladimir Iliev
Telerik team
 answered on 19 Mar 2015
3 answers
152 views
I am using AutoComplete where users can search for different type of data in one field like search in gmail or IMDB. In my case I would like to search for employees and departments. If the keyword matches both I have to display all the results. Below is the example format I want to display.

Emp Id   Name
123        test
124        test 1

Dept Id   Dept Name
123         Dept1
124         dept 2

how can I use two header templates?
Georgi Krustev
Telerik team
 answered on 18 Mar 2015
1 answer
86 views
Please help me to find checked items from hierarchy grid...i need few rows from parent tables as well as few from child tables..
Dimiter Madjarov
Telerik team
 answered on 18 Mar 2015
1 answer
219 views
I have an edit view which has a couple properties, plus an array of child objects.  The view uses a tabStrip for those child objects, one tab page per child.  Those child objects have a couple properties, and also an array of grandchild objects that are displayed in a grid.

I'm using a partial view to display the child object properties and the grandchildren grid.

The content of the tabStrip pages is defined by:

.Content(Html.PartialFor(model => model.Children[i], "_TheChildPartialView").ToHtmlString());

That provides the automatic prefixing of the child object's controls with "Children[(index)]", such as name="Children[0].SomeChildProperty", which is perfect.

But this causes a problem on the grid for the grandchildren.  When I click in a cell to edit it, the input that is created is given name="Children[0].SomeGrandchildProperty".  The input textbox is not given the value that was already in the cell, and when I leave the edit cell after changing the value the error is raised "Uncaught TypeError: Cannot read property '0' of undefined" which is shown to be coming from this code (looks like it is in C.extend.set of kendo.all.min.js):

(function(d
/**/) {
return d.Children[0].SomeGrandchildProperty
})

I'm naming the grid on the partial view with .Name("GrandchildrenForChild" + Model.Index), so that eliminates conflicts with the grid itself from having multiple grids on the page.  But I don't know how to do deal with the automatic prefix causing problems in the edit cells of the grid.  Anyone have ideas how to handle that?
Daniel
Telerik team
 answered on 18 Mar 2015
3 answers
347 views
Hello,

in our MVC 4 application we use a Kendo grid with the following configuration:

@(Html.Kendo().Grid(Model)
.Name("GridAddDrive")
.Columns(columns =>
{
columns.Bound(m => m.Type1Name);
})
.Navigatable()
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row)).Events(events => events.Change("selectionChange"))
.Pageable()
.Scrollable()
.Sortable()
.DataSource(dataSource => dataSource
        .Ajax()
        .ServerOperation(false)
    )
)

When you now open the view which contains the grid and click a header of the column to sort it, you will be redirect to the link in the href of the column header.
The href in the header looks like this:

http://localhost:50107/ProjectDrives/AddDriveDialog?_=1369648574797&GridAddDrive-sort=Type1Name-asc

The question now:
Why the href of the column header contains this link? 
Other views which also contains a grid, the problem does not exist. In these views the href only contains a "#" and not a URL. A difference between the views is that these with the "#" in the href uses ajax to load data.

When searching for a solution we have found this article http://www.kendoui.com/forums/ui/grid/grid-sorting-problem.aspx, but the proposed solution seems to make no sense, because we have included all the files and in addition to that the functionality is given on other views.

Do you have another idea for a solution or suggestion to suppress the content of the href?

Kind Regards,
Peter Kaiser
Vladimir Iliev
Telerik team
 answered on 18 Mar 2015
4 answers
150 views
Have several different grids in my web site with add/update functionality, and they worked fine with kendo mvc version 2012.2.1002.  Since then, i have tried upgrading to 2012.3.1114, 2012.3.1121, and 2012.3.1210.  All work in most ways EXCEPT for add/update.  The 'update' function works fine if the objects populating the grid is not complicated.  A list of strings or something.  It seems like if the class is more complicated, in my case it inherits from an abstract class, and i get the following error every time i try to update a row via the
ds.Ajax().ServerOperation.Update:
Cannot create an abstract class. Type = System.MissingMethodException

Additionally, the 'add' functionality has also broken
 If i try this with a simple call, works great.  If i try this with something like:
ds.Ajax().ServerOperation.Create(create => create.Action("_AddDetail""SituationBoard"new { area = "Tools", id = @Model.ProjectGUID, 
SitBoardGUID= @Model.SitBoardGUID}));

My 'SitBoardGUID' value never gets passed to the controller (appears as null).  This line seems to translate to the following html:
<a class="k-button k-button-icontext k-grid-add" 
href="/CoBRAMVCPortal/Tools/SituationBoard/_GetDetailList/00000000-0000-0000-0000-000000000000
?SitBoardGuid=f2135c76-9769-4536-92ea-37c352ebf431
&amp;f2135c76-9769-4536-92ea-37c352ebf431_grid-mode=insert">

notice the SitBoardGUID value is entered twice, separated by a &amp; for some reason. That seems to be
causing the issue. Any guidance on when this will be fixed? It's somewhat worrisome that you've had 3 releases
and this is broken in all 3 of them.
Remember, all of these functions still work if i revert back to the 2012.2.1002 build.
Kelso
Top achievements
Rank 1
 answered on 17 Mar 2015
12 answers
1.2K+ views
Hi,

Need help to find the best way to apply filter in links - or a different method if that's better.

This is what I want.
I have a page that shows a lot of names, and when clicking on a name, another page should appear showing details for that particular name.
My initial thought was, that this is done by filtering, right !!
Using filters, also allow the user to cancel the restrictions or change filter options, if desired.
I still think this is the right way, I just don't know how.

I have played around with action links:
...ClientTemplate(@Html.ActionLink("#=Company.Name#", MVC.Company.ActionNames.Index, MVC.Company.Name, new { id = "#=Company.Id#" }).ToHtmlString());
-which gives the following URL: "http://localhost:65398/Company/Index/12345".
It would then be possible to save this ID in a session variable and then load it when the AJAS request arrive and then apply the extra FilterDescription to the list of filters, but it's still a hack.

I guess I have to find a way to add the filter parameters to the URL so kendo grid recognize it as a filter.
Any help would be appreciated.
Thanks.
Vladimir Iliev
Telerik team
 answered on 17 Mar 2015
13 answers
475 views
Hi,

I'm using the Kendo UI ASP.NET MVC Grid with a Custom Template which includes a DropDownList in a column. The data must be loaded based on different filters, so I populate the DropDownList via a DataSource.

Everything works fine, except if I do not change the value.
These are the steps:
* The grid is loaded, there is no option label, so the first entry is visible.
* If I change the value in the DropDownList, everything works fine and the value is sent to the Server
* If I do not change the value, I get null as value on the server.

It seems like the initial value is not sent back to the server.

What can I do about this? My Kendo Version is 2012.3.1114.

Greets

Attached my custom template in the grid:
@(Html.Kendo().DropDownListFor(m => m)
    .Name("SalesRep")
    .DataSource(
        config => config.Read(read => read.Action("SalesRepRead", "TemplateData", new { area = "" }).Data("filterGrid")))
    .DataValueField("Value")
    .DataTextField("Text")   
)
Kelso
Top achievements
Rank 1
 answered on 17 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?