Telerik Forums
UI for ASP.NET MVC Forum
1 answer
89 views
When I try and use the mvc html helpers I get javascript errors when I try and use the image browser. When I use the jquery version, everything works just fine.

One of the errors occurs when you open the image browser, then try and close it. Firefox gives a "TypeError: e is null"


version 2012.3.1315

here is the important part of the razor file:
@(Html.Kendo().EditorFor(m => m.Body)     
    .Encode(false)
    .HtmlAttributes(new { style = "width: 740px;height:440px" })
    .Tools(tools => tools.Clear().InsertImage())
      .ImageBrowser(imageBrowser => imageBrowser
      .Image("~/Content/Images/{0}")
      .Read("Read", "ImageBrowser")
      .Create("Create", "ImageBrowser")
      .Destroy("Destroy", "ImageBrowser")
      .Upload("Upload", "ImageBrowser")
      .Thumbnail("Thumbnail", "ImageBrowser"))
  )
Petur Subev
Telerik team
 answered on 22 Feb 2013
2 answers
123 views
@{ Html.Kendo().Window()
        .Name("WindowNveBack")
        .Title("Neuer Kundensatz")
        .Resizable(resizing => resizing
            .Enabled(false)
            //.MinHeight(250)
            //.MinWidth(250)
            //.MaxHeight(500)
            //.MaxWidth(500)
        )
        .Modal(true)
        .Content(@<text>
            <div class="pddng_7 lft">
                <div class="kd_adr_left_sdgerf">
                    <ul>
                        <li class="mrgn_bttm_4 li_kd_adr_left_sdgerf">Kd.Nr. / Index</li>
                        <li class="mrgn_bttm_4 li_kd_adr_left_sdgerf">Name</li>
                        <li class="mrgn_bttm_4 li_kd_adr_left_sdgerf">Land / PLZ / Ort</li>
                        <li class="li_kd_adr_left_sdgerf"></li>
                    </ul>
                </div>
                <div class="lft">
                    <ul>
                        <li class="li_height_sdgerf mrgn_bttm_4">
                            <div class="lft">@Html.Kendo().IntegerTextBox().Name("text1")</div>
                            <div class="lft mrgn_left_4">@Html.Kendo().IntegerTextBox().Name("text2")</div>
                            <div class="lft mrgn_left_4"></div>
                            <div class="clear"></div>
                        </li>
                    </ul>
                     
                </div>
                 
                <div class="clear"></div>
            </div>
        </text>)
        //.Width(593)
        //.Height(300)
        .Visible(false)
        .Draggable(true).Render();
}
Hello, my problem is, that when the Window is open, I select the first Numeric textbox and type digits, it works. When Iselect the second textbox and try to type digits, it doesn't work. What can I do?
Ralph
Top achievements
Rank 1
 answered on 22 Feb 2013
1 answer
139 views
I am working on VS 2010 MVC4, HTML 5 with kendo ui demo version
I tried to bind a grid, corresponding to the data entered in a textbox, but the grid is not getting populated

Also there is no error displayed and if i put a dummy data in datasource it displays
 This is the code i used

$("#txtSearchCaller").keyup(function () { SearchCaller($(this)); });

function SearchCaller(txtSearchCaller) {
            SearchRequestProcess = $.ajax({
            type: "GET",
            url: baseURL + "Call/SearchCaller",
            data: "term=" + $(txtSearchCaller).val(),
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: OnGetCallerSuccess,
            error: function (request, status, error) { if (request.statusText != "abort") { alert("SearchCaller:: " + request.statusText); } }
                });
    }
}
function OnGetCallerSuccess(Jsondata, status) {
    $("#Grid").kendoGrid({ // create Grid from div HTML element Kendo
        dataSource: Jsondata,
        selectable: "row",
        scrollable: true,
        navigatable: true,
        resizable: true,
        groupable: false,
        columns: [
                    {
                        field: "category1",
                        title: "category1",
                        width: 80
                    },
                    {
                        field: "category2",
                        title: "Customer Name",
                        width: 80
                    },
                ]
    });
}
Petur Subev
Telerik team
 answered on 22 Feb 2013
3 answers
110 views
Hi,

In our application, we are loading a treeview where there is parent-child relationship
Structure is:
Node 1
    Node 1.1
        Node 1.1.1
            Node 1.1.1.1
            Node 1.1.1.2
            Node 1.1.1.3
    Node 1.2
    Node 1.3
        Node 1.3.1
        Node 1.3.2
Node 2
     Node 2.1
            Node 2.1.1
            Node 2.1.2
            Node 2.1.3
    Node 2.2
Node 3

We are using Load on Demand (Ajax binding) to load the children nodes on expanding a parent node.

Step 1: Expand a parent node, child nodes will be loaded
Step2: Check the parent node, all the child nodes will be checked
Step 3: Now Collapse the parent node (Keep it checked) and expand again to load the child nodes.

Expect:
Child nodes should be checked
Actual:
Child Nodes are not checked

The checkboxes state is not maintained after collapsing a parent node and then expanding the same.
This is one of the critical functionalities in our application.
Please help.

Thanks
Vidya
Daniel
Telerik team
 answered on 22 Feb 2013
