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

We are using the Kendo UI Grid with batch editing mode (in-cell).

The problem is when the user is editing a cell and in edit mode, if the user tries to sort the column, the editor control disappears along with the validation.

We need to show the validation in the grid till the validation rules are not satisfied.

Our requirement is that the control should remain visible even if the user sorts the grid.

Or can we disable sorting on the grid when the user is in edit mode?

Can you please give a good solution for this?

Regards,
Alexander Popov
Telerik team
 answered on 03 Feb 2015
2 answers
515 views
I have little experience with the Kendo Grid HTMLHelper for ASP.Net MVC and have a couple of different scenarios in which I ideally need to specify multiple model items to be used in a "Columns.Bound()" clause for an @Html.kendo.grid declaration.   One is where I need to concatenate two model items for the value of a particular column.  

The other is where I need to have the title/tooltip for a column for one model item be the contents of another model item in that same row as in the following:

columns.Bound(model => model.modelItem1).Title("Reason Dump Taken").ClientTemplate("#= getTruncatedValue(modelItem1,36)#").Width(180).HtmlAttributes(new { title = " #= modelItem2 # "});

In both cases adding the 2nd model item, either as "modelItem2" or as "model.modelItem2" throw syntax errors.  I've searched this forum and others and haven't seen a syntax for simply implementing the first one.  

I did see a more lengthy workaround for the second that involved registering a javascript function to be called when a tooltip was requested; getting the grid row in that function, and trying to provide the 2nd model item via that mechanism. 

But it would be much easier if I could just specify something more like title = " #= modelItem2 # ".

Thanks in advance,
-Bob
Dimiter Madjarov
Telerik team
 answered on 03 Feb 2015
5 answers
271 views
Telerik is seriously deficient with its Data Access toolset by not providing a way to automatically scaffold controllers and views from models in an MVC project. See, by comparison, what Microsoft now supports for its own native system, Entity Framework - http://www.codeproject.com/Articles/685210/CRUD-Operations-Easy-with-New-Scaffolding-Feature.

I like Telerik's approach generally, and its tools including the data model diagramming, but data isn't created or edited out of thin air. Creating forms is a tedious, repetitive, time consuming (hence money consuming) task. If Telerik isn't going to support scaffolding, it's losing a big edge to Microsoft's own tools, and Data Access becomes significantly less valuable.

I see a lot of desire from various developers for this capability as I searched existing threads, but no indication of a serious effort to make scaffolding a priority. Any comments by Telerik on this?
Doroteya
Telerik team
 answered on 02 Feb 2015
4 answers
260 views
Good day,

I am using the ASP.NET MVC server side scheduler.  What is noticeably missing is a way, when one chooses to delete/edit an entire series of a recurring event, to specify

1.  Delete this entire series, or
2.  Delete the highlighted event and all future events in the series, but leave previous ones intact.

I understand how, behind the scenes, the original series would have to have its end date adjusted to the date prior to the selected event, and then a new series would have to be created with the new recurring event data.

Are there plans to add this functionality to the current delete/edit recurring event dialog?  Or are there examples of how one would accomplish this?

Still loving the scheduler, and thanks in advance for any assistance with this.

Adam
Adam
Top achievements
Rank 1
 answered on 02 Feb 2015
2 answers
354 views
Hi,
I'm trying to configure my development site so that I can access it across the LAN. Firstly, my development environment is Windows 8.1, Visual Studio 2013 Premium, IIS Express, UI for ASP.NET MVC 2014.3.1119
 
The project is a templated MVC 4 internet application which targets .NET framework 4. After the wizard created the project I converted it using the Telerik convert project menu option.  I then changed the site to use Windows authentication and I disabled Anonymous authentication. I then added the binding for the ip address in the IIS applicationhost.config file and added the urlacl for everyone.

When the application is run, the application displays correctly when using the localhost address e.g. http://localhost:12335 

When I then browse to it using the IP address e.g. http://192.168.0.123:12335 the start page is displayed without any styling. In the browser console there are numerous 'Failed to load resource: the server responded with a status of 500 (Internal Server Error)' messages with the file name alongside e.g. http://192.168.0.123:1235/Scripts/jquery-1.8.2.js. The filenames seem to correspond to the links and scripts etc. in the _Layout.cshtml file.

I guess there is something else I need to (re)configure
What would you suggest?

Thanks
Craig
Craig
Top achievements
Rank 1
 answered on 30 Jan 2015
3 answers
120 views
Hi,
I think this is a general question regarding template syntax.

I am trying to define a grid column template in a child grid template so that it is rendered as an anchor  (which I want to later use to re-position in the page). For example : 
<a href="#Myref1234">Bookmark</a>


In the column's ClientTemplate I have

.ClientTemplate("<a href='\\#\\#=Reference\\#'>Bookmark</a>")

But the result is an Invalid template
<a href='##=Reference#'>Bookmark</a>


This template without the leading \\# is accpeted and produces valid HTML:
.ClientTemplate("<a href='\\#=Reference\\#'>Bookmark</a>")


What syntax should I use to allow me to prefix the href with the # ?

Or perhaps you can suggest another way to allow me to reposition on the page?

Thanks
Craig

 
Nikolay Rusev
Telerik team
 answered on 30 Jan 2015
