Telerik Forums
UI for ASP.NET MVC Forum
2 answers
148 views

I have an Ajax.BeginForm that contains a button that allows you to open an existing Window (outside of the beginForm).

When I call the window and refresh with a new url, no matter what url is used or what is displayed in it, after the window is refreshed it makes a post back to the server for the BeginForm.

navbarWindowURL = "google.com";
navbarWindowData.refresh({
    url: navbarWindowURL
}).center();

 

Is theresomething about calling this code that would cause the BeginForm to PostBack?

I know you usually like example code to demonstrate the issue, but it would be really difficult to provide an example at this time.

 

Ivan Danchev
Telerik team
 answered on 03 Mar 2017
3 answers
1.2K+ views

Hello,

I have created a kendo grid using the asp.net mvc wrappers and I want to add a selection capability. I am interested in selecting all the rows when a filter is made or not, without going through each page. More or less, I want to know if it is possible to make the selection on the server-side not on the client. I have looked through this example:http://dojo.telerik.com/@Stephen/EMeZE and it is not applicable in my case because I need to open each page and select all the rows. Is an other alternative?

Thank you very much!

Tsvetina
Telerik team
 answered on 02 Mar 2017
1 answer
133 views

I have a splitter with two windows, left holds a treeview, the right a partial view that depends on the selected node in the treeview to select the content (via an onSelect event).

The problem is that this code sometimes works perfectly and sometimes does not - specifically it renders the "parent" page (including the splitter, treeview etc) inside the right hand pane.

I'm a newbie with MVC, javascript etc so have no idea where the problem is - nor can I reproduce it at will.

The javascript snippit is:

