Telerik Forums
Kendo UI for jQuery Forum
7 answers
1.0K+ views
Hello,

I have been trying to remove a row from the grid via javascript but it always comes back with the following error: 
Uncaught TypeError: Cannot read property 'confirmation' of undefined

Here is what I am doing:
var grid = $("#mygrid").data("kendoGrid");
$(this).closest("tr").hide("slow");
var row = grid.tbody.find(">tr:hidden"); //Gives me the right one
grid.removeRow(row);
grid.refresh();

This of course hides the row, but if I go to another page and come back, the row comes back.  Now, I know this is because the data is still in the dataSource... but how can I go around it?

I am attaching my code for reference. The Json looks something like this:
[{"Year":2000,"Make":"Hyundai","Model":"Elantra","Color":"Bluish","Price":6000,"Id":0},{"Year":2001,"Make":"Hyundai","Model":"Sonata","Color":"Greenish","Price":16000,"Id":1}

Any pointers would be great. 

Thanks!
-Ricardo
Ricardo
Top achievements
Rank 1
 answered on 30 Mar 2012
6 answers
198 views
Hi,

KendoUI Mobile does not have a Theme Builder. I would like to change colors, fonts and other visual attribute of my mobile application.

Is there a documentation about Kendo UI Mobile CSS so that we can change some visual attributes ???

Thanks in advance
mvbaffa
Top achievements
Rank 1
 answered on 30 Mar 2012
1 answer
135 views
Hello,
I am a newbie... but I want to learn how I can binding my webservice to my DataViz; Pie Chart.

I am trying to use my Webservice .asmx that return a string (I converted a List into a JSON string using  System.Web.Script.Serialization.JavaScriptSerializer )

But when it is created my pie chart only appear the title...


I used my returned JSON string like a local data and  my chart was created. (By that reason I think that my json string isnĀ“t the problem)

Please a need some advices...

Regards,
M.
Alexander Valchev
Telerik team
 answered on 30 Mar 2012
4 answers
468 views
Hi, All;

I'm trying to build a simple grid bound to json data. The grid shows up but it's always empty. Help?
<div id=grid>
</>
<script type="text/javascript">
    var dataSource = new kendo.data.DataSource({
        transport: {
            read: {
                url: "http://localhost:3223/DataServices/DomainService.svc/JSON/GetDATA",
                dataType: "json"
            }
        },
        schema: {
            data: "RootResults"
        }
    });
    dataSource.read();
</script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#grid").kendoGrid({
            dataSource: dataSource,
            columns: [
                { title: "ID", field: "ID" },
                { title: "CODE1", field: "CODE1" },
                { title: "CODE2", field: "CODE2" }
            ],
            height: 360,
            groupable: false,
            sortable: false,
            pageable: false,
            scrollable: false
        });
    });
</script>
David
Top achievements
Rank 1
 answered on 30 Mar 2012
2 answers
178 views
Hi,

I'm having some trouble binding a KendoUI chart to a remote database through a web service.

Here is my code:

$("#chart").kendoChart({
    theme: $(document).data("kendoSkin") || "default",
    dataSource: {
        transport: {
            read: {
                url: "/WebServices/WebFunctions.asmx/RetrieveProjectCountByBMP",
                dataType: "json"
            }
        },
        schema: {
            model: {
                fields: {
                    Code: { type: "string" },
                    Count: { type: "number" }
                }
            }
        },
        sort: {
            field: "Code",
            dir: "asc"
        }
    },
    title: {
        text: "Project Count by BMP"
    },
    seriesDefaults: {
        type: "column"
    },
    series: [{
        field: "Count",
        name: "Project Count"
    }],
    categoryAxis: {
        field: "Code"
    },
    tooltip: {
        visible: true,
        format: "{0:N0}"
    }
});

and here is the web service code:

