Telerik Forums
UI for ASP.NET MVC Forum
1 answer
76 views
I need a kendogrid in which one column should should have buttons that can be clicked with  either of two options:
"select"-->to open a pdf
"modify">to go to another page
either one of these should be visible depending on a value coming back from the database.
Please help!!!!!!
Dimiter Madjarov
Telerik team
 answered on 28 Mar 2014
1 answer
225 views
There are 3 bool values returned from the database: isProduct, isActive, isNew

I need to have one column in the kendogrid-"Details" column that will have 3 images (say red or green arrows) and text next to those arrows.
how can I get this ?
Dimiter Madjarov
Telerik team
 answered on 28 Mar 2014
10 answers
340 views
http://demos.telerik.com/kendo-ui/mobile/listview/press-to-load-more.html   : listview loadmore

1.Setting
loadmore(false) . pagesize(20)

***Result is exact match.

2. setting
loadmore(true) . pagesize(20)

***Result is not match.

please See VideoFile

Sorry, I am not good at english.

It's hard to learng KendoMobileMVC. 


file link :

http://blogattach.naver.com/fe6be257407574c4e5096e5c6082f986237580c0/20140320_191_blogfile/bak4500_1395299727774_rYMlbD_zip/erroravi.zip




Petyo
Telerik team
 answered on 28 Mar 2014
1 answer
98 views
I having a copy paste functionality using the Kendo Grid wherein i need to select mulitple items in the rows displayed in the Grid. The grid contains a scroll bar with 50 rows. When I try to scroll the grid for selection ( click and drag the mouse over the rows) the grid does not get scrolled to the rows at the bottom. Hence only the rows visible on the screen ( say first 10 rows) are getting selected. How do i resolve this issue?
PFA the screenshot for clarification
Dimo
Telerik team
 answered on 28 Mar 2014
1 answer
1.2K+ views
I have a grid comprising of 250 columns ( the number of columns is dynamic based on a precondition) with batch editing option. When i bind data in Kendo Grid , I am getting " A script on the page is causing your browser to run slowly. If it continues to run, your computer might become unresponsive " . Also the batch editing does not occur. Is there any limitations on the number of columns and rows in the Kendo Grid .
Please find attached the screenshot for your reference
Alexander Popov
Telerik team
 answered on 27 Mar 2014
3 answers
548 views
Hi,

I have a Kendo MVC grid ajax binding. In one of the column I am displaying hyperlink using clientTemplate  , when user clicks on the hyperlink  it opens up another window with new controller action which is working fine too. But now the requirement  when user clicks on hyperlink check user session has not expired and user still authenticated and if it is so then open up that new window otherwise clicking on hyperlink should open login controller action.

 I have written a javascript function on onlcik event for <a> tag  which checks if user has authenticated then open up new window  else redirect to login page But its not working. when I run it I get the empty grid. Below is the code.
 
@(Html.Kendo().Grid<Anthology.Services.Interfaces.DTO.Web.Models.DocumentHistoryModel>()
                          .Name("Grid")
                          .EnableCustomBinding(true)
                          .BindTo(Model)
                          .Columns(columns =>
                          {
                              columns.Bound(c => c.DocumentType).Title("Document Type").Filterable(false).ClientTemplate("<a onclick=\"IsUserAuthenticated('" + "#= DocumentGuid #')\" " + " href='javascript:void(0)'>#= DocumentType#</a>");
                              columns.Bound(c => c.Action).Filterable(false);
                              columns.Bound(c => c.DocumentThumbnail).Title("Document Thumbmail").Sortable(false).Filterable(false).ClientTemplate("<text><img src='" + Url.Content("~/content/images/BDC4B60F-1EEC-4FE8-BB9C-2CA9F2F29664.png") + "' height='35' width='30' onmouseover='MagnifyImage()'/></text>");
                          })
                         .DataSource(dataSource => dataSource.Ajax()
                              .Read(read => read.Action("Index_Read", "Home"))
                              .PageSize(5)
                              .ServerOperation(true)
                          )
                          .Events(events => events.DataBound("onGridDataBound"))
                          )  

  function IsUserAuthenticated(documentguid) {
        var userAuthenticated= @User.Identity.IsAuthenticated.ToString().ToLower();
        if (userAuthenticated==true) {
            var url = @Url.Action("Index", "ImageViewer") + "/" + documentguid;
            $(".k-grid-content table tbody tr td text img").href = url;
            $(".k-grid-content table tbody tr td text img").target = '_blank';
        } else {
            var urlAd= @Url.Action("Index", "Admin");
            $(".k-grid-content table tbody tr td text img").href = urlAd;}

    }







Petur Subev
Telerik team
 answered on 27 Mar 2014
3 answers
546 views
I'm having a problem using the wizard to convert an existing project to a Telerik UI for Asp.Net MVC project. It will go through the conversion just fine and add all of the necessary resources, however after converting then I'm no longer able to use scaffolding to create new controllers based on defined data models. I get the error stating:

There was an error running the selected code generator: 'There was an error getting type 'ProjectName.Models.ModelName'. Try rebuilding the project.'

