Telerik Forums
UI for ASP.NET MVC Forum
1 answer
76 views
Hello,

Where I can change ressources related to Grid?

In batch mode the french translation button Save changes is incorrect : "Entregistrer les modifications" and should be "Enregistrer les modifications".

Thank you.
Georgi Krustev
Telerik team
 answered on 11 Jun 2013
3 answers
174 views
Im having a problem rendering a detail template which is compose of Kendo Tabstrip. It generates an "Invalid Template" error. Below is my code

@(Html.Kendo().Grid<OrderInfo>()
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(e => e.OrderID);
        columns.Bound(e => e.MaterialID);
    })
    .Sortable()
    .Pageable()
    .Scrollable()
    .ClientDetailTemplateId("drawingtemplate")
    .DataSource(dataSource => dataSource
            .Ajax()
            .Read(read => read.Action("ReadOrders","Admin"))
       )
   .Events(events => events.DataBound("dataBound"))
 )
<script>
    function dataBound() {
        this.expandRow(this.tbody.find("tr.k-master-row").first());
    }
</script>
<script id="drawingtemplate" type="text/kendo-tmpl">   
    @(Html.Kendo().TabStrip()
        .Name("my#=OrderID#")
        .SelectedIndex(0)
        .Animation(animation => animation.Open(open => open.Fade(FadeDirection.In)))        
        .Items(items =>
          {
              items.Add().Text("FirstTab")
                  .Selected(true)
                  .Content("try");
          })
          .ToClientTemplate()       
          )
@(Html.Kendo().NumericTextBox<double>()
            .Name("my#=OrderID#")
            .Format("p0")
            .Min(0)
            .Max(0.9)
            .Step(0.01)
            .Value(0.05)
            .ToClientTemplate()
        )
</script>
Dimiter Madjarov
Telerik team
 answered on 11 Jun 2013
1 answer
74 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
131 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
131 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
131 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
87 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
151 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
112 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
195 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
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?