<WebMethod(EnableSession:=True)> _
Public Function RetrieveProjectCountByBMP() As Object
    Dim returnData = (From p As Project In Project.RetrieveAll() _
                     Join cs As ClaimScope In ClaimScope.RetrieveAll() On p.ProjectId Equals cs.ProjectId _
                     Join b As BMP In BMP.RetrieveAll On cs.BMPId Equals b.BMPId _
                     Where (p.ProjectMilestoneId = 17 Or p.ProjectMilestoneId = 18 Or p.ProjectMilestoneId = 19) _
                     And p.FiscalyearId = 5 _
                     Select b.Code, p.ProjectId).GroupBy( _
                        Function(bmpCode) bmpCode.Code _
                        , Function(proj) proj.ProjectId _
                        , Function(bmpCode, projects) New With {.Code = bmpCode, .Count = projects.Count()})
 
    Dim serializedReturnData As JavaScriptSerializer = New JavaScriptSerializer(returnData)
 
    Return serializedReturnData.Serialize(serializedReturnData)
 
    Return serializedReturnData
End Function


I've verified that my webservice returns a complete dataset. 
The problem is that when I run the code, the chart doesn't get populated. There are no error messages and no events fired in the event log.

The only issue I can find is that the webservice returns the data with leading a trailing quotes, like this:

"[{"Code":"1301","Count":239},{"Code":"1401","Count":178},{"Code":"1001","Count":33}]"

When I copy the data returned from the web service into a .json file and bind the chart to that, it works fine. However, I have to remove the leading and trailing quotes to get it to work.

How can I get my webservice to return my data in proper JSON format?

Thanks. 
Monique
Top achievements
Rank 1
 answered on 30 Mar 2012
4 answers
1.0K+ views
Another question for you lovely Kendo people!

I'm currently struggling to bind more than one function to a Grid, my code is:

<div id="grid" data-role="grid" data-bind="source: gridSource"></div>

Which works fine, but I want this Grid to be a multi-selectable Grid (my own Kendo extension) and can't seem to bind this when I try:

<div id="grid" data-role="grid" data-bind="source: gridSource, selectableGrid: selectOptions"></div>

The error displays as "selectableGrid" is not supported by "div" or something along those lines. However, if I try and just use the selectableGrid without the source binding, then it works fine.

Any suggestions, or will this be fixed in a future release?
Chris
Top achievements
Rank 1
 answered on 30 Mar 2012
2 answers
113 views
Hi,

I'm having troubles trying to update a chart: http://jsfiddle.net/luisk/aHFwc/

I'm using chart.dataSource.data(prb);

As you can see in the example, the title is changing but the data source is not.

Thanks!
Luis Carlos
Top achievements
Rank 2
 answered on 30 Mar 2012
0 answers
96 views
Hi!

I am unable to retrieve the e.data.id because events from detailExpand is undefined. For detailInit, it's okay. Do you know why? Is there a bug or is this written in this way?

                detailInit: function(e) {
                            console.log(e.data.id);
                },
                detailExpand: function(e) {
                             console.log(e.data.id);
                 },   
George
Top achievements
Rank 1
 asked on 30 Mar 2012
1 answer
100 views
I would like to display a model window in response to a user clicking on an Axis title of a chart that plot time series data.  This modal window would allow the user to adjust some of our chart settings (Xaxis: time period) and (Yaxis: engineering units of measure).  I have looked through the forums and documentation but cannot seem to find an event.

Thanks
Paul
Iliana Dyankova
Telerik team
 answered on 30 Mar 2012
1 answer
133 views
Hi,

Can anyone tell me how to retrieve the original object that was bound to the grid when a row is selected.
I attached the following callback to the "change" property of  grid.  I assume there is a way to fetch the original JSON object from this "arg" parameter.

function onChange(arg) {                
                .... Need to retrieve the object that was bound to the selected row.
                });

Thanks in advance.
Mohamed
Top achievements
Rank 1
 answered on 30 Mar 2012
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)
SPA
Filter
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
OrgChart
TextBox
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
Popover
DockManager
FloatingActionButton
TaskBoard
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
TimePicker
DateTimePicker
RadialGauge
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?