Telerik Forums
Kendo UI for jQuery Forum
1 answer
845 views

Hi, i try to use grid in angularjs application.

I defined angular controller like this:

function _controller($scope, gridData) {
        var vm = this;
    ... some code ...
        
        var dataSource = new kendo.data.DataSource({
            data: gridData,
            pageSize: 20,
        });

        vm.onChange = function (data, dataItem, columns) {
            console.log(data);
            console.log(dataItem);
            console.log(columns);
        }

        dataSource.read();
                
        vm.gridOptions = {
            columns: gridColumns,
            selectable: "row",
            editable: false,
            pageable: true,
            dataSource: dataSource
        };

        // private functions
        function _handleChange(e) {
            console.log(e);
        };
    }

Konstantin Dikov
Telerik team
 answered on 11 Mar 2016
4 answers
823 views

So I was playing around with KendoUI and incorporated Dynamic LINQ Helpers in my ASP.NET MVC project. I followed the small tutorial here.
So far, the paging and sorting is working fine but the filtering is not working. Every time I try to filter my records, there is an exception on server side like the following
Operator '=' incompatible with operand types 'String' and 'String[]'
Can anyone help me with this?
Here is my Grid code (yes I am using Angular)

 

$scope.mainGridOptions = {
            dataSource: {
                transport: {
                    read: {
                        url: ConfigData.BaseUrl + "ChartOfAccounts/GetData",
                        type: 'post',
                        dataType: "json"
                    },
                    update: {
                        url: ConfigData.BaseUrl + "ChartOfAccounts/UpdateData",
                        type: "post",
                        dataType: 'json'
                    },
                    create: {
                        url: ConfigData.BaseUrl + "ChartOfAccounts/CreateData",
                        type: "post",
                        dataType: 'json'
                    },
                    destroy: {
                        url: ConfigData.BaseUrl + "ChartOfAccounts/DeleteData",
                        type: "post",
                        dataType: 'json'
                    }
                },
                serverPaging: true,
                serverFiltering: true,
                serverSorting: true,
                pageSize: 5,
                batch: true,
                schema: {
                    data: "Data",
                    total: "Total",
                    model: {
                        id: "ID",
                        fields: {
                            ID: { type: "number" },
                            AccountNumber: { type: "string" },
                            AccountName: { type: "string" }                               
                        }
                    }
                }
 
            },
            columns: [
                { field: "AccountNumber", title: "Account Number", width: "130px" },
                { field: "AccountName", title: "Account Name", width: "130px" }
            ]
 
        };
    

Daniel
Telerik team
 answered on 11 Mar 2016
1 answer
661 views

Hey there, making a dashboard with draggable widgets.  There are specific drop zones on each page to keep it organized.  Only 1 widget is allowed into a drop zone at a time, so if someone drags a widget onto another one, the widget that is already in the drop zone needs moved to an open drop zone.  I have this functionality working with some custom code, but for whatever reason the draggable object loses its dragginess after I manually move it.  I'm guessing this is expected behavior because KendoUI doesn't know I move it.

UPDATE:

- Ok I solved my Issue, by resetting my draggable objects after each drop.  But I wanted to still post the question to make sure that this is how it is supposed to be done, and I'm not just missing a built in way to do this?

for reference, in my onDrop method (simplified) I do this:

// save drop target data to move manually
var html = e.dropTarget.clone();
 
//find an available empty drop zone to place it....
...
$("#myEmptyDropZone").html(html);
 
//Drop in my draggable item i was dragging
e.dropTarget.html(e.draggable.element);
 
// refresh all draggables because now both draggable items don't work
    CreateDraggableWidgets();
 
 
 
// my create draggable items function
    function CreateDraggableWidgets() {
        //create draggable items within the container
        $(".draggable-item").kendoDraggable({
            filter: ".drag-handle",
            hint: function (element) {
                var width = element.parent().width();
                var hint = element.closest(".draggable-item").clone();
                hint.css("width", width);
                return hint;
            },
            cursorOffset: { top: 7, left: 2 }
        });
    }

 

 

 

 

Daniel
Telerik team
 answered on 11 Mar 2016
6 answers
893 views

Hi,

when opening nested modal windows, the overlay flashes quite fireworkish since the overlay's background-color changes abruptly from dark to light before being animated back to a dark.

I found an example dojo: http://dojo.telerik.com/@naskog/AhIQI

Is there any way to avoid this? Does Kendo UI keep track of the nesting level of modal windows, so it could behave differently for modal windows at deeper levels? I wouldn't mind if the overlay would be applied only to the first modal, just to get rid of the flashing.

