Telerik Forums
UI for ASP.NET MVC Forum
1 answer
145 views
When creating a new entry in listview and deciding to cancel the creation, the entry is removed from listview, but I have problems to get first item selected after that.
The cancel event seems to have a timing problem.
Here is my ListView:
@(Html.Kendo()
             .ListView(Model)
             .Name("lstvPermissionGroup")
             .TagName("div")
             .ClientTemplateId("permissionGroupTemplate")
             .ClientAltTemplateId("permissionGroupTemplate")
             .Editable()
             .DataSource(ds => ds 
                 .Model(model =>
                 {
                     model.Id("Id");
                     model.Field(f => f.CompanyId).DefaultValue(@Model.First().CompanyId);
                 }) 
                 
                 .Create(create => create.Action("PermissionGroupCreate", "User"))
                 .Update(update => update.Action("PermissionGroupUpdate", "User"))
                 .Read(read => read.Action("PermissionGroups", "User").Data("additionalData") )
                 .Destroy(destroy => destroy.Action("PermissionGroupDelete", "User"))
                 .Events(e =>
                 {
                     e.RequestEnd("onRequestEnd");
                     e.Error("onError");
                 })
             )
             .Selectable()
             .Events(ev =>
             {
                 ev.Change("onChange");
                 ev.Cancel("onCancel");
             })
             )


and that is my cancel event:

function onCancel(e) {
      var listView = $('#lstvPermissionGroup').data('kendoListView');
       listView.select(listView.element.children().first());
      
   }
Nikolay Rusev
Telerik team
 answered on 16 Jan 2015
6 answers
260 views
Based on your documentation example (http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/grid/editor-templates), I replaced the DropDownList by a ComboBox element, used it with an editable Grid displaying orders and tried to achieve following scenario:
-when I add a new Order, I want the Grid to switch in inline edit mode with ComboBox having no item selected (means displaying Placeholder text)
-use of client validation to ensure that an Employee has been selected in the ComboBox

I ran in 2 issues:
-If I did not set a DefaultValue for my model field in the View I got an error saying that "employee is not defined". So I set a DefaultValue with a new instance of Employee. But it affected my Combobox comportment by displaying a "0" (because EmployeeID in new instance of Employee was not set and is a type of int)
-I was unable to set client validation by using annotation in Order model for Employee property, because dat-val-* was not added to Combobox element (worked fine for other element like textbox)

So, what am I doing wrong? What am I missing? Please provide sample code.

Thanks
Alain
Alain
Top achievements
Rank 1
 answered on 15 Jan 2015
