Telerik Forums
UI for ASP.NET MVC Forum
3 answers
228 views
does the treeview findByText method support wildcards?
For example:
searchText = "Qrtly0422"
item = treeview.findByText(searchText)
dataItem = treeview.dataItem(item)
nodeText = dataItem.text

I can find the exact node, no problem, but if I try searchText = "422" it fails to find a result but doesn't throw any errors

I noticed the datasource filter can take an operator ie:  treeview.dataSource.filter({ field: "text", operator: "contains", value: nodeText })

so I tried to pass that structure to the findByText method but item will equal 0 and then the rest of the code fails with null errors.
item = treeview.findByText({ field: "text", operator: "contains", value: searchText })

Thanks.
Alexander Popov
Telerik team
 answered on 13 Aug 2014
3 answers
305 views
Hi,

How can I change shadow background area to specific DIV while displaying modal kendo window?

Thank you.

Shabtai
Dimo
Telerik team
 answered on 13 Aug 2014
3 answers
169 views
What "using" directive must  required to use Mousedoubleclick
on a RadPivotGrid? 

I keep getting the following error:
Error 17 The type or namespace name 'MouseEventArgs' could not be found (are you missing a using directive or an assembly reference?) \\jt3netapp1-2\users\Keith.Love\Visual Studio 2010\Projects\Telerik_WebApplication1\Telerik_WebApplication1\BigSheet2014Telerik.aspx.cs 748 68 Telerik_WebApplication1

and I have the following directives in my code:
using System;
using System.Globalization;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Telerik.Web.UI;
using Telerik.Web.UI.PivotGrid;
using System.Text;
Angel Petrov
Telerik team
 answered on 13 Aug 2014
5 answers
172 views
Just installed Q2. Tried to upgrade a site. Get this error "Please go back and select at least one project in order to continue the upgrade."

Worked fine before. MVC 5.2
Starting to getting tired on all upgrade errors with new releases.
Momchil
Telerik team
 answered on 12 Aug 2014
3 answers
207 views
I am interested in the functionality of the Gantt control, but I don't want to display the timeline view. I only want the treelist view.

Is there a way to hide the timeline view? I know there are a bunch of view options (day, week, month, etc), but I don't see one for "none", so I don't know if this is possible or not.

If not, is that because there is a different control that offers the same functionality that I should be using?

Thanks!
Jason

Bozhidar
Telerik team
 answered on 12 Aug 2014
7 answers
253 views
I have been looking for awhile on how to export a chart to a JPG on a button click. I have found some documentation on the matter and most of the links are broken or the solution doesn't work. Is there an current examples of a chart being exported to jpg or png?

One of links I have found is http://www.telerik.com/support/code-library/kendo-ui-chart-export and the project doesn't seem to want to pull up for me.
T. Tsonev
Telerik team
 answered on 12 Aug 2014
5 answers
231 views
I haven't seen any documentation on razor syntax for the Gantt control. Is this somewhere? I am trying to do the following:

@(Html.Kendo().Gantt(Model) // Bind the grid to the Model property of the view
        .Name("Gannt")
        .Columns(columns => columns.Bound(o=>o.Title).Title("Title"))
        )

And I'm receiving the following error: CS1501: No overload for method 'Gantt' takes 1 arguments

In looking at the ASPX example here: http://docs.telerik.com/kendo-ui/api/wrappers/aspnet-mvc/Kendo.Mvc.UI.Fluent/GanttColumnBuilderBase

<%= Html.Kendo().Gantt(Model)
.Name("Gantt")
.Columns(columns => columns.Bound(o => o.OrderID).Title("ID"))
%>

It looks like the only parameter is the Model itself. This is probably something silly that I'm missing. Any help is greatly appreciated.






Jason
Top achievements
Rank 1
 answered on 11 Aug 2014
11 answers
314 views
I am currently using a data grid which has a pop up grid editor and Kendo Editor. I am able to modify the fields in the pop up windows the first time its loads but on any other attempts there after I am not able to edit the fields. But if the Kendo Editor is removed everything works fine.
Dimiter Madjarov
Telerik team
 answered on 11 Aug 2014
5 answers
1.2K+ views
Hi
I have this issue with KendoUI window control. I will add some code as well.

My view with window opening logic.

@(Html.Kendo().Window()
    .Name("window")
    .LoadContentFrom("FirstAction", "Controller", new { area = ""})
    .Modal(true)
    .Visible(false)
      )
<script type="text/javascript" language="javascript">
    function openModalForm(e) {
        e.preventDefault();
        var windowElement = $('#window').data("kendoWindow");
        windowElement.refresh();
        windowElement.center();
        windowElement.open();
    }
