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

I have 2 problems with the code bellow. 

1) If I don't set the z-index in the CSS below, the "Select..." button does not do anything when clicked on.  With the CSS in place the click event works until I upload something, after which it no longer respond.  I'd have to reload the page to get it to work again.  Drag/drop files to the drop zone works fine and the files are uploaded properly.

2) When uploading, instead of uploading each file once, it uploads each file it at least 4 times (see attached image).

HTML:
<div id="dlgUpload" style="display:none">
    <p><span class="ui-icon ui-icon-info" style="float: left; margin: 0 7px 20px 0;"></span>Photo Upload</p>
    <div style="width:100%;max-height:300px;">       
        @(Html.Kendo().Upload()
            .Name("fileUpload")
            .Async(a => a
                .Save("Save", "Upload")
                .Remove("Remove", "Upload")
                .AutoUpload(true)
            )
            .Events(e => e
                .Upload(@<text>
                function(e) {   
                 e.data = { jobNumber: $("#Customer_Number").val(), mode:"photos" };
                }
              </text>)
                .Remove(@<text>
                function(e) {   
                 e.data = { jobNumber: $("#Customer_Number").val(), mode:"photos" };
                }
              </text>)
            )
        )
    </div>
</div>
function uploadPhotos(customerId) {
    $("#dlgUpload").dialog({
        autoOpen: false,
        resizable: false,
        draggable: true,
        modal: true,
        width: 470,
        title: "Upload Photos for Customer " + customerId,
        buttons: {
            "Close": function () {
                $(this).dialog("close");
            }
        },
    });
    $('#dlgUpload').dialog('open');
}
funtion uploadPhotos is called by buttons on a kendoGrid.

CSS:
.ui-dialog .k-upload-button  input
{
    z-index:auto !important;
}
When I take the upload widget out of the dialogbox everything works fine.

Update:
I seem to remember something about the widget being initialize twice when running inside a dialog box!
If you look at the second image, notice there are 2 drop zones (1 in red and 1 in yellow.)  When dropping on the red zone the file uploads 4 times, on the yellow zone it uploads 8 times!

Help!!

Thanks,
PT
Dimo
Telerik team
 answered on 22 Apr 2013
2 answers
154 views
I follow the examble on here , add the custom column which contain the Upload control , but when I add new row , the file which I selected before is removed.
The main idea is i want to post the form with all file that i select by Upload control in Kendo grid and the data source  of grid in server(it was success) by manual

Sorry because the souce file > 2m so i upload the file on mediafire
http://www.mediafire.com/?box80su08io5i64

Petur Subev
Telerik team
 answered on 22 Apr 2013
1 answer
108 views
Hello,
I am using Kendo UI Web with RequireJS in an ASP.MVC 4 application. Recently I reached the folowing situation:
In a form I am using MultiSelect control and I try to load required kendo components with requirejs using the following pseudocode:
<script>
require(['other_modulea','kendo-multiselect','kendo-aspnetmvc'], function(){
     // execute deffered controls initialization scripts.
});
</script>

But there is no dependency established between kendo-aspnetmvc and kendo-multiselect (and kendo-combobox - seems to have similar issues). It happens that aspnetmvc executes before kendo-multiselect fulfills it's dependencies, this results in aspmvc not being able to attach to ComboBox and MultiSelect the requestData function. This function is called on deffered initialization script and because aspnetmvc script was loaded prior to kendo-multiselect the function is not available.
It seems that despite the order of modules in requirejs the execution order of the modules is not guaranteed as long as there are no dependencies between them.

Do you have any ideea how this could be solved?

One way could be:
<script>
require(['other_modulea','kendo-multiselect'], function(){
    require(['kendo-aspnetmvc'], function(){
         // execute deffered controls initialization scripts.
     });
});
</script>
but I would really preffer a more generic approach instead on doing this nested require all over the application.

Thanks,
Vasile
Georgi Krustev
Telerik team
 answered on 22 Apr 2013
1 answer
107 views
1. MultiSelect
2. ColorPalette
Dimiter Madjarov
Telerik team
 answered on 19 Apr 2013
10 answers
840 views
Hello!
I want create KEY(first object in my model), before call method Create!
I dont want create KEY, If I edit object, so I can't  write this:
Events(e => e.Edit("getKey()"))

So,probably,I need this:
.ToolBar(commands =>
        {
            commands.Create().HtmlAttributes(new { onclick = "getKey()" });
        })
How I can this do?
Because it's doesn't work :)

Please help!
And thanks for help)

Gusev
Top achievements
Rank 1
 answered on 19 Apr 2013
1 answer
183 views
Hello.

We are using Telerik KendoUI Web for ASP.NET MVC 4 for one of our business applications and were looking to see if we can create something that looks like the screenshot attached using the toolset. 
here is URL from Telerik demo : http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx
 
Basically, we are looking to see if we can have a hierarchical DataListView embedded as a child result.
 
Any pointers are very appreciated.
 
Thanks in advance!
Ann
Vladimir Iliev
Telerik team
 answered on 19 Apr 2013
4 answers
127 views
Editable PopUpWindow

I have this:
<script type="text/javascript">
        kendo.culture(//here is my culture);
    </script>
and everything works well,but editable.PopUp window has titile "Edit"
why localization doesnt work?
Gusev
Top achievements
Rank 1
 answered on 19 Apr 2013
1 answer
575 views
Hi,

I want to add a condition for the toolbar template as follow:

 .ToolBar(toolbar =>
            {
                toolbar.Template(
                    @{
                        if(centre.AttributeCenterRels.Count < 6) {
                            @<div class="action text-align-right">
                                <a href="~/AttributCentreRel/Create?CentreId=@centre.Id" class="btn"><i class="icon-plus"></i> Create</a>
                            </div>
                        }
                        else{
                            @<div class="action text-align-right">
                                Vous ne pouvez spécifier que 6 attributs pour un centre.
                            </div>
                        }
                    }
                );
            })

Is this possible?

Regards,
Vladimir Iliev
Telerik team
 answered on 19 Apr 2013
1 answer
281 views
 Hi,

I'm upgrading the kendo to the new one (Spring) and after that, I can't set the selected value for DropDown and Combobox. 
It was ok before when i'm using the old version.
And its happen not only in chrome, but in all browser.

I'm using Visual Studio 2012 (MVC 4), and the new Jquery (1.9.1) and JQuery.Validate.Min.js

following is the code snippet:
@(Html.Kendo().DropDownList()
.Name("color")
.DataTextField("Text")
.DataValueField("Value")
.Value("2")
.BindTo(new List<SelectListItem>() {
new SelectListItem() {
Text = "Black",
Value = "1"
},
new SelectListItem() {
Text = "Orange",
Value = "2"
},
new SelectListItem() {
Text = "Grey",
Value = "3"
}
})
)

It always selects  1 instead of 2?!

Any ideas why?

Thanks :)
Dimiter Madjarov
Telerik team
 answered on 19 Apr 2013
10 answers
918 views
I'm playing around with the new MVC wrappers and I'm having trouble with the grid editors in the examples.
When I view the InlineEditing sample for the grid, clicking the Create button on the toolbar provides an inline editor with numeric text boxes.
In my own project, the grid just shows standard textboxes. To try and see where I've gone wrong I've copied the code from the examples into a standalone project and that reproduces the error, showing only standard text boxes as well. No errors, just no numeric textbox.

Any ideas where I could be going wrong?
Atanas Korchev
Telerik team
 answered on 19 Apr 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?