1 answer
195 views
I have created a kendo grid and have added three commands. For each command I have applied a tooltip (with Kendo.Tooltip). The toolstips work fine, but if I move slowly with the mouse over the three buttons the tooltips stay (they don't go away). Only when I click outside of the grid the tooltips disappear.
I am using the latest build. On the attached screenshot you can see three toolstips overlapping each other.
Iliana Dyankova
Telerik team
 answered on 15 Jan 2015
13 answers
1.9K+ views
Hello,

Is there any way to bind my grid with all my data at the server side and manipulate it at the client side without making any posts(paging, sorting, etc)?

Thanks in advance,
Dzmitry
Rosen
Telerik team
 answered on 15 Jan 2015
1 answer
593 views
We already implemented partial solution for scheduling events with resource view using jQuery full calendar control(screen shot of the application attached). but since we start to use Kendo UI controls in our project(we have commercial license for Telerik products), we are planning to develop kendo schedular with resource view according to our requirements(features are exactly same in the image attached). i already started to develop the application using kendo controls(screen shot of the application attached) unfortunately i'm struggling to modify functionalities given by telerik under these circumstances:

1. Kendo UI Schedular having resource view with Kendo schedular as a grouping feature...it seems like a tree structure...i need to modify resources as a grid structure as mentioned earlier in the screen shot...
2. I don't want time slots,days enough for our requirements
3. i have too many resources and many events as well, i want to paginate both resources and events

Please give me solution for above mentioned issues and open a way to continue this module using kendo ui controls...
Thank you in advance
Vladimir Iliev
Telerik team
 answered on 15 Jan 2015
1 answer
113 views
I know this is really odd, but I'd like to please a big customer without a lot of custom code.  We are using UI for ASP.NET MVC 2014.3.1119 in an MVC project.  One of the views displays a horizontal bar chart.  We have just added export to PDF on all to all views (not Telerik, but another commercial product).  The trouble comes when sending this view to PDF - when there are many bars, the chart is split across multiple pages.  Due to some formatting, optional text and such on the view, etc. sometimes it paginates neatly between bars but most often it splits a bar across two pages.

Obviously, this issue exists whether I print from the browser, or use any capture tool (local or server PDF).

I'm just wondering if anyone has encountered this and done some clever math with the gaps and spaces based on actual plot size (not sure how to get that) versus the page size (less margins). 

If I have to write code for this math, can I rely on getting the same figures from the Telerik objects for all browsers or are there going to be differences I would have to account for?

Best,
Scott
T. Tsonev
Telerik team
 answered on 15 Jan 2015
1 answer
145 views
I am trying to set the time of a date picker to 1 hour later but keep getting an error, (only when adding hour)
Date.prototype.addHours = function (h) {
    this.setTime(this.getTime() + (h * 60 * 60 * 1000));
    return this;
}   
 
var d = new Date(e.event.start)
            d.addHours(1)
            $("#endx").kendoDateTimePicker({
                value: d
            });

I keep getting an error here in kendo.all.js line 1477
if (value && value.indexOf("/D") === 0) {
Where value is a number, and does not support indexOf

Thanks
​
Alan Mosley
Top achievements
Rank 1
 answered on 14 Jan 2015
10 answers
169 views
When one uses columnmenu to hide some columns and then changes the order of columns above mentioned get messed up (reordering of data occurs independently from headers).

I have recreated this unwanted behavior with your demos @http://demos.telerik.com/aspnet-mvc/grid/frozen-columns.

Rosen
Telerik team
 answered on 14 Jan 2015
1 answer
186 views
Hi all,
I have a grid with a couple of columns with a ClientGroupHeaderTemplate set.
If the columns are visible, then ExportToExcel command works properly, but when I try to hide these columns ( .Hidden(true) ), exporting resets the header defined by me and shows the default one (Column name: value) in the exported file.
How can I show the ClientGroupHeaderTemplate if I want these columns hidden?
Atanas Korchev
Telerik team
 answered on 14 Jan 2015
1 answer
277 views
Hi 

I am using Telerik(Product Version 2012.3.1018.340) MVC grid for my project. When I am setting initial Sort configuration with multiple columns, It have an issue with individual column sorting. The individual column sorting is not at all working in my grid

It is working fine if I didn't set initial sort order (ie, if i give just ".sortable()"). But i want to set initial sort order also individual column sort order functionality

I tried with operation mode is client. Then for one time the sorting is happening only for anyone column which we clicked first. Next time when we try to click on any other column to sort it won't work. 

I used the following code in my project, please help me to tackle this issue

view
------

Html.Telerik().Grid<MyApplication.MainApplication.Models.ApplicationModel.ApplicationViewModel>().Name("Grid1")
            .Columns(col =>
            {
                col.Bound(c => c.UserID).ClientTemplate(
                    "<a href='" + Url.Content("~/Index/Details/") + "<#= UserID #>' title='Details' class='lnkDetails'><#= Number #></a>"
                    ).Title("Number").Filterable(false);
                col.Bound(c => c.FirtName).Filterable(false);
                col.Bound(c => c.LastName).Filterable(false);
                col.Bound(c => c.RID).Hidden();
                col.Bound(c => c.Active).Filterable(false).ClientTemplate(
                    "<input type='checkbox'" + "<#= Active?\"checked\":\"\" #>" + " OnClick='return false' />"
                    ).Width(115);
                col.Bound(c => c.StartDate).Filterable(false).Format("{0:d}").Width(115);
                col.Bound(c => c.CloseDate).Filterable(false).Format("{0:d}").Width(112);
                if (currentUser.AdminRole && (currentUser.DataRole || currentUser.StaffRole))
                {
                    col.Bound(c => c.ID).ClientTemplate(
                            "<a href='" + Url.Content("~/Controller/Create/") + "<#= UserID #>' title='New Contact' class='edit'>New Contact</a>"
                            + "<a href='" + Url.Content("~/Controller/Details/") + "<#= UserID #>' title='Details' class='details action-margin'>Edit</a>"
                            + "<a href='" + Url.Content("~/Controller/Delete/") + "<#= UserID #>' title='Delete' class='delete action-margin'>Delete</a>"
                        ).Title("Action").Filterable(false).Sortable(false).Width(90);
                }
                else if(currentUser.AdminRole)
                {
                    col.Bound(c => c.UserID).ClientTemplate(
                            "<a href='" + Url.Content("~/Controller/Details/") + "<#= UserID #>' title='Details' class='details'>Edit</a>"
                            + "<a href='" + Url.Content("~/Controller/Delete/") + "<#= UserID #>' title='Delete' class='delete action-margin'>Delete</a>"
                        ).Title("Action").Filterable(false).Sortable(false).Width(90);
                }              
                else
                {
                    col.Bound(c => c.UserID).ClientTemplate(
                            "<a href='" + Url.Content("~/Controller/Details/") + "<#= UserID #>' title='Details' class='details action-margin'>Edit</a>"
                        ).Title("Action").Filterable(false).Sortable(false).Width(75);
                }
            })
 
                 .DataBinding(dataBinding => dataBinding.Ajax().Select("_Index", "Controller"))                
                 .Pageable(p => p.PageSize(30))                              
                 .Filterable(f => f.Filters(filters =>
                 {
                     filters.Add(c => c.Number).StartsWith((string)ViewData["Number"]);
                     filters.Add(c => c.FirstName).StartsWith((string)ViewData["FirstName"]);
                     filters.Add(c => c.LastName).StartsWith((string)ViewData["LastName"]);
                 }))
                 .Sortable(sorting => sorting
                        .Enabled(false)
                        .SortMode(GrUserIDSortMode.MultipleColumn)
                        .OrderBy(sortOrder =>
                        {
                            sortOrder.Add(o => o.Number);
                            sortOrder.Add(o => o.FirstName);
                            sortOrder.Add(o => o.LastName);                           
                            sortOrder.Add(o => o.Active);
                            sortOrder.Add(o => o.StartDate).Descending();
                            sortOrder.Add(o => o.CloseDate).Descending();
                            sortOrder.Add(o => o.UserID);
                        }))
                .Render();

controller
----------

[GridAction]
public ActionResult _Index()
{
    return View(new GridModel<UserViewModel>
    {
        Data = GetCases().ToList()
    });
}
Rosen
Telerik team
 answered on 14 Jan 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
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
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
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
DateTimePicker
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
+? 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?