</script>
                <span>@Html.ActionLink("Link to open window", "Action", Controller", new { area = "" }, new { onclick = "javascript:openModalForm(event);" })</span>

FirstAction in Controller returns this:
public ActionResult FirstAction()
{
   return PartialView("_MainWindowContent", new MyModel());
}

_MainWindowContent contains:
@model MyWeb.Models.MyModel
<div class="popup" id="popupDiv">
    @{
        Html.RenderPartial("_FirstStep", Model);
    }
</div>

_FirstStep contains:
@model MyWeb.Models.MyModel
    <div class="form">
        <h1 class="step-1">Form field title</h1>
        <div class="form-list">
            @using (Ajax.BeginForm("FirstStep", "Controller", null, new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "popupDiv", InsertionMode = InsertionMode.Replace }, new { id = "mainForm" }))
            {
                <ul>
                    <li class="form-field" id="firstField">
                        @Html.LabelFor(m => m.FirstField, "First field")
                        <div class="input-box">
                            @Html.TextBoxFor(m => m.FirstField)
                        </div>
                    </li>
                 
                    <li class="form-field" id="secondField">
                        @Html.LabelFor(m => m.SecondField)
                        <div class="input-box">
                            @Html.TextBoxFor(m => m.SecondField)
                        </div>
                    </li>
                    <li class="form-field" id="thirdField">
                        @Html.LabelFor(m => m.ThirdField)
                        <div class="input-box">
                            @Html.TextBoxFor(m => m.ThirdField)
                        </div>
                    </li>
                    <li class="form-field" id="fourthDate">
                        @Html.LabelFor(m => m.FourthDate)
                        <div class="password-box">
                            @Html.Kendo().DatePickerFor(m => m.FourthDate)
                        </div>
                    </li>
                </ul>
                @Html.HiddenFor(m => m.HiddenValue)
            }
        </div>
        <div class="popup-navigation">
            <button id="nextButton"> Go to next step </button>
        </div>
    </div>
        <script type="text/javascript" language="javascript">
             
            $("#nextButton").click(function () {
                $("#HiddenValue").val("true");
                $("#mainForm").submit();
            });
    </script>
    </div>

FirstStep contains some logic and then return partial view "SecondStep" with some more new fields. I thought it should update the div with the id of "popupDiv". This is at least how it worked in telerik window control, which I also used a bit. But what it does on my machine is that, it just goes straight to {site}/Controller/FirstStep, that is what I see on the browser address. The whole page contains only elements from SecondStep partial view. The controller FirstStep gets all the data correctly. Is there any way to post data or update window or am I missing some attributes or something?
Daniel
Telerik team
 answered on 08 Aug 2014
2 answers
641 views
I need to add a tolltip to the Edit Button. I've tried this approach but it fails display the values for the column.
This approach displays the Following tooltip: Edit #= UserFirstName # #=UserLastName#, #=RoleDescription#
Should display: Edit MIKE JOHNSON, Adminstrator

com.Edit().HtmlAttributes(new { title = string.Format("Edit {0} {1}, {2}", "#= UserFirstName # ", "#=UserLastName#", "#=RoleDescription#") });

I was not able to find any post that shows a solution to this.
What I'm doing wrong.

Current Version: 2014.2.716

The complete code is below.

@(Html.Kendo().Grid<FDolUser>()
.Name("grid")
.Columns(col =>
{
col.Command(com =>
{
com.Edit().HtmlAttributes(new { title = string.Format("Edit {0} {1}, {2}", "#= UserFirstName # ", "#=UserLastName#", "#=RoleDescription#") });
com.Destroy();
});
col.Bound(c => c.RacfId).ClientTemplate("#=UserTypeDescription#").Title("User Type");
col.Bound(c => c.RacfId).ClientTemplate("#=VendId#").Title("Vendor Id");
col.Bound(c => c.RacfId);
col.Bound(c => c.RacfId).ClientTemplate("#=StaffMemberSequence#").Title("Staff Id");
col.Bound(c => c.RoleCode).ClientTemplate("#=RoleDescription#");
col.Bound(c => c.RacfId).ClientTemplate("#=SubScrabAcctId#").Title("ISA Id");
col.Bound(c => c.UserFirstName);
col.Bound(c => c.UserLastName);
})
.Filterable()
.Sortable()
.Pageable()
.ToolBar(t => t.Create())
.Editable(e => e.Mode(GridEditMode.PopUp))
.Events(e => e.Edit("onEdit").DataBound("onDataBound"))
.DataSource(ds => ds
.Ajax()
.Model(model => model.Id(p => p.UsrSq))
.Events(events => events.Error("onError"))
.Read(r => r.Action("GetUser", "Admin"))
.Update(u => u.Action("UserUpdate", "Admin").Data("additionalInfo"))
.Destroy(d => d.Action("userDestroy", "Admin"))
.Create(c => c.Action("UserUpdate", "Admin").Data("additionalInfo"))
.ServerOperation(true)
))
Mike
Top achievements
Rank 1
 answered on 08 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?