Telerik Forums
UI for ASP.NET MVC Forum
1 answer
139 views
Hi
I see this your example for custom editing, now, I want to use this feature  with Treeview.
I means that when a cell is in editing mode, show Treeview instead dropdown, and when user click on one of item, see this on that cell.
Is there possible? 
can I see a example ?

Thanks for replay.
Petur Subev
Telerik team
 answered on 05 Mar 2013
4 answers
190 views
This is what I am returning as ActionResult from the Controller:

// oCats is List of Category objects so derives from IEnumerable

           var vResult = oCats.ToDataSourceResult(request);
           var x = Json(vResult, JsonRequestBehavior.AllowGet);
           return (x);

When I mouse over the breakpoint on the last line, I have all forty Categories properly . . . but when the View tries to load I get this:

"Unhandled exception at line 190, column 1 in Function code
0x800a138f - Microsoft JScript runtime error: Unable to get value of the property '__count': object is null or undefined"

in the Function js file and it crashes.  Ideas for solution?

Thanks
Nikolay Rusev
Telerik team
 answered on 05 Mar 2013
2 answers
239 views
I have a slider in our site, I am sure it had marker lines when I first put it in, but now it doesn't, I thought there must be some css overriding it, but removing all the css and still no marker lines,
what could be causing this? is there some css I should look at?
Any ideas I have spent a lot of time on this.
Thanks
Alan Mosley
Top achievements
Rank 1
 answered on 05 Mar 2013
1 answer
88 views
Hi,
Just wonder if there may be any issues when we use a non-html5 MVC control (i.e. namely Spread.net) with the Kendo UI?

Regards,
Andy
Sebastian
Telerik team
 answered on 05 Mar 2013
3 answers
190 views
Hi,

Both Template and CheckboxTemplate do not seem to affect my nodes that have been created through BindTo.  Special characters in the templates are also resulting in their escaped source code representations such as "\u0027".  Can you guys please provide some advice and perhaps an example of a databound TreeView created through the Fluent API that uses checkboxes?  Thanks. 
Alex Gyoshev
Telerik team
 answered on 05 Mar 2013
8 answers
961 views
Hello,
when editing inline in grid,or any other mode batch if i enter something that looks like a html code,it gives me a error regardin dangerous input request.So my question is how can i encode this inputs,to be able to save values  something like <T>,<kk> and avoid dangerous inputs ?

Regards,
Daniel
Daniel
Top achievements
Rank 1
 answered on 05 Mar 2013
13 answers
1.3K+ views
I'm new to Kendo UI and MVC and am working on an ASP.Net MVC3 project using Razor.  I've based my grid on a demo at http://docs.kendoui.com/documentation/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/ajax-binding.   I could easily do this as a traditional ASP.Net project in which I'm expert but want to master this new pattern.

My problem is that the grid won't render.  The JSON content coming back appears valid to me.  I've got a similar grid in DataTables where I've got the grid to at least render the first level but this one is proving to be stubborn. I'd prefer to use KendoUI if possible.

I've determined the the Ajax call is working and that JSON content is being returned to the browser.  I'm not sure what might be wrong.  I'm binding to a List collection of Batch objects.  A Batch object has properties to be displayed in the first level of the grid.  The Batch object also has a property that returns a List collection of Transaction objects which will be displayed on demand in the nested grid which I haven't gotten to yet.

Can anyone point me to where I've gone wrong?  I've no clue what to do next and can't find any articles that look like a solution.

Here's the code I have so far:

