Telerik Forums
Kendo UI for jQuery Forum
3 answers
232 views
Is there a limit to the size of the Excel document generated from a grid?

I did a small example showing a page crash when generating a grid with 50 000 items.  I think the problem isn't linked with the number of row... it's linked to the amount of data used for the excel document.  If you reduce the number of row to 10 000, you'll see that everything is fine.

Regards,

Simon
Dimiter Madjarov
Telerik team
 answered on 04 May 2016
1 answer
282 views

Hi,

 

I have been struggling with this for days and cannot figure it out - any help would be greatly appreciated!

 

I am creating a UI Grid with php wrappers where I am trying to read & update data to/from a database stored in MySQL.

 

The reading part is working just fine - but when I try to post, I keep getting error. The reason is that the "$columnName = mysql_real_escape_string($_POST["fieldname"]);" commands are not returning anything in my database connection file.

Perhaps it is because I am batch editing so it is not posting 1 single field value but instead an array of them?

Here is my code:

 

MAIN PHP FILE:

<?php
require_once '../lib/DataSourceResult.php';
require_once '../lib/Kendo/Autoload.php';

$transport = new \Kendo\Data\DataSourceTransport();
$read = new \Kendo\Data\DataSourceTransportRead();
$read->url('data/connection2.php?type=get')
     ->contentType('application/json')
     ->type('GET'); //corresponds to "verb" in connection2.php

$update = new \Kendo\Data\DataSourceTransportUpdate();

// Specify the url of the PHP page which will update the bank table
$update->url('data/connection2.php?type=update')
  ->contentType('application/json')
  ->type('POST'); //corresponds to "verb" in connection2.php


 
$transport ->read($read)
           ->update($update)
           ->parameterMap('function(data) {
              return kendo.stringify(data);
          }');

 

          
$model = new \Kendo\Data\DataSourceSchemaModel();

$FirstNameField = new \Kendo\Data\DataSourceSchemaModelField('First');

$FirstNameField->type('string');

$LastNameField = new \Kendo\Data\DataSourceSchemaModelField('Last');

$LastNameField->type('string');
$idField = new \Kendo\Data\DataSourceSchemaModelField('id');
$idField->type('number');

$model->id('id')
      ->addField($FirstNameField)
      ->addField($LastNameField)
      ->addField($idField);

      
$schema = new \Kendo\Data\DataSourceSchema();
$schema->data('data')
       ->model($model);

$dataSource = new \Kendo\Data\DataSource();

$dataSource->transport($transport)
           ->pageSize(50)
           ->serverPaging(false)
           ->batch(true) //batch editing
           ->schema($schema);

$grid = new \Kendo\UI\Grid('grid');

$First = new \Kendo\UI\GridColumn();
$First->field('First')
            ->title('First Name')
            ->width(150);
$Last = new \Kendo\UI\GridColumn();
$Last->field('Last')
            ->title('Last Name')    
            ->width(250);

 

$grid->addColumn($First, $Last)
     ->addToolbarItem(new \Kendo\UI\GridToolbarItem('save'), new \Kendo\UI\GridToolbarItem('cancel'))
     ->dataSource($dataSource)
     ->pageable($pageable)
     ->editable(true)
     ->navigatable(true)
     ->attr('style', 'height:550px');
?>


<?php
echo $grid->render();
?>

 

 

 

AND HERE IS THE CONNECTION file (connection2.php)