4 answers
643 views
Hi all, 

Here is my kendo grid declaration in the cshtml

 columns: [
                    { field: "MemberFirstName", title: "Member<br/>First Name" },
                    { field: "MemberLastName", title: "Member<br/>Last Name" },
                    { field: "ClientMemberID", title: "Client<br/>Member ID" },
                    { field: "ProviderID", title: "Provider ID" },
                    { field: "ProviderFirstName", title: "Provider<br/>First Name" },
                    { field: "ProviderLastName", title: "Provider<br/>Last Name" },
                    { field: "AppointmentDate", title: "Appointment<br/>Date" }
                 ],
My last column is a date time column, i want to show only date value not the time. 

I can see the data that i am binding and its clearly a date time value, When i see it in the UI, i see it as /Date(1331166600000)/

any one had this issue before?

I tried the following ways

template: '#= kendo.toString(AppointmentDate,"dd MMMM yyyy") #' 
format: "{0:dd/MMMM/yyyy}"


None of the above two methods worked for me. 
Francois Dumaine
Top achievements
Rank 1
 answered on 21 Feb 2013
1 answer
1.3K+ views
Hello,
 a small question:
I keep seeing this object DataSourceRequest,
this is specific to kendo library when using with grid or filtering?is there a link about this too?

Regards,
Daniel
Atanas Korchev
Telerik team
 answered on 21 Feb 2013
7 answers
158 views
Hi,
I have a datepicker, textbox and one autocomplete box on my page. Textbox and autocomplete looks fine but the datepicker doesn't align correctly. Bug?
Looks the same in IE9 and FF17.



Regards,
Mattias
Dimiter Madjarov
Telerik team
 answered on 20 Feb 2013
3 answers
304 views
I have a grid that is showing fields and one of them is a Name field that can be long. When adding and editing a record, I want the Name field to be a textbox that is 2 rows high.

I created a EditorTemplate that looks as follows:

@(Html.TextArea("Name", new{style="width:200px;height:30px;",row="2",cols="30"})

I placed this at the top of the Name field in the ViewModel:

[UIHint("SponsorNameMultilineText")]

I am now seeing a text box but it has too many lines in it - I want it to be shorter. How do I do that?

 

 

 

 

 

 

Daniel
Telerik team
 answered on 20 Feb 2013
1 answer
274 views
Hi,

I have a hierarchical grid with where the child is displaying data from the parent, I suspect its the way Im binding to the data.

Parent

@(Html.Kendo().Grid(Model.CVXElements) // Specify the type of the grid
.Name("Grid")
.Columns(columns =>
{
    columns.Bound(p => p.ElementSeqNo).Title("Element ID").Width("100px").ClientTemplate(
        Html.ActionLink("#= ElementSeqNo #", "PUSH", "ElementBuilder", new {url = "~/PagCC/EB_ElementAddEdit.aspx", ID = "#= ElementSeqNo #", cvxCode = Model.CVXCode  }, null).ToString());
   
    columns.Bound(p => p.ElementName).Width("900px");
    columns.Bound(p => p.ElementStatus).Width("100px");
    columns.Bound(p => p.ElementActive).Title("Live").Width("100px");  
    columns.Bound(p => p.ParentElement).HtmlAttributes( new {@style= "display:none"}).HeaderHtmlAttributes(new { @style= "display:none;" });                   
})
.ClientDetailTemplateId("ParentElementTemplate")
.Events(events => events.DataBound("dataBound"))
.DataSource(dataSource => dataSource
.Ajax()
)
.Events(events => events.DataBound("dataBound"))
Child
<script id="ParentElementTemplate" type="text/kendo-tmpl">
    @(Html.Kendo().Grid<ElementBuilder.Models.Elements>(Model.CVXElementParents)
            .Name("ParentGrid")
            .Columns(columns =>
            {
 
                                columns.Bound(p => p.ElementSeqNo).Title("Element ID").Width("91px")
                                .ClientTemplate(
                                    Html.ActionLink("#= ElementSeqNo #", "PUSH", "ElementBuilder", new {url = "~/PagCC/EB_ElementAddEdit.aspx", ID = "#= ElementSeqNo #"  }, null).ToString());
                               
                                columns.Bound(p => p.ElementName).Width("910px");
                                columns.Bound(p => p.ElementStatus).Width("100px");
                                columns.Bound(p => p.ElementActive).Title("Live").Width("88px"); 
            })
            .DataSource(dataSource => dataSource
                .Ajax()
                .Read(read => read.Action("HierarchyBinding_ParentElements", "ElementBuilder", new { iElemSeqNo = "#=ElementSeqNo#" }))
            )
            .ToClientTemplate()
 
    )
</script>
Both grids use the ElementSeqNo field to create a Hyperlink, however as stated, the child is taking the parent element data.

Any suggestions appreciated.

Regards
Ross
Daniel
Telerik team
 answered on 20 Feb 2013
5 answers
162 views

Hi,

I'm have a Grid of users (Ajax datasource) with CRUD commands.

Is it possible to specify different templates for each command (one template for create, one for edit etc....?

Regards
Daniel
Telerik team
 answered on 20 Feb 2013
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?