Telerik Forums
Kendo UI for jQuery Forum
7 answers
302 views

I would like to confirm if anybody has gotten this behavior with server grouping and virtual scroll bar enabled. 

When I used the scroll bar to drag down half the page, the grid fires off a take and skip post request to my server and gets returned some groups. But when I use the scroll bar from here, the last request two requests (and sometime other requests) get fired off consecutively without completion almost like on a infinite loop. The developer console in the browser logs an never ending repeat of two previous (or current) requests over and over again. Sometimes when sing the scroll wheel after paginating the server grouping, will trigger off a constant stream requests.

I have included my grid settings below. 

var grid = $('#kendo-table').kendoGrid({
  dataSource: {
  type: "json",
  serverPaging: true,
  serverSorting: true,
  serverFiltering: true,
  serverGrouping: true,
  pageSize: 10000,
  schema:schema,
  transport: {
    // "Posting sorting parameters to back end"
    read: {
      type: "POST",
      url: restApiHost,
      contentType: "application/json",
      beforeSend: _beforeSendXHRModifier,
      data:{
        // this is custom, it defines the raw report we show
        targetTable:targetTable
      }
    },
    parameterMap:function(data,type){
      if(type === "read"){
        // maps data to the post request, things that are mapped are like: pageSize, skip, take, ect
        console.log("paramterMap on: ");
        console.log(data);
        return kendo.stringify(data);
      }
    }
  }, 
},
  height: height,
  scrollable: {
      virtual: true
  },
  pageable:{
    refresh: true,
    previousNext: false,
    numeric:false,
    messages: {
      display: "Loaded {0}-{1} from virtualizing {2} data items"
    }
  },
  groupable: true,
  sortable: true,
  selectable:'multiple cell',
  reorderable:true,
  resizable:true,
  columns: columns,
  filterable: true,
  filterMenuInit: _onFilterMenuInit,
}).data("kendoGrid");
 
grid.bind('dataBound',function(e){
  console.log("dataBoundEvent without new grid instance");
  var gridDataSource = e.sender.dataSource;
  if (gridDataSource.group().length > 0) {
      //the grid is grouped
      $("#kendo-table").find(".k-icon.k-i-collapse").trigger("click");
      console.log('Lets start grouping, expanding will trigger ajax call on elements of this group');
  }
});

Nikolay Rusev
Telerik team
 answered on 12 Aug 2015
1 answer
1.3K+ views

The following examples fails to run

http://dojo.telerik.com/UXOyu/2

when I add children to items using push.

 If I use a static object like

            data: [{
                name: "Tree",
                value: 5,
              items:[
                {
                  name:"Leaf 1"
                  value:3
                },
                {
                  name:"Leaf 2"
                  value:2
                }
                ]
            }],

 It works fine.

What am I missing?

 

Thanks.

 

 

 

 

Alexander Popov
Telerik team
 answered on 12 Aug 2015
1 answer
134 views

On a Kendo Grid, let's say the user sorted on a column in a grid. Then the software programmatically added more records. Is there a way to programmatically tell tell the Grid "Whatever your sort parameters were, use those same parameters and sort again."?

Just redrawing the Grid would be painful, as the existing sorting parameters would be lost.

Thanks,

 Steve

Alexander Popov
Telerik team
 answered on 12 Aug 2015
5 answers
386 views

Is it possible to hide the row-, coulmn and measure list in the PivotConfigurator? or in other words: Is it possible to only show the field list?

Sebastian
Top achievements
Rank 1
 answered on 12 Aug 2015
4 answers
164 views

