Telerik Forums
UI for ASP.NET MVC Forum
1 answer
237 views

Hi Telerik Team,

We are facing an issue with the Kendo ComboBox Control on MVC5. 

Is there any way to avoid/deactivate the AutoPostBack of the ComboBox when the user press the enter key? We've tried to bind by jQuery other functions on keypress and keydown events without luck.

 

Here is the code:

@(Html.Kendo().ComboBox()
         .Name("cmbUsuarios")
         .DataTextField("NombreUsuario")
         .DataValueField("Id")
         .Placeholder("Seleccione Usuarios...")
         .Filter(FilterType.StartsWith)
         .AutoBind(false)
         .HtmlAttributes(new { @class = "form-control", @style = "width: 100%" })
         .MinLength(2)
         .DataSource(source =>
         {
             source.Read(read =>
             {
                 read.Action("GetUsers", "Perfil")
                     .Data("filterUsers").Type(HttpVerbs.Get);
             })
             .ServerFiltering(true);
         }))

<script>
function filterUsers() {
        return {
            userFilter: $("#cmbUsuarios").data("kendoComboBox").text()
        };
    }
</script>

 

Version of Kendo.Mvc: 2015.1.318.545

Thanks!

Georgi Krustev
Telerik team
 answered on 29 Apr 2015
3 answers
73 views
I found same issue on online demo which is i am facing.

Steps :

1). Open this url in http://demos.kendoui.com/web/combobox/serverfiltering.html

2) Type cha  in filter text box. Now we are getting 3
records.

3).Remove cha  word( by using back space button).

4) click on down arrow of combo box. Still I am getting 3
records

Thanks,
Praveen
Georgi Krustev
Telerik team
 answered on 29 Apr 2015
1 answer
61 views

Hi,

Is there's a way to implement ImageBrowser widget in the MVC edition?

 It would be nice to have this widget outside the editor

 

Thanks

Alexander Popov
Telerik team
 answered on 29 Apr 2015
1 answer
330 views

In my Kendo  MVC grid, I have several calculated columns. But when I use aggregates function to get the sum of each column, only non-calculated columns work. The sum of calculated columns return as 0. Is there a workaround to solve this problem?

 

 Thanks,

Sha

Boyan Dimitrov
Telerik team
 answered on 28 Apr 2015
1 answer
140 views

Hi,

 I am have been evaluating the Kendo UI for ASP.NET MVC and I have noticed a date format issue with the Kendo UI Grid when it comes to UTC Format. I have not been able to resolve this so I am hoping someone here will have a solution to this problem.

Basically I have a created date which is currently stored in the database in UTC Format and when I retrieve this date and bind it to the Kendo UI Grid, the format is coming as

Tue Apr 21 2015 21:05:35 GMT-0400 (Eastern Daylight Time)

 How can I display this date in the Eastern Daylight Time?

"April 21, 2015 5:05:35 PM"

 Please let me know if more information is required.

 

Alexander Popov
Telerik team
 answered on 28 Apr 2015
1 answer
110 views

Can I have more than one footer in one Grid. Currently I use ClientFooterTemplate to add one footer for sum of the columns. I would like to add one more footer for average of the columns. Is that possible?

 

Thanks,
Sha

Alexander Popov
Telerik team
 answered on 28 Apr 2015
1 answer
179 views
Is there a ToDataSourceResultAsync available yet for use with EF 6? (task/async)
Boyan Dimitrov
Telerik team
 answered on 28 Apr 2015
7 answers
967 views
I am experiencing some odd behavior with the DropDownList where when the user selects the desired option, the first time it is clicked does not trigger the change. Users must open the dropdown and select the option a second time for the selection to stick. I am using the MVC wrappers to create the widget, and then I use javascript to populate the datasource and control the change event. 

Here is the applicable RAZOR code: 
@(Html.Kendo().DropDownList()
    .Name("ddlAccounts")
    .HtmlAttributes(new { style = "width:300px" })
    .DataValueField("Value")
    .DataTextField("Text")
    .OptionLabel("Select an Account...")
    .Events(e => e.Change("changeAccount"))
)
And here is the related js code: 
// code from the ajax call that sets the datasource for the list
var ddlAccounts = $("#ddlAccounts").data("kendoDropDownList");
var dataSource = new kendo.data.DataSource({ data: dataReturned.Data });
ddlAccounts.setDataSource(dataSource);
When running the app, the data is correctly populated in the list, but when I open the list and make a selection on the first try, the selection doesn't change in the list, nor is my change event fired. Upon further review, I found that even the select event is not fired the first time. The second attempt always works. 