I've tried creating new models and then generating a new controller as well as creating a new controller based on previously defined models and get the same error in both instances. Simply rebuilding the project doesn't work. I even tried creating a new project, copying over my resources and converting it through the wizard again and get the same results. The target framework is 4.5.
Vesko
Telerik team
 answered on 27 Mar 2014
1 answer
364 views
I'm passing an IEnumerable collection into a foreach loop to create multiple series in a chart. I can verify that the foreach loop is indeed populating and creating the individual series. Though when the screen renders the space is there and I can inspect the element but it doesn't display on the screen. 

<table style="height: 400px; width:900px;">
            <tr>
                <td class="chart-wrapper">
                    @(Html.Kendo().Chart(Model)
                    .Name("LocationsChart")
                    .Title("Locations")
                    .Legend(legend => legend
                        .Visible(true)
                    )
                    .ChartArea(chartArea => chartArea
                        .Background("transparent")
                        .Width(900)
                        .Height(400)
                    )
                    .Series(series =>
                    {
                        foreach (var item in Model)
                        {
                            series.Column(new decimal[] { item.FuelSales, item.FuelSalesLyr, item.FuelSalesLy2 }).Name(item.LocUsageDesc);
                        }
                    })
                    .CategoryAxis(axis => axis
                        .Categories(new string[] {"Sales Yr to Date", "Sales Last Yr", "Sales 2yr"} )
                        .MajorGridLines(lines => lines.Visible(false))
                    )
                    .ValueAxis(axis => axis
                        .Numeric()
                        .Labels(labels => labels.Format("c"))
                        .Line(line => line.Visible(false))
                        .MajorGridLines(lines => lines.Visible(true))
                    )
                    .Tooltip(tooltip => tooltip
                        .Visible(true)
                        .Format("{0:C}")
                        .Background("grey"))
                    )
                </td>
            </tr>
        </table>

inspecting the element in the browser

jQuery(
function(){jQuery("#LocationsChart").kendoChart({"chartArea":{"background":"transparent","height":400,"width":900},"title":{"text":"Locations"},"legend":{"visible":true},"series":[{"name":"Home","type":"column","data":[368.59,1532.70,622.57]},{"name":"Shop","type":"column","data":[485.46,1824.32,856.80]},{"name":"Cdry","type":"column","data":[287.98,100.00,0]},{"name":"Cndo","type":"column","data":[363.69,872.09,0]},{"name":"Home","type":"column","data":[199.59,389.70,0]}],"categoryAxis":[{"majorGridLines":{"visible":false},"categories":["Sales Yr to Date","Sales Last Yr","Sales 2yr"]}],"valueAxis":[{"labels":{"format":"c"},"majorGridLines":{"visible":true},"line":{"visible":false}}],"tooltip":{"background":"grey","format":"{0:C}","visible":true}});});
Bob
Top achievements
Rank 1
 answered on 26 Mar 2014
1 answer
213 views
Has anyone experienced seeing "NaN/NaN/0NaN" in Kendo UI grids for fields prior to 1970?  I'm experiencing this in the Kendo UI grids, but not the previous Telerik UI grids. 
The fields (date of births) are of type "Datetime?"
The view i'm using uses .Format("{0:d}") for formatting, might that be the issue?
 
    columns.Bound(od => od.PatientDOB).Format("{0:d}").Title("PatientDOB").Width(50);

Attached 2 screenshots for visual representation.
I'm wondering if there is a workaround to this issue.

Any help is greatly appreciated.
Thanks!
Drew
Top achievements
Rank 1
 answered on 26 Mar 2014
7 answers
1.5K+ views
Hi guys,

I'm trying to embed a dropdown menu (bootstrap) inside a grid on the first column of each bound row (basically creating a menu for each item). It works but the menu is hidden behind the next row down so there's something to do with the markup of the grid overlapping the markup of the menu.

Here's the markup:

@(Html.Kendo().Grid<Listing>()
        .Name("grid")
        .DataSource(dataSource => dataSource
            .Ajax()
            .Read(read => read.Action("RefreshTable", "HomeController"))
        )
        .Columns(columns =>
        {
            columns.Bound(x => x.Number)
                .Width(120)
                .Template(@<text></text>)
                .ClientTemplate(
                    "<div class='btn-group'>" +
                    "<button type='button' class='btn btn-default btn-sm dropdown-toggle' data-toggle='dropdown'><span id='selectedTagType'>#= Number#</span> <span class='caret'></span></button>" +
                    "<ul class='dropdown-menu' role='menu'>" +
                    "<li><a onclick='editRecord();'></a>Edit</li>" +
                    "<li><a onclick='activateRecord();'></a>Activate</li>" +
                    "<li><a onclick='transferRecord();'></a>Transfer</li>" +
                    "</ul>" +
                    "</div>"
                );
            columns.Bound(x => x.TypeDescription);
            columns.Bound(x => x.PhoneNumber);
        })
    )
Bil
Top achievements
Rank 1
 answered on 26 Mar 2014
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?