((Note the error is happening with $myID  & $myLastName..the values are not actually being passed in (they are displaying as empty when I echo these variables) so I suspect that is the root cause why the data is not being posted to my database. This means "id" & "Last" are not getting passed into the connection file properly for all the records I am attempting to batch edit.

 

<?php

$link = mysql_connect("localhost", "myusername", "mypassword') or die("Unable To Connect To Database Server");
mysql_select_db("mydb") or die("Unable To Connect To My DB");

 

$verb = $_SERVER["REQUEST_METHOD"];

// handle a GET
if ($verb == "GET") {
$arr = array();
$rs = mysql_query("SELECT * FROM mytable");


ini_set('memory_limit', '-1');

while($obj = mysql_fetch_object($rs)) {
$arr[] = $obj;
}

header('Content-Type: application/json');
echo "{\"data\":" .json_encode($arr). "}";
}


// handle a POST
if ($verb == "POST") {

$myID = mysql_real_escape_string($_POST["id"]);
$myLastName = mysql_real_escape_string($_POST["Last"]);

$rs = mysql_query($link,"UPDATE mytable SET Last= '" .$myLastName ."' WHERE id = " .$myID);

if ($rs) {
echo json_encode($rs);
}
else {
header("HTTP/1.1 500 Internal Server Error");
echo "Update failed for ID: " .$myID;
}
}
?>

Rosen
Telerik team
 answered on 04 May 2016
1 answer
200 views

Hello, 

I'm using kendo.dataviz.diagram.Layout to handle text overflow in diagram shapes, but sometimes that is not enough, and the text overflows vertically. I want to identify this problem and solve it by changing my shape's height to fit this, so I need a way to ask the Layout what is it's preferred height (or number of lines, etc). 

I currently have something like this: 

 

var layout = new kendo.dataviz.diagram.Layout(
                    new kendo.dataviz.diagram.Rect(shape.contentX, shape.contentY, shape.contentWidth, shape.contentHeight),
                    {
                        alignContent: "center",
                        justifyContent: "center",
                        spacing: 6,
                        lineSpacing: 5
                    });
 
            var texts = entity.name.split(" ");
            for (var i = 0; i < texts.length; i++) {
                layout.append(new kendo.dataviz.diagram.TextBlock({
                    text: texts[i]
                }));
            }
            layout.reflow();
 
            var path = new kendo.dataviz.diagram.Path({
                data: shape.path,
                stroke: stroke,
                fill: fill,
                height: Math.max(shape.contentHeight+10, layout.rect().height+10)
            });

The idea being that I have the default (shape.contentHeight) height, and if the layout height exceeds it I increase the Path height, but sadly Layout.rect() always returns the initial rectangle. 

 

Is there a way to query the layout for the actual ("preferred") rectangle size, or at least know if it exceeded the originally allocated one? 

 

Thanks. 

Niko
Telerik team
 answered on 03 May 2016
2 answers
162 views

Example: http://dojo.telerik.com/ipura

Is it possible to have the tooltip for a plot point on a line chart show only when the mouse is directly over that point on the x axis.  If you look at the example link, when you hover over the first point, it shows the tooltip.  However, the tooltip does not disappear as you move tho the right.  When you get to the point that is in the gap, the tooltip bounces from the first point to the third depending on which side the mouse is on.

Is there a solution to this?  The sparkline seems to do this correctly.  When I hover over a gap on the sparkline, the tooltip disappears.

Iliana Dyankova
Telerik team
 answered on 03 May 2016
1 answer
192 views

Hello,

I have a problem with DropDownList. If you try to open ddl, filter by "me", select it and then click button "clickme" the newly added item isnt selected.

Example:

http://dojo.telerik.com/exazO/4

Dimo
Telerik team
 answered on 03 May 2016
1 answer
156 views

We are testing the insert table functionality in the editor. When we add the table it has certain default styling. It looks like the attached file.

When we clear formatting it looks like this.

1 2

when we save it it saves with no styling.

<table>
 <tbody>
  <tr>
   <td>1</td>
   <td>2</td>
  </tr>
 </tbody>
</table>

But when we return to the editor and reload the saved table it gets the default styling and shows like the attached file. Is there something we should be doing to save the styling?

Ianko
Telerik team
 answered on 03 May 2016
1 answer
196 views

How do you add a separator to the Toolbar?

 

Thanks,

Reid

Reid
Top achievements
Rank 2
 answered on 03 May 2016
5 answers
295 views

I use Bootstrap + Kendo UI as explained here http://docs.telerik.com/kendo-ui/third-party/using-kendo-with-twitter-bootstrap.

However, when I include the Bootstrap css, it shifts the items in k-window-titlebar slightly lower which doesn't look very good.

You can seen the effect in this Kendo UI Dojo: http://dojo.telerik.com/apeWu

Could you please provide a workaround or fix?

Ivan Zhekov
Telerik team
 answered on 03 May 2016
8 answers
306 views
  I need to stop undo and redo service (for prevent shapes and connections ) in kendo diagram using jquery or javascript  .
In my project , i was form some shape with connections during drag event in kendo Diagram(refer image 1).then press ctrl+z ,last formed connection will loss(refer image 2).
so i need to stop this undo and redo service.

How to stop these service in kendo diagram using jquery or javascript ?
Konstantin Dikov
Telerik team
 answered on 03 May 2016
3 answers
999 views
Hello!
I know that user can save grid settings as per http://demos.telerik.com/kendo-ui/grid/persist-state
But it saves all settings. Is there a way to save a selected number of settings?
For example I want to save Sorting, Columns widths and Columns order.
Can this be done via some configuration? If no, can someone give an example how to implement it for localstorage?
Thanks!
Boyan Dimitrov
Telerik team
 answered on 03 May 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
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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?