I have a workaround currently in place, but it's just a hack. Apparently, if I force the dropdown list open after the data loads, the first click is treated correctly. However, I would really like to figure out why the widget is not working as it should. 

Georgi Krustev
Telerik team
 answered on 28 Apr 2015
8 answers
937 views
Hi,

We're starting to play with the MVC beta and liking what we're seeing so far.  But I think I may have found a bug with the window control.  If you default the visible state to false the window as well as the content get styled to display:none.  It seems like the display: none never gets removed from the content section when the window is activated.  All I see in the UI is the title bar of the window.  I ran into this in my application and was able to reproduce it on one of the demo pages.  In the actions.cshtml page I added .Visible(false) like so:

@(Html.Kendo().Window()
    .Name("window")
    .Title("About Josef Hoffmann")
    .Actions(actions => actions
        .Custom("custom")
        .Minimize()
        .Maximize()
        .Close()
    )
    .Content(@<text>
        <div class="armchair">
            <img src="@Url.Content("~/Content/web/window/kubus-armchair.png")"
                    alt="Josef Hoffmann - Kubus Armchair" />
            Josef Hoffmann - Kubus Armchair
        </div>
 
        <p>
            Josef Hoffmann studied architecture at the Academy of Fine Arts in Vienna,
            Austria, under Art Nouveau architect Otto Wagner, whose theories of functional,
            modern architecture profoundly influenced his works, and in 1896 he joined his office.
        </p>
 
        <p>
            In 1898, he established his own practice in Vienna. In 1897, inspired by Mackintosh
            and the Glasgow School, he was one of the founding members with Gustav Klimt, of an
            association of revolutionary artists and architects, the Vienna Secession.
        </p>
 
        <p>
            In 1903, he founded with architects Koloman Moser and Joseph Maria Olbrich, the Wiener
            Werkstätte for decorative arts.
        </p>
 
        <p>
            They aspired to the renaissance of the arts and crafts and to bring more abstract and
            purer forms to the designs of buildings and furniture, glass and metalwork, following
            the concept of total work of art. Hoffman's works combined functionality and simplicity
            of craft production with refined and innovative ornamental details and geometric
            elements. He is an important precursor of the Modern Movement and Art Deco.
        </p>
 
        <p>
            Source:
            <a href="http://www.senses-artnouveau.com/biography.php?artist=hof" title="About Josef Hoffmann">http://www.senses-artnouveau.com/<;/a>
        </p>
    </text>)
    .Draggable()
    .Resizable()
    .Visible(false)
    .Width(500)
)
 
<span id="undo" class="k-button">Click to open the window</span>
 
<script>
    $(document).ready(function() {
        var dialog = $("#window");
 
        $("#undo").bind("click", function() {
            dialog.data("kendoWindow").open();
        });
 
        dialog.data("kendoWindow").wrapper.find(".k-custom").click(function(e){
            alert("Custom action button clicked");
            e.preventDefault();
        });
    });
</script>
 
<style scoped>
    #example {
        min-height:500px;
    }
         
    .armchair {
        float: left;
        margin: 20px 30px;
        text-align: center;
    }
         
    .armchair img {
        display: block;
        margin-bottom: 10px;
    }
</style>

Let me know if there's something I'm doing wrong or if this indeed is an issue with the kendo code.  Thanks!

Regards,
Brian Roth
Dimo
Telerik team
 answered on 27 Apr 2015
3 answers
235 views

Hi,

 

I have a series that is based on the following:

x (horizontal) axis:  12 months for current year.

y (vertical) axis:  inches of rain that fell in that month (units is inch)

 Now, I have my series data and all charts well. 

The one thing I also have is the starting point (pt A) and end point (pt B) for a simple linear regression line that I need to draw a straight line from pt A to pt B to show the trend over time.  Point A will reside in the first column (January) and point B will reside in the last column (December).  ( I am using canvas for the charting).

I would prefer to do this with the 2 end points I already have as opposed to determining each point for each month to create a different chart series based on these points where due to rounding et al - which could result in this new curve not being perfectly perfectly straight.

So I guess in short, is it possible to draw a straight line from month 1 to month 12 on a chart knowing only 2 points where the line would be inserted via svg et al at dynamically?

 Thanks,

 Rene.

 

Daniel
Telerik team
 answered on 27 Apr 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?