Telerik Forums
UI for ASP.NET MVC Forum
4 answers
557 views
Hi,

I have a straight forward implementation of cascading comboxes that doesn't seem to recognize the DataBound event.  I have downloaded the latest keno js files, but nothing seems to work.  When referencing the events I can see these actions available: Change, Close, Open and Select.

Here is the code:
@(Html.Kendo().ComboBox()
                   .Name("classes")
                   .HighlightFirst(true)
                   .Filter("contains")
                   .Placeholder("Select Class...")
                   .HtmlAttributes(new { style = "width: 300px;" })
                   .Suggest(true)
                   .DataTextField("Name")
                   .DataValueField("Id")
                   .DataSource(source => source.Read(read => read.Action("GetClassList", "RCS"))).AutoBind(true))
 
            @(Html.Kendo().ComboBox()
                  .Name("vendorsforClass")
                  .CascadeFrom("classes")
                  .AutoBind(false)
                  .Value("Select Vendor...")
                  .HtmlAttributes(new { style = "width: 300px;" })
                  .DataTextField("Name")
                  .DataValueField("Id")
                  .Events(e => { e.DataBound("vendorForClassChangeEvent")})
                  .DataSource(source =>
                      {
                          source.Read(read =>
                              {
                                  read.Action("GetVendorListByClass", "RCS").Data("filterProducts");
                              }).ServerFiltering(true);
                      }))
 
            <script type="text/javascript">
 
                function vendorForClassChangeEvent() {
                    alert('here');
                    var combobox = $("#vendorsforClass").data("kendoComboBox");
                    combobox.open();
                }
                 
                function filterProducts() {
 
                    return {
                        classes: $("#classes").val()
                    };
                }
Any help or thoughts would be appreciated.

Thank you,
Tad
TAD RHODES
Top achievements
Rank 1
 answered on 28 Jan 2013
2 answers
186 views
I have a tabstrip set up with multiple grids on a page - one grid per tab.  For each grid i have virtual scrolling set up.  The grid on the first tab works properly, but if I go to any of the subsequent tabs the scroll handle is not present on the scrollbar.  If I edit a cell or sort or filter the grid, then the scroll handle shows up and all is good.  It's just in the initial view for grids that aren't on the initial active tab.  Any ideas if it's something I'm doing wrong or if it might be a bug with the code?

I'm using IE9 as my browser.  If you want a sample to duplicate it on, you could probably throw the virtualization grid demo into a tabstrip and should be able to see this behavior.

Thanks for your help!

Regards,
Brian
Brian Roth
Top achievements
Rank 1
 answered on 28 Jan 2013
1 answer
76 views
Hi,

I have a grid with 2 cascade dropdownlist. When I am in the edit mode of the grid using a popup, and i change the value of the parent dropdownlist, the second dropdownlist is repopulated correctly. But if the user doesn't choose anything from the second dropdownlist and just submits. The old value of the second dropdownlist is sent to the controller in the bound model. Although this seems correct by design since the user didn't actually change the value of the second dropdownlist but for data integration this is incorrect.

What I want to be able to do is change the value of the second dropdownlist when the first one changes into a default value of zero for example or null, so that it would trigger the validation error of the dropdownlist.

Best regards,
Sameh
Petur Subev
Telerik team
 answered on 28 Jan 2013
1 answer
406 views
Hi

I have a grid with a detail template that includes a tabstrip with a grid. This works fine but when I select a row on the grid in the detail template I want it to load data based on that row in the grid in the second tab.

This is the code for the details template

<script id="employeesTemplate" type="text/kendo-tmpl">

    @(Html.Kendo().TabStrip()

            .Name("TabStrip_#=ReqId#")

            .SelectedIndex(0)

            .Items(items =>

            {

                items.Add().Text("Exposure Scenarios").Content(@<text>

                    @(Html.Kendo().Grid<Sypol.Matcon.Infrastructure.Models.ExpScen>()

                        .Name("Orders_#=ReqId#")

                        .Columns(columns =>

                        {

                            columns.Bound(o => o.ExpId).Width(101);

                            columns.Bound(o => o.Quantity).Width(140);

                            columns.Bound(o => o.Freq).Width(200);

                            columns.Bound(o => o.Number);

                            columns.Bound(o => o.ContCode);

                            columns.Bound(o => o.SubCont);

                            //columns.ForeignKey(o => o.EXPID, (IEnumerable)ViewData["activities"], "EXPID", "METHOD");

 

                        })

                        .DataSource(dataSource => dataSource

                            .Ajax()

                            .Read(read => read.Action("HierarchyBinding_Orders", "InTray", new { reqID = "#=ReqId#" }))

 

                        )

                        .AutoBind(true)

                        .ToClientTemplate())

                </text>                        

                );

                items.Add().Text("Details").Content(

                    "<div class='employee-details'>" +

                        "<ul>" +

                            "<li><label>Code:</label>#= ExpId#</li>" +

                        "</ul>" +

                    "</div>"

                );               

            })

            .ToClientTemplate())