// the controller      
 
 // called by Index2: returns a list of BatchHeader objects directly from the ROAMHostSvc
        public ActionResult FetchBatchList2()
        {
            DateTime aDate = new DateTime(0001, 1, 1);
            ROAMHostSvc.Notification messages1 = null;
            ROAMHostSvc.ROAMHostSvcClient hostSvc = null;
             
            KUI_CS_Test1.ROAMHostSvc.BatchHeader[] batchArr;
            //List<KUI_CS_Test1.ROAMHostSvc.BatchHeader> batchCollection = new List<BatchHeader>();
             
            try
            {
                hostSvc = new ROAMHostSvc.ROAMHostSvcClient();
                batchArr = hostSvc.GetBatchCollection(ref messages1, false, aDate, aDate, false, aDate, aDate);
 
                // assign the objects in the array to the List collection
                //for (int i = 0; i <= batchArr.Length - 1; i++)
                //{
                //    batchCollection.Add(batchArr[i]);
                //}
 
                //return View(batchCollection);
                //return PartialView(batchCollection);
                //return PartialView(Json(batchCollection, JsonRequestBehavior.AllowGet));
                return Json(batchArr, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                return null;
            }
            finally
            {
                Close_WCF_Service(ref hostSvc);
            }
        }
 
 
 
        private void Close_WCF_Service(ref ROAMHostSvc.ROAMHostSvcClient hostSvc)
        {
            try
            {
                if ((hostSvc != null))
                {
                    if (hostSvc.State == System.ServiceModel.CommunicationState.Opened)
                    {
                        hostSvc.Close();
                        hostSvc = null;
                    }
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
 
    }
 
 
//the view
 
@model KUI_CS_Test1.ROAMHostSvc.BatchHeader[]
 
@{
    ViewBag.Title = "Index1";
}
 
<h2>Index1</h2>
@(Html.Kendo().Grid(Model)
    .Name("batchGrid")
    .Columns(columns =>
        {
            columns.Bound(b => b.BatchID);
            columns.Bound(b => b.Transmitted_DateTime);
            columns.Bound(b => b.Completed_DateTime);
            columns.Bound(b => b.Created_DTTM);
            columns.Bound(b => b.Created_EmpID);
        }
    )
    .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("FetchBatchList2", "Home"))
    )
)

Daniel
Telerik team
 answered on 04 Mar 2013
3 answers
337 views
I created a couple of ComboBoxes and notice a strange thing if I do the following:

1. Select an item.
2. Navigate away from the page.
3. Use the browser's Back button to return to the page.

Upon returning, the ComboBox is blank (or the placeholder appears if I configured that). However, when I open the ComboBox, the item I had originally selected is highlighted. Thus, it appears that the value was retained though the text was not.

Is there any way to make sure the text retains its value on returning to the page?

(Note: I tried the same thing with a normal HTML select drop-down list, and the selected item remains selected upon return as expected.)

Thanks,

Ken
David A.
Top achievements
Rank 1
 answered on 01 Mar 2013
7 answers
516 views
How do I configure a parameterMap in the MVC version of this Kendo UI control?
Georgi Krustev
Telerik team
 answered on 01 Mar 2013
1 answer
279 views
Hello all.
I'm wondering if someone can help me.
I have a MVC Kendo grid, that has AJAX binding. Within the grid, I have some TEXT coulmns. So on edit, it is a plain editbox.
But for some rows, I want the template to be a dropdown or a combobox.
I need this, because I want the user to select a restriced choise list.

I have varios reasonsfor this. But overall what I need is have a dropdown/combox on edit template on a TEXT based column of a data grid.

My current code looks like this:

--cshtml---
@(Html.Kendo()
                  .Grid<Shell.UI.UGOBooks.Models.GetAcreageData_Result>()
                  .Name("AcreageGrid")
                  .HtmlAttributes(new { style="height: 650px" })
                  .Columns(columns =>
                  {
                      columns.Bound(a => a.DataFieldText);
                      columns.Bound(a => a.UOMText)
                             .HeaderHtmlAttributes(new { style="text-align:center" })
                             .HtmlAttributes(new { style="text-align:center" })
                             .Width(100);
                      columns.Bound(a => a.DataFieldValue)
                             .HeaderHtmlAttributes(new { style="text-align:right" })
                             .HtmlAttributes(new { title="#= TooltipText#", style="text-align:right" })
                             .Width(100);
                      columns.Bound(a => a.DataFieldTextValue)
                             .HtmlAttributes(new { title="#= TooltipText#" })
                             .Width(200);
                      columns.Bound(a => a.Comments);
                  })
                  .ToolBar(toolbar =>
                  {
                      toolbar.Save();
                  })
                  .Events(e =>
                  {
                      e.Edit("onAcreageEdit");
                      e.DataBound("onGridDataBound");
                      e.SaveChanges("acreageSaveChanges");
                  })
 
                  .Editable(editable => editable.Mode(GridEditMode.InCell))
                  .DataSource(dataSource => dataSource
                                                      .Ajax()
                                                      .Batch(true)
                                                      .PageSize(20)
                                                      .ServerOperation(false)
                                                      .Model(model =>
                                                      {
                                                          model.Id(a => a.AcreageDataId);
                                                      })
                                                      .Read(read => read.Action("AcreageRead", "Databooks").Data("gridReadParams"))
                                                      .Update(update => update.Action("AcreageUpdate", "Databooks")))
                  .Pageable()
            )
Vladimir Iliev
Telerik team
 answered on 01 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?