function onSelect(e) {
        try {
            var treeView = e.sender;
            var text = treeView.text(e.node);
            var data = treeView.dataItem(e.node);
            var id = data.id;
            console.log(id, text);
            var parent = null;
            try {
               parent = treeView.text(e.node.parentNode);
            } catch (e) {
                console.log(e.message);
            }
            
            $("#splitter").kendoSplitter();
            var splitter = $("#splitter").data("kendoSplitter");

            switch (text) {
                case "Case":
                    splitter.ajaxRequest("#right-pane", "PartialCase", { id: id });
                    break;

 

And using the F12 debug I can follow it to the "splitter.ajaxRequest" line at which point it populates the right window with the parent page.

 

I hope this is something stupid.

 

Thanks

Veselin Tsvetanov
Telerik team
 answered on 02 Mar 2017
2 answers
535 views
Hello Telerik support team,

I have the latest Kendo UI MVC installed on my computer. I am using Visual Studio 2013 to develop ASP.NET MVC applications. 

I am currently looking for a way to make a menu on my application. I came across an article where I am able to bind the Menu control with a site map. I have that done in my application. Want I want to do now is make it work similar to how Bootstrap already does things. I know there is a post here on the forums where it says that you guys didn't have close integration with Bootstrap for the controls. That post was from last year and might or might not be relevant. 

I'm not sure if you guys are using the Kendo UI Menu in your website here: http://www.telerik.com/kendo-ui
But if you are I would like to know how you guys are making that 3 bar icon to show up when you resize the window. That is something that I am looking for.

Thank you,
David
Carlos
Top achievements
Rank 1
 answered on 01 Mar 2017
1 answer
88 views

Kendo version: 2015.1.429

We got an IndexOutOfRangeException error as attached.  Please advise.

Thanks

 

 

Ivan Danchev
Telerik team
 answered on 01 Mar 2017
1 answer
314 views

I'm quite confused as to when I need to prefix my row data with "data." versus when I don't.

For instance, the example on the FAQ never mentions that you need to prefix "Enable with "data." (i.e. "data.Enabled") to access the Enabled field. But in my code if I don't do "data.Enabled" I get an undefined error.

But, if I do something like

#= fieldName != null  ?  kendo.toString(fieldName)  :  '' #

I don't have to do data.fieldName. Also, many example I find in the forums sometimes include data. and other times they dont. Is there some place I can look at that tells me when I need to use "data." and when I don't?

 

 

 

Boyan Dimitrov
Telerik team
 answered on 28 Feb 2017
1 answer
521 views

I have a hierarchical grid, using MVC, and in the detail (child) table, I want the user to be able to create a new row and the row will contain an Autocomplete field. I have everything wired up, the grid displays correctly, with data. When the user clicks Add New Record, a new row is displayed with the Autocomplete field. However, for some reason, no data is being retrieved from the server (the controller method isn't getting called at all) when the user starts typing. Here is the code for the autocomplete editor and the detail table:

@(Html.Kendo().AutoComplete()

          .Name("Combined")
          .ValuePrimitive(true)
          .DataTextField("Combined")
          .Filter("contains")
          .MinLength(3)
          .HtmlAttributes(new { style = "width:200px" })
          .DataSource(source =>
          {
              source.Read(read =>
              {
                  read.Action("GetAntiqueCategories", "Customer");
              })
              .ServerFiltering(false);
          })
)

<script id="template" type="text/kendo-tmpl">
    @(Html.Kendo().Grid<Entities.AntiqueCategory>()
            .Name("grid_#=RowId#")
            .Columns(columns =>
            {
                columns.Bound(o => o.Combined).EditorTemplateName("Combined");
                columns.Command(command => { command.Destroy(); }).Width(200);
            })
            .ToolBar(toolbar =>
            {
                toolbar.Create();
                toolbar.Save();
            })
            .DataSource(dataSource => dataSource
                .Ajax()
                .PageSize(10)
                .Model(model => model.Id(p => p.RowId))
                .Read(read => read.Action("ReadCustomerWantDetail", "Customer", new { customerId = "#=RowId#" }))
                .Create(update => update.Action("CreateCustomerWantDetail", "Customer", new { customerId = "#=RowId#" }))
                .Update(update => update.Action("CreateCustomerWantDetail", "Customer", new { customerId = "#=RowId#" }))
                .Destroy(update => update.Action("DeleteCustomerWantDetail", "Customer"))
            )
            .Editable(editable => editable.Mode(GridEditMode.InCell))
            .Pageable()
            .Sortable()
            .ToClientTemplate()
    )
</script>

Tsvetina
Telerik team
 answered on 28 Feb 2017
1 answer
604 views

Hello,

I need to validate user input for ipv4 adress. I am using maskedtextbox. How can i set mask property of maskedtextbox?

I write this code but it doesn't work. ?

<body>
 
<input id="maskedtextbox" />
<script>
$("#maskedtextbox").kendoMaskedTextBox({
    mask: "~",
    rules: {
        "~":((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)
    }
});
</script>
</body>

Viktor Tachev
Telerik team
 answered on 28 Feb 2017
9 answers
346 views
Hello,

we have Hierarchical DataSource with multilevel and with dynamic images. So ned to load only the parent nodes first and clicking on each node should call back controller method and load children on Onselect event. I am facing the following problem.
1-First i tried to implement a read method like remote datasource binding and loaded the parents nodes , but then it will not display anything.
@(Html.Kendo().TreeView()
    .Name("treeview")
    .HtmlAttributes(new {@class="demo-section" })
    .DataTextField("Text")
    .DataSource(dataSource => dataSource
        .Read(read => read
            .Action("ReadObjects", "TreeView")
        )
    )
 public JsonResult ReadObjects()
        {

            List<TreeViewItemViewModel> result = new List<TreeViewItemViewModel>();
           

           
            return Json(result, JsonRequestBehavior.AllowGet);
        }

2. So i tried the other option to bind and it displays the root level. But how do i load children on select event?
@(
        Html.Kendo().TreeView()
            .Name("treeview")
            //.DataSpriteCssClassField("spriteCssClass")
             .HtmlAttributes(new {@class="demo-section" })
             .Events(events => events
        .Select("onSelect")    
    )
            .BindTo((IEnumerable<TreeViewItemModel>)ViewBag.inlineDefault)
    )

Is there a sample in mvc to refer. Also when i set imageURL it is not showing images.

Thanks

Anamika
Mark
Top achievements
Rank 1
 answered on 27 Feb 2017
2 answers
87 views

I have a grid that I am editing InCell.  When I use the tab to navigate to the next cell it retains entered data and refocuses on the next cell as expected.   But, If I enter data in a cell and then click into another cell the data I entered is not retained and I don't get the warning message that the data was required.  I also have an issue where if I click off the cell with an active required warning it hangs up sometimes and won't refocus on the cell if I click on it.  I can get around this sometimes by tabbing twice which refocus on the cell with the warning.  Also, if I return to a cell to edit the contents the curser is positioned before the first character and I have to use the arrow keys to reposition within the text to make corrections.  I can't just click into the text to the position where I want to edit. Is this how it is supposed to work?  I have used IE, Firefox, and Chrome and it works the same way regardless of the browser. Any help would be greatly appreciated. 

Operating System - Windows 7 64bit 
.Net framework - Version 4.5.1
Visual Studio version - Visual Studio 2015
Preferred Language - C Sharp
MVC Version - MVC 5
View Engine - Razor
Version - 2016.3.1118
Product - Kendo UI Grid for ASP.NET MVC

JQuery - 2.2.0 as advised under ticket ID 1069790

Katharine
Top achievements
Rank 1
 answered on 27 Feb 2017
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
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
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
Bronze
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?