Telerik Forums
UI for ASP.NET MVC Forum
1 answer
69 views
Hi,

I have Opera 12.15 and Kendo UI MVC 2013.1.514. This kombination fires often JavaScript Errors (please show the attachment). I can't reproduce it with IE10, so I think it's a bug.

Vladimir Iliev
Telerik team
 answered on 11 Jun 2013
2 answers
126 views
Hello,

I have a problem with the Kendo UI Editor displaying a security alert when loading the page in IE 8. Our MVC applications runs with https (SSL) . When I load a page with the Kendo UI Editor on it it displays the following security alert popup:

Do you want to view only the webpage content that was delivered securely?
(also see the attached screenshot. BTW, I replaced the german alert popup with the proper english one on the screenshot. I think that is more helpful.)

The SSL problem occured on other Kendo UI controls also, but I could fix them all by replacing all the HTTP urls in the CSS-stylesheets I used with local urls. But I cannot get the Editor working without displaying the popup.
Also it is not a solution for our IE 8 clients to make any changes to the IE 8 settings.

There must be still any http resources in the Editor that causes the alert to popup. Do you have any ideas what still causes the security alert? Any response is welcome. Thanks.

EDIT:
I forgot to mention that I also used Fiddler to trace the traffic. Only https traffic was shown in Fiddler.
After some more investigation I could track down the problems. It seeems the Combo Boxes in the Editor toolbar cause the problems. Take a look at the attached screenshot again. You will notice, that the content of the ComboBoxes have not been loaded yet (because it is blocked by the IE 8 security popup). After clicking on "Yes" or "No" (it does not matter which one I click) it populates the content of the ComboBoxes.

