Telerik Forums
UI for ASP.NET MVC Forum
1 answer
176 views
I have a basic MVC Kendo Grid using am Action as a DataSource with Ajax enabled.  I'd like to make the row clickable (no command buttons) to then open a hidden value which is a row specific MVC URL into a Jquery modal window.  My fundamental goal is to have a grid holding X number of rows, each row with a potentially custom URL used for editing data.  Can someone point me in the right direction?  thanks.
Daniel
Telerik team
 answered on 05 Sep 2013
2 answers
352 views
Hi,

I have a view with 4 kendo grids  (Version 2013.1.514 MVC complete) doing different functions for the user and I have a central mechanism to handle all errors from all the grids of the application.

Grid Configuration
@(Html.Kendo().Grid<NewAlta.DataCapture.DataModel.ParameterOverride>()
                   .Name("test")
                   .Columns(columns =>
                       {
                           columns.Bound(p => p.CustomerId).Hidden();
                           columns.ForeignKey(p => p.EquipmentId, (System.Collections.IEnumerable)ViewData["equipments"], "EquipmentId", "Description").Title("Equipment").EditorTemplateName("CustomerEquipmentId");
                           columns.ForeignKey(p => p.ParameterId, (System.Collections.IEnumerable)ViewData["parameters"], "ParameterId", "ParameterName").Title("Parameter").EditorTemplateName("ParameterId");
                           columns.Bound(p => p.Limit1).Width(100);
                           columns.Bound(p => p.Limit2).Width(200);
                           columns.Bound(p => p.Limit3).Width(200);
                           columns.Bound(p => p.Limit4).Width(100);
                           columns.Command(p => p.Edit()).Width(80);
                       })
                   .ToolBar(toolbar => toolbar.Create())
                   .Editable(editable => editable.Mode(GridEditMode.InLine))
                   .AutoBind(false)
                  // .Navigatable(builder => builder.Enabled(true))
                   .Events(events =>
                       {
                           events.Change("test");
                           events.Edit("test");
                           events.Save("test");
                       })
                   .Selectable(builder => builder.Mode(GridSelectionMode.Single))                  
                   .DataSource(dataSource => dataSource
                                                 .Ajax()
                                                 .ServerOperation(false)
                                                 .Events(e => e.Error("errorHandler"))
// omitted for brevity
Error Handler
<script type="text/javascript">
    function errorHandler(e) {
        gridErrorHandler(e, "#test");
    }
 
 
//The below function lies in some js include files.
function gridErrorHandler(args, gridId) {
    if (args.errors) {
        var message = "We have encountered following errors : \n <ul>";
        $.each(args.errors, function (key, value) {
            if ('errors' in value) {
                $.each(value.errors, function () {
                    //alert(this);
                    if (this != "" && this != null)
                        message += "<li>" + this + "</li> \n ";
                });
                message += "</ul>";
            }
        });
        var kgrid = $(gridId).data("kendoGrid");
     
         
        kgrid.one('dataBinding', function (e) { //==> if we have only one grid in the view this works. for mutiple grids in view it does not trigger
            e.preventDefault();   // cancel grid rebind if error occurs 
        });
         
        showAlertWindow(message); //==> Some other function used to show kendo window with errror messages.
        
    }
}
</script>
I could verify that the kgrid is object but databinding event is not triggered in a view with multiple grids.

Any help is highly appreciated!!!

Thanks,
Petur Subev
Telerik team
 answered on 05 Sep 2013
2 answers
1.7K+ views
Hello,

I am wondering how I can get the total rowcount while inside the ondatabound event ?   

Here is the background of why I am looking for this info.   I am trying to code in a row cap lets say of 250 records which will be done in the controller.  However I have a requirement that if the query was capped I need to offer the user an option to view all the rows.   Basically implementing an alert to the user that they ran a query that returns a large set of data.   At first they will only get the 250 rows but they are given an option to return all rows like a button or something which would rebind the grid and grab all rows from the controller.

I am sending a parameter in the Action call to bind that specifies whether or not to show all records, but I need to figure out how to get a row count so I know if the initial databind hit the cap. 

Here is my code:
@(Html.Kendo().Grid(Model)   
    .Name("Grid")
    .HtmlAttributes(new { style = "font-size:.85em;" })
    .Columns(columns =>
    {
        columns.Bound(p => p.Id).Width(60);
        columns.Bound(p => p.Title).Width(250);
        columns.Bound(p => p.AssignedUser).Width(120);
        })
    .Pageable()
    .Groupable()
    .Sortable()
    .Filterable(filterable => filterable
      .Extra(false)
      .Operators(operators => operators
                          .ForString(str => str.Clear()
                          .StartsWith("Starts with")
                          .Contains("Contains")
                          .IsEqualTo("Is equal to")
                          .IsNotEqualTo("Is not equal to")))
      )
   .Selectable(selectable => selectable
      .Mode(GridSelectionMode.Single))
   .DataSource(dataSource => dataSource
               .Ajax()
               .Read(read => read.Action("Get", "Grid", new {showAll = ViewBag.ShowAll}))
               )
   .Events(e => e.Change("onChanged").DataBound("onDataBound"))
)
Carrie
Top achievements
Rank 1
 answered on 05 Sep 2013
1 answer
432 views
I have two model.
When I want to display a list of Product in grid, if PurchaseInvoiceDetail have records, Product grid show empty list,
and when i delete PurchaseInvoiceDetail records, Product's grid display list of product.
(I use Editing_Popup grid)
public class Product
    {
        [Key]
        [ScaffoldColumn(false)]
        public int ProductId { get; set; }       
        public string Name { get; set; }
        public int Number { get; set; }
 
        public virtual ICollection<PurchaseInvoiceDetail> PurchaseInvoiceDetail { get; set; }
    }
 
public class PurchaseInvoiceDetail
    {
        [Key]
        public int PurchaseInvoiceDetailId { get; set; }
        public int Number { get; set; }
        public decimal PurchasePrice { get; set; }
 
        //Navigation Properties
 
        public int ProductId { get; set; }
        public virtual Product Product { get; set; }
    }
Dimiter Madjarov
Telerik team
 answered on 05 Sep 2013
2 answers
128 views
So if have a chart that represent data over a period of time like current fiscal quarter, that date would be from beginning of July through end of September. So the chart would draw a period of time ranging those 3 months. However, if the most recent data goes until current day minus one, the series drawn on the chart dips down to "0". What I am after with modifying some existing code is for when the series is drawn, it stops drawing the series (for a line chart) at today(-1) and does not make the series (line) go further where no data is yet represented since it is in the future. This said, I hope I was descriptive enough and am hoping some of you could post some examples I could reference that does draw a chart over coarse of time with the series not going the full span of time. Could not find any particular documentation on this. Appreciate the help. Thanks much.
Iliana Dyankova
Telerik team
 answered on 05 Sep 2013
3 answers
104 views
Previously, I added an icon and a title to my mobile app like this: 

window.app = new kendo.mobile.Application(document.body, {
    layout: "mainLayout",
    skin: "flat",
    hideAddressBar: true,
    icon: "Images/FileName.png",
    title: "App Name"
});
Whereas now, I can't seem to figure out how to do this. Any suggestions? :)
Alexander Valchev
Telerik team
 answered on 05 Sep 2013
1 answer
105 views
Hi,
I am using the Asp.Net Mvc Wrapper for the scheduler control. I noticed that if I specify an editor template, the delete confirmation message does no longer appear:

To clarify, with this declaration the confirmation message does not appear:

.Editable(e => { 
 e.TemplateId("editEventTemplate");
e.Confirmation(true);
 }) 

If I remove all the "Editable" configuration or if I leave just the Confirmation part, it works correctly:

.Editable(e => { 
e.Confirmation(true);
 }) 

What could be the reason for this strange behaviour?
Thanks,
Stefano Tassara
Vladimir Iliev
Telerik team
 answered on 05 Sep 2013
9 answers
2.3K+ views
Hello!
I always get Error: GET ~/Scripts/kendo/2013.1.703/jquery.min.map 404 (Not Found)
I update Kendo to Q2 , but this error dosn't disappear
Atanas Korchev
Telerik team
 answered on 05 Sep 2013
1 answer
95 views
It seems like the objects are not being passed into listview editor templates at all now.

Latest internal build 2013.2.830.commercial
iCognition
Top achievements
Rank 1
Iron
 answered on 04 Sep 2013
10 answers
98 views
Hello,

there is a new exclusive IE8 bug in the 2013 Q2 release  which is easily reproduceable with the Online Kendo Demos.

If you change the "Font" Drop-Down (e.g: Heading 1, Heading 2), a javascript error occurs in "kendo.web.js":
Object doesn't support property or method 'indexOf'

Can you please put the fix in the next Internal Build.


Uriah
Top achievements
Rank 1
 answered on 04 Sep 2013
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
Security
ColorPicker
DateRangePicker
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
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?