Telerik Forums
UI for ASP.NET MVC Forum
1 answer
229 views

Hi

I need to create a search modal window that allows me to
type a search criteria, display the results on a grid, allow the user 
select a row from that grid and then pass the Id of the select row back
to parent window.

I'm using MVC5 and  Kendo UI.

What's the best way to achieve this?
Dimo
Telerik team
 answered on 22 Jul 2014
4 answers
903 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
137 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
816 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
147 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
262 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
321 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
169 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
167 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
239 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
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Security
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?