</script>

I basically want to fill the 'Details' tab with data from the selected row on the grid. At the moment I can only manage to add data from the Parent grid. Is it possible to do this or would I have to create another details template to get this information?

Thanks
Vladimir Iliev
Telerik team
 answered on 28 Jan 2013
6 answers
227 views
Today I updated to 2012.3.1315 and the menu's work differently. I have a horizontal menu and the menus drop down fine, but sub-menus rather than flying out to the right (or left if collision is detected) just pop-over the existing menu. Here is a screen cast of it:

http://screencast.com/t/ItUsyEGtB

Not good. Is there a new option I need to set. While I am using KendoUI MVC complete I am not using the wrappers for the menu... I just use the client side API.

BOb

Dimo
Telerik team
 answered on 28 Jan 2013
2 answers
81 views
I am doing a manual Jquery.Ajax post as my screen has data outside the grid that has to be posted to the Action.

I am able to do an Jquery.each to populate the model from the grid.dataSource.data, but even if I do a date.toUTCString() the HttpPost Action receives the date incorrectly after I do a JSON.stringify(model) in the Ajax post.

From Jquery AJAX post in View: 
1/25/2013 (resolved to "Fri, 25 Jan 2013 05:00:00 GMT" with the .toUTCstring())
NOTE: I did try this without a .toUTCstring pior, as well as .toDateString()

Resolved To Controller Action: 
{1/23/2013 11:01:57 AM}

Has anyone encountered something like this? If so, how have you resolved it?
Sean
Top achievements
Rank 1
 answered on 25 Jan 2013
2 answers
540 views
I've implemented a right-click context menu for some of the grids in our project.  One of these grids is set up to allow multiple row selection.  I was hoping that when the user right-clicks I could have some options for them which would operate on all currently selected rows.  But it seems that the right-click is interpreted as a "Select" click and proceeds to select the row that the user has clicked over, which causes all the other rows to be deselected.  Is there a way to treat a right-click differently and have it not affect which rows are selected?

Thanks for your help!

Brian
Brian Roth
Top achievements
Rank 1
 answered on 25 Jan 2013
3 answers
112 views
How do I set the width of a chart?
Iliana Dyankova
Telerik team
 answered on 25 Jan 2013
1 answer
110 views
I recently upgraded to the current version via VS2012 NuGet and all of my language changes went bye-bye. This is obviously because i had made the new resource file to the source project and built the dll from there. Naturally the upgrade didn't have my changes to resource files. How can i get the latest version of the source files in order to add my own resources to it and building the new dll? If adding new resource files is somehow achievable via other measures i would love to hear them. 
Daniel
Telerik team
 answered on 25 Jan 2013
1 answer
361 views
Hi guys.

I found somme issue with Editor widget if use MVC wrapper for use Html.Kendo().EditorFor(x=>x.Body).
If use code above - when open image browser all files has name undefined and shows without Thumbnail. When i look at js code, that was rendered by MVC wrapper - it`s a bit different with code, that doc suggest to use as javascript plugin.


So, if i use mvc wrapper code like this:
@(Html.Kendo().Editor()
      .Name("Editor")
      .HtmlAttributes(new { style = "width: 740px;height:440px" })
.ImageBrowser(imageBrowser => imageBrowser
    .Image("~/Content/UserFiles/Images/{0}")   
    .Read("Read", "ImageBrowser")
    .Create("Create", "ImageBrowser")
    .Destroy("Destroy", "ImageBrowser")
    .Upload("Upload", "ImageBrowser")
    .Thumbnail("Thumbnail", "ImageBrowser"))
)
All is ok, but problem start when i use Html.Kendo().EditorFor(x=>x.Body).

I use latest version of libs and js files - 2012.3.1315.

Could you help me?
Daniel
Telerik team
 answered on 24 Jan 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?