Telerik Forums
UI for ASP.NET MVC Forum
3 answers
179 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
932 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
309 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
498 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
261 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
3 answers
164 views
Are there limitations to the ASP.NET MVC Wrappers in contrast with just using pure jQuery/Javascript?  Reason I ask is because the sample page shows pop up binding and it has examples for HTML, but none for ASP.NET MVC wrapper.
Dimo
Telerik team
 answered on 01 Mar 2013
4 answers
348 views
Hello again,
i noticed that for a bit(boolean) type i have the text true/false in the grid column.Is it possible to have the same checkbox like in edit mode?and if true then to be checked,if false  not,also to change the text from true/false for example to  yes/no ?

Regards,
Daniel
Daniel
Top achievements
Rank 1
 answered on 01 Mar 2013
1 answer
188 views
Hi,
The js culture file is named: kendo.culture.se-SE.min.js and also the tags inside it.
But is that really correct, shouldn't it be named: kendo.culture.sv-SE.min.js?

Regards,
Mattias
Mattias
Top achievements
Rank 1
 answered on 01 Mar 2013
1 answer
163 views
http://demos.kendoui.com/web/grid/editing-inline.html

Guess what guys your demo shows exactly what I want to do..... I want to have an editable check box that shows yes or no just like the above demo. Guess what the parts that make the demo that I need to see are not a public part of the demo. Another great job guys.Not that it matters but our trial ends tomorrow and I just don't think we will buy it. 

If I wanted to:

A. Search for 5 hours looking for other people who have already suffered through finding the answer
B. Rebuild my own stuff so that it works the way I want

I surely wouldn't buy Kendo UI
Dimo
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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Security
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?