You demos are all set to a max displaysize of 1023 px by below lines:

 @media screen and (max-width: 1023px) {#pivotgrid,#configurator { display: none;}}

On your release webinar on YouTube you are very proud of the easy responsive design of Kendo UI, but i couldn't find a way to make the PivotGrid responsive.

Did i miss something? The demo (dojo) on mobile phones doesn't show anything.

Sebastian
Top achievements
Rank 1
 answered on 12 Aug 2015
3 answers
217 views

I couldn't find a way to resize fields build-in per drag & drop.

Most commonly (Excel, ...) this is done by two ways:

1. Resizing the width per drag & drop by clicking on the bar between two fields (splitter).

2. Double click on this bar (splitter) resizes the field to the minimum size of it's content.

I often see truncated fieldnames or values or much to wide fields in the Kendo UI PivotGrid. Eventually this is something important to improve.

Sebastian
Top achievements
Rank 1
 answered on 12 Aug 2015
3 answers
91 views
Hello,
I'm new to Kendo UI and I have some questions

currently we're searching for UI components for webapp(JS) and we're considering Kendo UI
We have desktop app(fat client) and we want "rewrite it" in special way. It means that we created some abstraction layer and our developers create views like this:

def customerView = view.add(Customer.VIEW_NAME)
def customer PersonView = view.add(CustomerPerson.VIEW_NAME)

view.addColumn(customerView.getCoulmn(Customer.Columns.FIRST_NAME))
view.addColumn(customerView.getCoulmn(Customer.Columns.LAST_NAME))
customerView.join(customer PersonView)
view.add Column(customerPersonView.getCoulmn(CustomerPerson.Columns.BRANCH_NAME))

As you can see this is declarative way of programing. We can interprete in any way. We want publish this declarative code as JSON and write intepreter in javascript with Kendo UI as View. As you can see we want use Kendo in non standard way.

Currently we have following questions:

1) In data presentation component can we pass our functions to handle data fetching from backend?

In example http://demos.telerik.com/kendo-ui/grid/remote-data-binding
we can pass link to data
 transport: {
                                read: "//demos.telerik.com/kendo-ui/service/Northwind.svc/Orders"
                            },
this solution is very comfortable but not for us. We want pass some function which get all the filters, column's orders, visible columns and page no. and returns some data

2) In Kendo UI we have Model and Observables. Can we pass some adapter to it?
In our app we have our Models and we don't want to convert it to Kendo UI models (two source of data), we want pass adapter function like this

var ourAppModel = new NextModel();

var kendoAdapter ={
setValue:function(fieldName, val){
ourAppModel.fireDataChange(fieldName, val)
}
getValue: :function(fieldName, val){
return ourAppModel.get(fieldName, val)
}
}

var kendoModel = new KendoModelAdapter(kendoAdapter)
ect

3) Finnaly is Kendo UI is good choice for us :-). We want write app creating core app logic in Javascript with our model, our controller and our views (aka delegation).
Then in views wrap vendor components (Kendo UI) which means that we need very flexible library which not force on us some special solutions. In other words we want to change vendor as we like rewriteing only glue code (model's adapters, event's adapters)


Best regards
Mirek
Petyo
Telerik team
 answered on 12 Aug 2015
1 answer
412 views
I recently tried the facility for CRUD data using inline editing, I just tried to run the save command but failed. I combine three files:
1. SQL to store data that has been inputted

function spGroup($data){
$db=pDatabase::getInstance();
$inventorygroupname=stripslashes(strip_tags($data[1]));
$query="INSERT INTO inventorygroup (inventorygroupname, status)VALUES('$inventorygroupname',0)";
$rs=$db->query($query);
if($rs){
return true;
}else{
return false;
}
}

2. Javascript to run commands on kendo ui.