To test, I removed all the Toolbar entries (@(Html.Kendo().Editor().Tools(m => m.Clear()) and the security popup is not displayed anymore. So it has defnitly something to do with the toolbar content/images.

Does that help you in any way to give me some ideas/hints what I can do to get rid of the popup and also display the toolbar?

Alex Gyoshev
Telerik team
 answered on 11 Jun 2013
1 answer
119 views
Dear Kendo Team,

I'm using Kendo grid in my MVC Project in where i've a dropdown list.
I want to bind the dropdown list on edit event of grid because it's not always common data for each row.

with telerik I used to do like as follow:


function onEdit_HireBookingInvoiceDetail(e) {
$.ajax({
                url: "@Url.Action("GetHireJobList", "Hire")",
                data: {HireJobId: e.dataItem['HIRE_JOB_ID'] != null ? e.dataItem['HIRE_JOB_ID'] : 0},
                dataType: "json",
                type: "POST",           
                success: function (myData){
                $(e.form).find("#HireJob").data("tDropDownList").dataBind(myData);
                $(e.form).find('#HireJob').data('tDropDownList').select(function (dataItem) {
                    return dataItem.Value == e.dataItem['HIRE_JOB_ID'];
                });
                
                }
            }); 
}
               
(where #HireJob is an editor template)

i just want to transfer above code with kendo but i'm getting problem.

can anyone please help me with this issue?

Thanks in advance.
Daniel
Telerik team
 answered on 11 Jun 2013
2 answers
123 views
Hello.

I'm doing a dropdownlist with the MVC helper like this, but the option with empty text is not showing, a red  line is showing instead.

How can I show the empty option so that users can select, yes, no, or empty ( show all ) without having to set a text or value for that option?
            @(Html.Kendo().DropDownList().Name("isPublic")
                   .Items(items =>
                       {
                           items.Add().Text("").Value("");
                           items.Add().Text("Yes").Value("true");
                           items.Add().Text("No").Value("false");
                       }
                   )
               )

Thanks in advance.
Sergi
Top achievements
Rank 1
 answered on 11 Jun 2013
1 answer
84 views
I would like to bind a custom command from a kend grid (currently using mvvm) to function.

{ "command": { "text":"hello world", "click":"helloWorld" } }

On click the function does not get called. I get a query error instead, can you please advise.

Anil
Top achievements
Rank 1
 answered on 10 Jun 2013
9 answers
143 views
Hi,
I have a problem with weird design of the menu... I've implemented it based on your demo (binding to hierarchicaldata)

please look at the attached picture.

thanks
ShareDocs
Top achievements
Rank 1
 answered on 10 Jun 2013
2 answers
109 views
I am sure I am missing something simple (again..)..
I have a grid that is reorderable, but I would like to prevent one column from being moved.
My event function is called but setting e.preventDefault() and returning false have no effect.

Here is my event function:
function onColumnReorderLeft(e) {
    if (e.oldIndex == 2 || e.newIndex == 2) {
        e.preventDefault();
        return false;
    }
}
Here is the grid declaration
@(Html.Kendo().Grid(Model.DataLeftSide)
              .Name("VesselsInPortLeft")
              .DataSource(dataSource => dataSource.Server()
                                                  .PageSize(200)
                                                  .Model(model => model.Id(d => d.veid))
                         )
    .CellAction(cell =>
    {
        if (cell.Column.Title.Equals(""))
        {
            cell.HtmlAttributes["style"] = "background-color: lightgray";
        }
        else if (cell.Column.Title.Equals("Name"))
        {
            cell.HtmlAttributes["style"] = String.Format("background-color: {0}; color: {1}",
            String.Format("#{0}", cell.DataItem.vesselnamebackcolor.Substring(2)), String.Format("#{0}", cell.DataItem.vesselnameforecolor.Substring(2)));
        }
        else if (cell.Column.Title.Equals("LOC"))
        {
            cell.HtmlAttributes["style"] = String.Format("background-color: {0}; color: {1}",
            String.Format("#{0}", cell.DataItem.currentberthbackcolor.Substring(2)), String.Format("#{0}", cell.DataItem.currentberthforecolor.Substring(2)));
 
            cell.HtmlAttributes["title"] = cell.DataItem.currentberthdesc;
        }
        else if (cell.Column.Title.Equals("Activity"))
        {
            cell.HtmlAttributes["style"] = String.Format("background-color: {0}; color: {1}",
            String.Format("#{0}", cell.DataItem.currentactivitybackcolor.Substring(2)), String.Format("#{0}", cell.DataItem.currentactivityforecolor.Substring(2)));
 
            cell.HtmlAttributes["title"] = cell.DataItem.currentactivitydesc;
        }
        else if (cell.Column.Title.Equals("Flag"))
        {
            cell.HtmlAttributes["title"] = cell.DataItem.FlagName;
        }
 
    }
    )
    .Columns(columns =>
    {
        columns.Bound(d => d.veid).Hidden().IncludeInMenu(false);
        columns.Bound(d => d.vesselidused).Hidden().IncludeInMenu(false);
        //columns.Bound(d => d.Selected).Title("").Width(25).IncludeInMenu(false).Sortable(false);
        columns.Template(@<text></text>).Title("").Width(25).IncludeInMenu(false);
        columns.Bound(d => d.vesselname).Title("Name");
        columns.Bound(d => d.flagshortname).Title("Flag").Width(60);
        columns.Bound(d => d.currentberthabbr).Title("LOC").Width(60);
        columns.Bound(d => d.currentactivityabbr).Title("Activity").Width(80);
        columns.Bound(d => d.agentname).Title("Agent");
    })
    .Sortable(sortable => sortable
                        .AllowUnsort(true)
                        .SortMode(GridSortMode.MultipleColumn))
    .Scrollable(scr=>scr.Height(680)) //scr=>scr.Height(452) scr=>scr.Height("100%")
    .Filterable()
    .ColumnMenu()
    .Resizable(resize => resize.Columns(true))
    .Reorderable(reorder => reorder.Columns(true))
    .Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
    .Events(events => events.Change("onChangeLeft").ColumnResize("onColumnResizeLeft").ColumnReorder("onColumnReorderLeft"))
    )

Thanks for you help!

Galen Giebler
Top achievements
Rank 1
 answered on 10 Jun 2013
4 answers
176 views

Hi!

I've a inline editable Kendo Grid configured  with a create button in the toolbar, paging is activated, the data are sorted and the datasource is an ajax datasource. This configuration generates multipe problems and I need a fix or a workaround for this, because I can't disable the sorting.

If I'm not on page 1 in the grid and I press the create button nothing happens. I can press the button multiple times and nothing happens. If I go back to the first page I have one empty data line for every pressed button in the grid. And it's not a javascript error.

Maybe it's possible to switch the page during pressing the create button but how?

If I've a sorting with no results in the grid and press the create button nothing happens too. After I clear the sorting I have one empty data entry for every pressed create button in the grid too.

I understand the technical reason and know about the workaround, but not the normal user. :-)

How I can handle the multipe button press?

Thank you for help!

Michael
Top achievements
Rank 1
 answered on 10 Jun 2013
1 answer
173 views
Hi,

I am using kendo splitter in an mvc application.

I have a small requirement here and unfortunately I cannot find a solution for that.

In splitter I have enabled collapse property to true and I can collapse the splitter now.

What I want is I don't want the splitter to collapse to right. 

ie . splitter should collapse only to left.

Please help me.
Petur Subev
Telerik team
 answered on 10 Jun 2013
1 answer
824 views
I have some divs in my page that have the contentEditable attribute.  How can I update the viewmodel when the user changes the text of any of these editable divs.

For example:

<div data-bind="text: viewModel.Person.FirstName" contentEditable="true">John</div>

Assume a user edits the name and changes it to Jack.  In an event handler, I need to set viewModel.Person.FirstName to "Jack" (the innerHtml of the element is now "Jack"), and I need to fire a change event on the viewmodel so that any other elements on the page that refer to viewModel.Person.FirstName are updated.

Seems I can't use this.bindinds["text"] because that is valid in the viewmodel itself, not in an event handler for the element.

I could parse the data-bind attribute and get the value of it's "text" binding, but that seems kind of silly.

This is probably simple, but being new to this stuff I'm kind of flummoxed.

Thanks for any help :o).
Alexander Valchev
Telerik team
 answered on 10 Jun 2013
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?