Telerik Forums
UI for ASP.NET MVC Forum
4 answers
843 views
@(Html.Kendo().Grid<positions.Models.vOpenPositionsDistinct>()
.Name("gridMain")
.DataSource(dataSource => dataSource // Configure the grid data source
.Ajax() // Specify that ajax binding is used
.Read(read => read.Action("Positions_Read", "Home")) // Set the action method which will return the data in JSON format
)
.Columns(columns =>
{
columns.Bound(s => s.SourceURL).ClientTemplate("<a href='" + Url.Content("#= SourceURL #") + "' target='_blank'>#: SourceURL #</a>").HeaderTemplate("Source URL").Width(120);

})

I have external url links stored in my database and I want to bind them in a grid column as <a href> tag. If I use the code above all rows will have the 1st row SourceURL Value .

What am I doing wrong? It seems as if it creates a generic template for all rows and the template has same url.

Jim
Top achievements
Rank 1
 answered on 22 Jul 2014
2 answers
119 views
Hi,

We have an issue with the current Kendo UI Editor using asp.net wrappers.

User's are reporting formatting errors when pasting from Word. Either text disappears or is un-editable after pasting.

I have upgraded to the latest Kendo UI framework (2014.2.716.545) this morning in the hope of using the new cleanFormatting tool in the Editor widget. I was hoping this would help solve the issue and prevent me from having to switch to another third party Editor.

However it doesn't appear as an option in the asp.net mvc wrapper (Kendo.Mvc.UI.Fluent.EditorToolFactory). Is this by design or can it be found elsewhere?

Thanks,

Rik  
Ricky Shadbolt
Top achievements
Rank 1
 answered on 22 Jul 2014
6 answers
700 views
Using the MVC3 wrappers for Kendo UI, my grids are wired up to Controllers for their various CRUD operations.  

In one of my models, I have a series of boolean values (that in turn handle values for checkboxes) where at least one has to be checked before being considered "valid".  As I have not found a good way to handle that kind of validation directly in the model, I am manually checking those 3 booleans in the ActionResult and where all are false, I return an error on the ModelState.  

What I would like to be able to do is when the grid receives the error in its respective event, to keep the row that was being edited in edit mode.  My attempts to put the row in edit mode manually have not worked, as it appears a sync is firing, which triggers DataBound, which tromps all over my row that I just put into edit mode.  

Is there a way to:
1.  Instruct a grid to keep edit mode open (with the original values) when an Error event is triggered from a DataSource save?
or
2. Define a custom client-side validation step to perform the check against those booleans before the DataSource Save?
Samer
Top achievements
Rank 1
 answered on 21 Jul 2014
3 answers
124 views
Trying to implement the popup editor as per http://demos.telerik.com/aspnet-mvc/grid/editing-popup

I already have grid displaying data (index.cshtml) but now not sure how to incorporate the .cshtml and .cs "files" displayed on this page.

First question is, why is there only one .cshtml page but multiple controllers on the .cs page?  Is there supposed to be just one .cshtml page and I should place everything in it (in this case index.cshtml)?

Thanks,
Dimiter Madjarov
Telerik team
 answered on 21 Jul 2014
7 answers
231 views
I added ClientTemplate() to my column so that I can display the value as "Yes" and "No" rather than the default "True" and "False".
columns.Bound(p => p.IsActive).ClientTemplate("#= IsActive ? 'Yes': 'No'
#").Title("Is Active").Width(100);<BR>

However, the grid is still displaying True and False.

What am I missing?

Thanks,
Dimiter Madjarov
Telerik team
 answered on 21 Jul 2014
1 answer
296 views
Hi,
I have this code in my page

@(Html.Kendo().Grid<LibroDinamico.Models.LibroViewModel>()
        .Name("gridLibros")
        .Columns(columns =>
        {
            columns.Bound(c => c.Titulo);
            columns.Command(command => { command.Edit(); command.Destroy(); });
        })
        .Scrollable()
        .ToolBar(toolbar => toolbar.Create())
        .Editable(editable =>
        {
            editable.Mode(GridEditMode.PopUp);
        })
        .ColumnMenu(p => p.Columns(false))
        .Filterable().Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
        .Sortable(sortable => sortable.AllowUnsort(false))
        .Pageable(pageable => pageable
        .Refresh(true)
        .PageSizes(true)
        .PageSizes(new[] { 5, 10, 25, 50 }))
        .DataSource(dataSource => dataSource
                .Ajax()
                .PageSize(10)
                .Model(model =>
                {
                    model.Id(p => p.Id);
                    model.Field(p => p.Id).Editable(false);
                })
                .Create(create => create.Action(MVC.Libro.ActionNames.Create, MVC.Libro.Name))
                .Read(read => read.Action(MVC.Libro.ActionNames.GetLibros, MVC.Libro.Name))
                .Update(update => update.Action(MVC.Libro.ActionNames.Edit, MVC.Libro.Name))
                .Destroy(destroy => destroy.Action(MVC.Libro.ActionNames.Delete, MVC.Libro.Name))
        )
      )  
With this ViewModel    

public class LibroViewModelwith 
    {
        public int Id { get; set; }
        public string Titulo { get; set; }
        public DateTime Creado { get; set; }
        public DateTime Modificado { get; set; }
    }

When I click in Add a new row the popup appears with all the properties of the view model, but I dont want to show all this properties, I want only to present the Titulo. How I can do this. 
Thanks



















Dimiter Madjarov
Telerik team
 answered on 21 Jul 2014
1 answer
140 views
Are are evaluation your product for a new project we are just evaluating.   We would like to use the UI for ASP.NET MVC without using Entity Framework.   Can you tell me if this is possible?
Sebastian
Telerik team
 answered on 21 Jul 2014
3 answers
137 views
Hi,

I'm using a grid to edit a model with a Required attribute on string property. The problems is that the validation is always false which prevent the user from saving. I have attach the relevant files and would appreciate any help you could provide. 

Thanks,







Alexander Popov
Telerik team
 answered on 21 Jul 2014
1 answer
207 views
Hello,

Using the MVC helper to create a kendo grid.  When I enable both filtering and sorting the filter icon is left aligned rather than right aligned.  Examining the rendered HTML reveals that an extra anchor tag is being rendered around the filter icon markup, thus preventing it from picking up the appropriate CSS styles.  See attached screenshots for examples.  I do not see this behavior when building the grid via javascript/jquery.  I'll open a support ticket for this as well.

Thanks,
Lee
Iliana Dyankova
Telerik team
 answered on 21 Jul 2014
3 answers
43 views
I want to report two bugs in Q1 2014 SP2 release. I write demo to repro the scenario . The code is  attached.
(1) stockchart.  When I set missingValue = 'gap', and the chart data contain isolated point (a single point whose proceeding and succeeding points are both missing), when user mouse hover its legend, the chart throw exception. In my demo, when you click 'Microsoft' legend, exception occurs.
In the very early release version, this bug does not exist. I notice the bug happen since you add this new feature to chart: highlight data points when user mouse hover its legend.

(2) window. Just try my example. First close the window. Then click the button to open the window again. You will find that the text within the window can not be selected. This bug does not exist in the earlier release version. Now it exists in Chrome, Safari, although it works wells with IE.




T. Tsonev
Telerik team
 answered on 21 Jul 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?