var group=(function(){
return{
load:function(){

var ik_data = {
ajax: 1,
mode: "pages",
cl: "inventorygroup",
ikdata: {0:"getGroup"}
};

$.ajax({
url: lokal+"ajax.php",
type: "POST",
dataType: "json",
async:true,
data: ik_data,
success: function(e){
if(e!=false){
var dataSource = new kendo.data.DataSource({
                            schema: {
                                model: {
                                    id: "idinventorygroup",
                                    fields: {
                                        idinventorygroup: { editable: false, nullable: true },
                                        inventorygroupname: { validation: { required: true } }
                                    }
                                }
                            },
transport: {
read: function (s) {
s.success(e);
},
update: function (s) {

url:group.editgroup();
s.success();
},
create: function (s) {

url:group.save();
s.success();
},

parameterMap: function(options, operation) {
if (operation !== "read" && options.models) {
return {models: kendo.stringify(options.models)};
}
}
                            },
                            batch: true,
                            pageSize: 10
                        });
$("#grid_group").kendoGrid({
dataSource: dataSource,
pageable: true,
height: 550,
toolbar: ["create"],
toolbar: ["create", "save", "cancel"],
columns: [
{ field:"inventorygroupname", title: "Group Name" },
//{ title:"Status", format: "{0:c}", width: "120px", template: kendo.template($("#status").html())},

{
title: "Action",
width: 50,
template: kendo.template($("#edit").html())
},
{ command: [

{
name: "edit",
text: { 
edit: "Edit Data",               
update: "Update",            
cancel: "Cancel"    
}
},

name: "destroy", 
text: "Delete Data" 
}
], title: " ", width: "250px" }],
editable: {
mode: "inline",
}
});
}
}

});

},
save:function(a,b){
var inventorygroupname=a;
var idinventorygroup=b;
var ik_data = {
ajax: 1,
mode: "pages",
cl: "inventorygroup",
ikdata: {0:"spGroup",1:inventorygroupname}
};

$.ajax({
url: lokal+"ajax.php",
type: "POST",
dataType: "json",
async:true,
data: ik_data,
success: function(e){
if(e!=false){
group.load();
}
}
});
},​

3. PHP as an object that is used as a variable for the operation of the data.
<script type="text/x-kendo-template" id="edit">
    <button class="btn btn-default btn-sm" type="button" onclick="group.save('${inventorygroupname}')">Edit Data</button>
</script>

I have successfully used this concept to the method of the popup, but for my inline application failed. ask for help. Thank you
Boyan Dimitrov
Telerik team
 answered on 12 Aug 2015
3 answers
334 views
Hi,
I want to have client side for a checkbox. When the user presses submit button, or checkbox loose focus the validation should be trigged. Basically same behaviour as for textboxes (which are working fine).

I try to make client side validation for a CheckBox
Here is the sample code:
@Html.CheckBoxFor(model => model.RulesAccepted, new { @class = "control-label" })
@Html.ValidationMessageFor(model => model.RulesAccepted)


If I do similar to the example code (http://demos.telerik.com/aspnet-mvc/validator/index) checkbox is validated. If it is not check then I get an error, which is correct.
But there is number of issues preventing me to use that code:
1.Model passed back to the post action does not have boolean value set (RulesAccepted is the property name on the model)
2.I'm not able to plug-in fluent validation messages to display them to the user.

If I try to do any other way no message is appearing when it should.
In the code I have now the TextBoxes validators work fine. I have only problem with CheckBox validator.
Boyan Dimitrov
Telerik team
 answered on 12 Aug 2015
10 answers
1.1K+ views
Hello,
I have angular js application using kendo. In angular I defined http interceptor which adds auth token to every request:
public request = (config) =>
{
    config.headers = config.headers || {};
 
    var authData = this.localStorage.AuthorizationData;
    if (authData)
    {
        config.headers.Authorization = 'Bearer ' + authData.token;
    }
 
    return config;

}

Iam also using webapi so to populate grid I have to use beforeSend in DataSource and set there token:
$scope.people = new kendo.data.DataSource({
    transport: {
        read: {
            url: Config.ApiUrl + 'doctors',
            dataType: 'json',
            beforeSend: (xhr) =>
            {
                var auth = "Bearer " + token;
                xhr.setRequestHeader("Authorization", auth);
            }
        },
    },
    pageSize: 5,
                
});

Is it possible to make datasource use my httpinterceptor as function that provides the token to the request? I just want to have token setup in one place.
Alexander Popov
Telerik team
 answered on 12 Aug 2015
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
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
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?