Telerik Forums
Kendo UI for jQuery Forum
3 answers
236 views
Is there way to export the grid to Pdf or excell?
mohamed
Top achievements
Rank 1
 answered on 10 May 2014
1 answer
233 views
Hello Guys,
I have some problems with Kendo Grid Column Update:

1) I have grid which is this:
            grid.kendoGrid({
                dataSource: dataSource,
                toolbar: [
                    { text: "Save Changes", className: "update_sportsgid", imageClass: "k-update" }
                ],
                columns: ["id",name", { field: "enabled", title: "Status", editor: statusEditor },],
                editable: true
                }
            });

2) Column named "enabled" in that grid has custom editor with ComboBox and function for that editor is this:
            function statusEditor(container, options) {
                var selOptions = '<option value="Enabled">Enabled</option><option value="Disabled">Disabled</option>';
                
                var input = $("<select name="+options.field+">"+selOptions+"</select>");
                
                input.appendTo(container);
                input.kendoComboBox();
            }

3) In the grid i have toolbar which has class "update_sportsgid" and i attach click event on that toolbar button:
            $('.update_sportsgid').click(function (e) {
                e.preventDefault();
                me.updateSportsGrid(grid);
            });


4) When toolbar button is click i call update function:
updateSportsGrid: function (grid) {
           //Get Whole Displayed Data
           var displayedData = grid.data().kendoGrid.dataSource._data;
           var dataToSend = [];

            //Iterate over grid and get changed row values
            for(var i = 0;i<displayedData.length;i++) {
                var current = displayedData[i];
                if(current.dirty) {
                    var node = {
                        id:current['id'],
                        type:"Sport",
                        priority:current['priority'],
                        enabled:current['enabled'],
                        topBets:current['topBets']
                    }
                    dataToSend.push(node);
                }
            }

The problem is that when i change column with custom editor "ComboBox" column doesn't change and row doesn't have dirty value true.
How can i bind custom editor to change data of grid view?






Alexander Popov
Telerik team
 answered on 10 May 2014
2 answers
122 views
One of the paging buttons are missing a border on the bootstrap theme depending on the pager configuration. You can see the missing right hand border in the demo I saved at http://trykendoui.telerik.com/uYAw

See the attached screenshot for the specific button.
Iliana Dyankova
Telerik team
 answered on 10 May 2014
1 answer
181 views
As you may be aware, when you add a web page to the home screen of an iOS device it creates a "web clip".  When launched from this icon on the home screen, the site is loaded in Safari in "web app mode".  There are several advantages to this such as going full screen and feeling more like an app and less like a web page.

However, there is a major downside to this.  When you switch to another app on your iPhone then switch back to this "web app", the state of the app is completely lost.  According to several sources on the web, this is by design.  The reasoning by Apple is that they need to be shut down your app to keep resources manageable.  It is the responsibility of the app developer to save state and restore state when the app is reopened.  

OK.  I can accept that and I am almost there.  I am tracking the user's logged in security token, so they don't need to login again.  I also store the current hash so I if I detect that they are launching from with no referrer, I can send them to the same hash they were viewing when they left.  

All is good.... EXCEPT back buttons don't work.  If the user was on a mobile view that had a back button, when the user multi-tasked away from it, then I will, of course, take them back to that page.  However, because there is no history, the Kendo UI mobile back button doesn't know what to do.

So... how can I save off the current navigation history to localStorage and how can I restore it when relaunching the app?

I see that app.pane.history has been deprecated.  This use case of an iOS web app launched from home screen seems pretty mainstream, so what is your current solution to this situation now that app.pane.history has been deprecated.

Thanks,
Ty.
Petyo
Telerik team
 answered on 10 May 2014
1 answer
95 views
I am trying to create a data source from an array of javascript objects that, among other properties, contain a property named "data". The existence of the "data" property causes my Kendo UI controls to break. An example is at http://jsfiddle.net/DsR4e/. If the "data" property is renamed, everything returns to the expected behavior.
Rosen
Telerik team
 answered on 10 May 2014
2 answers
389 views

Hi again all. How can this be converted to a ClientTemplate inside a Kendo Grid?

columns.Bound(document => document.Revisions).Template(@<text>
                @if (item.Revisions.Count <= 1)
                {
                    <div>
                        &nbsp;
                    </div>
                }
                else
                {
                    @Html.Raw(string.Format("<text><a id='img' class='icon' href=\"{1}\"><img src=\"{0}\" alt='' style='border:none;' /></a></text>", Url.Content("~/Images/docrev1.png"), Url.Action("ViewRev", "ViewRevisions", new { id = item.OriginalQRCodeID })));
                }

            </text>).Title("").Width(25);


My problem right now is that "Revisions" is an IEnumerable<T> type bound from the server. How do I get its count from client side? Is this even possible? Thanks very much for all the help and I look forward to the response(s).

Romel

Romel
Top achievements
Rank 1
 answered on 09 May 2014
3 answers
106 views
I have a custom validation method configured for my grid column which is now broken in the latest release.

Here is the source for my validation method:

validnamevalidation: function (input) {
    if (input.is('input[data-bind="value:Name"]')) {
        input.attr("data-validnamevalidation-msg", "A team already exists with that name.");
        var passed = false;
        var currentDataItem = $("#teamsGrid").data("kendoGrid").dataItem($(input.context));
        var currentId = currentDataItem.Id;
        if (currentId == "") currentId = -1;
        $.ajax({
            async: false,
            url: currentViewModel.crudServiceBaseUrl + "CheckTeamNameBeforeAdd?teamId=" + currentId + "&name=" + input.val().trim(),
            success: function (result) {
                if (result == "False") passed = false;
                else passed = true;
            },
            error: function (jqXHR, textStatus, errorThrown) {
                alert(errorThrown + '. ' + jqXHR.responseText);
            },
            complete: function (jqXHR, textStatus) {
            }
        });
        return passed;
    }
    return true;
},


In the latest release, the input.context variable (which I use to obtain the current data row to be validated) is now undefined.

Is this a bug?
Is there a workaround?
Brandon
Top achievements
Rank 1
 answered on 09 May 2014
2 answers
263 views
We are using the Kendo bootstrap theme.  When a Kendo Tooltip is displayed on the right or left, the callout triangle does not appear centered next to the tooltip.  It appears lower than it should, and looks particularly bad when the tooltip contains only a single line of text.  Please see the following for an example:  http://trykendoui.telerik.com/@CodinAndHaulin/AYAs
You'll notice that if you change the Kendo theme in the example (to default or moonlight, etc), the tooltip callouts look proper.
Is there a way I could style the tooltip in Bootstrap theme correctly?
Iliana Dyankova
Telerik team
 answered on 09 May 2014
5 answers
353 views
I am trying to use the slice method on my Observable Array.  Each item in my array has another observable array.  The slice works great, as the objects returned are prefect "copies", but the Observable Arrays in each object are not copied, and therefor still reference the observable array from the item it was copied from.  How can I do a true deep copy for my items with any nested items that item may have?


Thanks and sorry if this sounds confusing.  
Atanas Korchev
Telerik team
 answered on 09 May 2014
4 answers
311 views
Is there a way to programatically trigger the click event on a chart series?  I'm trying to setup a unit test to test the seriesClick function and haven't been able to see anything.  In a somewhat desperate attempt I tried to trigger the click event on everything to see if I got something to trigger the event but it appeared as though nothing hit it; I have some console output as soon as the function runs. I used this line of code to try to execute the event.

$('*').each(function(){
    $(this).click();
});
Collin
Top achievements
Rank 1
 answered on 09 May 2014
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?