1 answer
309 views
   public ActionResult Drzave_Create([DataSourceRequest]DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<DrzaveViewModel> drzave)
        {
            
                // Will keep the inserted entitites here. Used to return the result later.
                var entities = new List<Drzave>();
                if(ModelState.IsValid)
                {
                    using(var autoOtpad = new AutoOtpadEntities())
                    {
                        var product = new List<Drzave>();
                            foreach(var drzava in drzave)
                            {

                                // Create a new Product entity and set its properties from the posted ProductViewModel
                                var entity = new Drzave
                                {
                                    DrzavaId = drzava.DrzavaId,
                                    Naziv = drzava.Naziv,
                                    PuniNaziv = drzava.PuniNaziv  

                                };


                            }
                              // THIS IS NOT WORKING FOR ME...
                             var query = autoOtpad.Drzave.Where(x => x.Equals(product).ToList();

                             if (query != null)
                             {
                                  // row exists

                             }
                             else 
                             {
                                 // update DB// Add the entity
                                autoOtpad.Drzave.Add(entity);
                                // Store the entity for later use
                                entities.Add(entity);
                             }
                        // Insert the entities in the database
                         autoOtpad.SaveChanges();
                    }
                }
        
                // Return the inserted entities. The grid needs the generated ProductID. Also return any validation errors.
                return Json(entities.ToDataSourceResult(request, ModelState, drzava => new DrzaveViewModel
                {
                    DrzavaId = drzava.DrzavaId,
                    Naziv = drzava.Naziv,
                    PuniNaziv = drzava.PuniNaziv
                }));
        }  
    }




Petur Subev
Telerik team
 answered on 30 Jan 2015
3 answers
105 views
I had issue with paging controls hiding when in high contrast mode
Here is the issue posted http://www.telerik.com/forums/grid-in-high-contrast-mode#lnE4LqKUN0K5pUZ4hdAbdg

After the fix was, now i see different problem in a page which is using same grid with changes

When there are around 1000 records,  10 show up in each view, it shows the 10 page numbers - But in high contrast mode the background of paging control has all images taken from cdn.
Not sure, how this happens !!! Please suggest a fix.
Attaching snapshots.
Dimo
Telerik team
 answered on 29 Jan 2015
2 answers
180 views
Hello.  Newbie here.

I really need the track changes feature that is in the AJAX rad editor.  I understand that under the hood this really uses the DiffEngine class to generate the annotated difference between two strings.

I am using MVC, and I understand that using RadEditor is really only supported in non-mvc apps, but I am hoping to just use the DiffEngine and i will take care of rendering the resulting "difference" markup result.

I would like to know how i can use the diffengine class inside an mvc app. 



thanks,
jim
Jim
Top achievements
Rank 1
 answered on 28 Jan 2015
2 answers
1.1K+ views
Hi all,

I currently have a Grid view of rows with several properties. We have the ability to reuse components from a table and I wish to implement these feature using a dropdownlist (ideally that would show up only via inline editing). This DropDownList must be populated by a specific row's ID, so my approach is to create a custom template that will call the controller and passing the row's ID. Is it possible to call a custom template like in this Detail Template Demo?

http://demos.telerik.com/aspnet-mvc/grid/detailtemplate

Here is my HTML thus far,

@(Html.Kendo().Grid<LexViewModel>()
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.LEXId).Hidden(true);
        columns.Bound(p => p.LEXName).Title("Name");
        columns.Bound(p => p.LEXDescription).Title("Description");
        columns.Bound(p => p.ComponentName1).Title("Comp1");
        columns.Bound(p => p.ProximityTranche1).Title("Tranche 1");
        columns.Bound(p => p.ComponentName2).Title("Comp2");
        columns.Bound(p => p.ProximityTranche2).Title("Tranche 2");
        columns.Bound(p => p.ComponentName3).Title("Comp3");
        columns.Bound(p => p.ProximityTranche3).Title("Tranche 3");
        columns.Bound(p => p.ComponentName4).Title("Comp4");
        columns.Bound(p => p.LEXId).ClientTemplate("myDropDownCustomTemplate");
             
        columns.Bound(p => p.IsActive);
 
        columns.Command(cmd => cmd.Edit()).Title("Update");
    })
    .DataSource(dataSource => dataSource
        .Ajax()
        .Batch(true)
        .ServerOperation(false)
            .Events(events => events.Error("error_handler"))
            .Model(m =>
            {
                m.Id(p => p.LEXId);
                m.Field(p => p.LEXId).Editable(false);
                m.Field(p => p.LEXName);
                m.Field(p => p.LEXDescription);
                m.Field(p => p.AllComponents);
                m.Field(p => p.IsActive);
            })
            .Read(read => read.Action("Read", "Home"))
            .Update(update => update.Action("EditingCustom_LexUpdate", "Home"))
            )
    .Pageable()
    .Sortable()
    .Editable(ed => ed.Mode(GridEditMode.InLine))
    .Filterable()
    .Groupable()
)
 
<script id="myDropDownCustomTemplate" type="text/kendo-tmpl">
    @(Html.Kendo().DropDownList()
        .Name("ReuseableComponents")
        .SelectedIndex(0)
        .Items(items =>
        {
            //Call Controller and Popuplate Dropdown
            //    Based on LEXId
        })
        .ToClientTemplate()
    )
</script>
Alexander Popov
Telerik team
 answered on 28 Jan 2015
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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Wizard
Security
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
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?