Regards

Kasimier Buchcik

Casimodo
Top achievements
Rank 1
 answered on 10 Mar 2016
2 answers
119 views

If i place a kendo grid with a detail template inside of an AngularJS ng-switch directive there seems to be an issue in how Kendo renders the grid detail.  Specifically it shows up as plain html controls above the grid the first time the div containing the grid is shown via ng-switch.  See the example in the link:

 

http://dojo.telerik.com/IjAvI

Scott
Top achievements
Rank 1
 answered on 10 Mar 2016
2 answers
1.3K+ views

Hi,

I'm having an issue with the row highlighting on hover when using locked columns. When hovering over a row in the unlocked section of the grid, only the unlocked columns get highlighted. When hovering over a row in the locked section, only the locked sections get highlighted.

I know this is because column locking actually creates two separate grids.

How can I get the entire row (locked and unlocked) to highlight when I'm hovering over a row?

Thanks,

Ian

Ian
Top achievements
Rank 1
 answered on 10 Mar 2016
1 answer
110 views

Globalization example in Kendo UI Web framework at following link http://demos.telerik.com/kendo-ui/globalization/index

This example only changes control culture and changes values format. Any working example for validation and field label change based on culture?

My application will have multiple language support so I will have to change field labels and validation based on language. Any help, suggestion or working example would be appreciated.

 

Dimo
Telerik team
 answered on 10 Mar 2016
4 answers
196 views
Is there a way to define the create/update properties of the transport object as functions when using oData?
Right now I'm allways getting Uncaught Error: Only json dataType can be used for create operation.
Alexander Popov
Telerik team
 answered on 10 Mar 2016
1 answer
126 views

I'm new to Kendo UI.

I'm looking for suggestion/help to implement Globalization support for my application

Globalization example in Kendo UI Web framework at following link http://demos.telerik.com/kendo-ui/globalization/index

This example only changes control culture and changes values format. Any working example for validation and field label change based on culture?
My application will have multiple language support so I will have to change field labels and validation based on language. Any help, suggestion or working example would be appreciated.

Dimo
Telerik team
 answered on 10 Mar 2016
2 answers
5.5K+ views

Hello,

This is my first Kendo UI application. I am trying to create a simple project where it gets data from database and binds it to grid. There are about 350k records I am retrieving from the database. However, the data is not displayed/bind to the grid. I can see the data is being retrieved from database to the calling method but not sure why its unable to bind. I am not sure if its problem returning Json response or something else. Below is the code.

@{
    ViewBag.Title = "Home Page";
}
 
<div class="container-fluid">
    <div class="row">
        <div class="col-xs-18 col-md-12">
            <div id="grid"></div>
        </div>
    </div>
</div>
<script>
    $(document).ready(function () {
 
        $(".textButton").kendoButton();
 
        $("#grid").kendoGrid({
            dataSource: {
                type: "aspnetmvc-ajax",
                transport: {
                    read: {
                        url: "Read"
                    }
                },
                schema: {
                    data: "Data",
                    model: {
                        id: "Id",
                        fields: {
                            "UserName": { type: "string" },
                            "Application": { type: "string" },
                            "Environment": { type: "string" },
                            "LoginTime": { type: "date" },
                            "IsSuccess": { type: "boolean" },
                            "IP": { type: "string" },
                            "Source": { type: "string" }
                        }
                    }
                },
                pageSize: 20,
                serverPaging: true,
                serverSorting: true,
                serverSorting: true,
            },
            height: 550,
            filterable: true,
            sortable: true,
            pageable: true,
            columns: [{ field: "UserName",title: "User Name" },
                { field: "Application"},
                { field: "Environment"},
                { field: "LoginTime", title: "Login Time" },
                { field: "IsSuccess"},
                { field: "IP" },
                { field: "Source" }
            ]
        });
    });
</script>

public ActionResult Read([DataSourceRequest]DataSourceRequest request)
       {
           IQueryable<Login> logins = db.Logins;
 
           DataSourceResult result = logins.ToDataSourceResult(request, c => new Models.Logins
           {
               Id = c.Id,
               UserName = c.UserName,
               Application = c.Application,
               Environment = c.Environment,
               LoginTime = c.LoginTime,
               IsSuccess = c.IsSuccess,
               IP = c.IP,
               Source = c.Source
           });
 
           return Json(result);
       }

Thanks!

Viktor Tachev
Telerik team
 answered on 10 Mar 2016
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
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?