Telerik Forums
Kendo UI for jQuery Forum
10 answers
3.2K+ views
Hi!

I am using a function to change a grids datasource, but it seems that after attaching the new datasource and refreshing, the paging elements do not refresh/adjust to the new datasource?

Does anyone have an idea?

The code i use:

var setGridDataSource = function(type) {
    if(typeof type != 'string') type = $('#showGridType').val();
    console.info("changed grid type to: " + type);
    // create datasource
    var dataSource = new kendo.data.DataSource({
        transport: { read:  { url: dataSourceUrls[type], dataType: "json" } },
        pageSize: 10,
        change: function() {
            participantGrid.refresh();
        },
        schema: { model: { id: "id", fields: gridFieldsParticipant } }
    });
 
    participantGrid.dataSource = dataSource;
    participantGrid.dataSource.read();
}
Gainsight
Top achievements
Rank 1
 answered on 12 Feb 2019
5 answers
361 views

I'm trying to prevent back on firefox by preventing event.

It is not working properly. Page stays where it was, but  change event is still fired and page is still rerouted behind to the same one.

It cause loosing whole page state. because even if url stays the same page was reloaded.

Ivan Danchev
Telerik team
 answered on 12 Feb 2019
1 answer
79 views

I would like to upgrade but at this point it is not possible. What I want to do is have a grid show up as initially collapsed so I have

       static onDataGridBound(e) {
            var grid = e.sender;
            $(".k-grouping-row").each(function (e) {
                grid.collapseGroup(this);
            });
      }

This works just fine.

 Then I want to be notified when one of the groupings are expanded so some of the column text is not duplicated so I changed it to

       static onDataGridBound(e) {

            var grid = e.sender;
            $(".k-grouping-row").each(function (e) {
                grid.collapseGroup(this);
                // While waiting for groupExpand
                $("a:first",this).on("mousedown", Gartner.GlobalAgendaTabGrid.grid_detailExpand);
            });
      }

This works partially in that the function grid_detailExpand gets called when I expand but the group doesn't get expanded. What am I doing wrong?

Thank you.

Kevin

 

Tsvetina
Telerik team
 answered on 12 Feb 2019
6 answers
1.6K+ views

Hello,
I'm new to this, so this might be a simple answer, but I could for the life of me not locate it.

The page I am working on has a kendoDropDownList that work fine

       kendo.syncReady(function () { jQuery("#type").kendoDropDownList({ "dataSource": { "transport": { "read": { "url": "https://my-URL.COM", "data": getID }, "prefix": "" }, "schema": { "errors": "Errors" } }, "dataTextField": "tcode", "height": 300, "dataValueField": "tid" }); });

I then have some javascript that displays the data

        var getType = $("#type").val();
        console.log(getType);

What I now need is this to return 2x dataValueField . I've tried

        <script>
        kendo.syncReady(function () { jQuery("#type").kendoDropDownList({ "dataSource": { "transpormet": { "read": { "url": "https://my-URL.COM", "data": getID }, "prefix": "" }, "schema": { "errors": "Errors" } }, "dataTextField": "tcode", "height": 300, "dataValueField": "tid" }); });
        kendo.syncReady(function () { jQuery("#name").kendoDropDownList({ "dataSource": { "transport": { "read": { "url": "https://my-URL.COM", "data": getID }, "prefix": "" }, "schema": { "errors": "Errors" } }, "dataTextField": "tcode", "height": 300, "dataValueField": "ta" }); });
        </script>

with the javascript reading

        var getType = $("#type").val();
        console.log(getType);
        var getName= $("#name").val();
        console.log(e);

But getName is "undefined", so, I assume, the second JQuery is not being run.
What's the best way to a second value using the same dropdownlist selection?
ThanK you


Gerald
Top achievements
Rank 1
Iron
Iron
 answered on 12 Feb 2019
2 answers
337 views

Hello,

I apologize if this isn't the correct place for this question, but wasn't sure how else to get help with it.

We are using Kendo.Mvc.Dll with our web page and we are running into some issue.  We are receiving errors on two of our pages and can't figure out why it is failing.  The following is the situation:

Web page deployed to machine -> Can't access the two pages, get the attached two errors (1 for each page) on any machine that access the website.
We have two developer computers that can get the error when debugging the solution.
We have two other developer computers that can NOT get the error when debugging the solution and the pages work fine with the grid.

Could anyone provide any direction/support on what may be the cause?  I've check to make sure all the relevant stuff is installed on the machine and it appears that there isn't anything missing that I can tell between a working and non-working computer.

We are using Kendo.Mvc.dll - 2014.2.903.340 -> Kendo Web Extensions for ASP.NET MVC

Thank you!

Justin
Top achievements
Rank 1
 answered on 11 Feb 2019
10 answers
2.7K+ views
Hello, I am using the Kendo MVC Grid and would like to know how to refresh the grid server-side after one of the AJAX row operations such as Destroy, Update, or Create. The reason for this is I have my columns "ranked" let's say from 0 to 100. A user can update the row that is ranked 100 to 3 and all items in between must be re-ranked to account for the update. This works fine server-side, but the client does not actually rebind. Is there a javascript method that I can run after the AJAX operation succeeds similar to the "Error" method used to trap and show AJAX errors?

Thank you as always,

Scott
Alex Hajigeorgieva
Telerik team
 answered on 11 Feb 2019
6 answers
245 views
Presently, the draggable zone is on the entire node. It would be nice to have the possibility to specify a dragging element in the node instead. You can see the dragging icon on my screenshot.

The initialization of the control could be something like that with the dragFilter option:

$("#categories-treeview").kendoTreeView({
    dragAndDrop: true,
    dragFilter: ".drag-handler"
});


This feature would answer some requested feature here:

I already have the solution working on my side and I can give it to Telerik anytime. This is as simple as 3-4 lines of code added to the TreeView control. I think it could be a great addition to the control.

Dimitar
Telerik team
 answered on 11 Feb 2019
2 answers
406 views

I have a grid that displays steps in a process.  The users are allowed to move rows up or down, reordering the steps.  If that happens a jquery method is called that updated the sequence numbers on each row.  The sequence numbers are stored with the data in the database so at the end of this process, the sync() method is called.  All works as expected except that as the Update method is called for each of the rows that was updated, the Destroy method will be called for one of the rows and the row is deleted from the database:

function resequence(grid) {
    for (var i = 0; i < grid.dataSource.data().length; i++) {
            grid.dataSource.data()[i].ActionSequenceNum = i + 1;
            grid.dataSource.data()[i].dirty = true;
        }
        grid.dataSource.sync();
}

 

I can't seem to figure out why one row is also triggering the Destroy method.

Charlie
Top achievements
Rank 1
 answered on 11 Feb 2019
5 answers
162 views

I have a spreadsheet with the first 2 columns frozen.

 

I want to hide the non-frozen columns but when I do this the first column A is repeated in the non-frozen column section.

See the example dojo and image attached - click the "Hide non frozen columns" button to see the problem

 

Thanks

Tony

Veselin Tsvetanov
Telerik team
 answered on 11 Feb 2019
5 answers
1.1K+ views

Hi team,

 

The noDataTemplate configuration option defaults to string "NO DATA FOUND."

It seems this is not localized in kendo.message.xx-XX.js

 

Please advise.

 

Best regards.

Alex Hajigeorgieva
Telerik team
 answered on 11 Feb 2019
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
Drag and Drop
Map
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
Licensing
ScrollView
Switch
TextArea
BulletChart
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
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?