Telerik Forums
Kendo UI for jQuery Forum
0 answers
110 views
when i used grid.dataSource.transport.options.read.url, its hitting server and also if i use grid.dataSource.page(1), its hitting server again.
Please give me solution.  i have pasted my code as follow
  function  showJobExecTable(jobId) {

                    var grid=$("#jobexecgrid").data('kendoGrid');
                    if(grid!=undefined) {
                        grid.dataSource.transport.options.read.url =contextPath + "/ajax/jobExecs.htm?jobId="+jobId.trim();
                         grid.dataSource.page(1);
                       grid.dataSource.read();
                        grid.refresh();
                  
                    }
                  
     
                }
Vijay
Top achievements
Rank 1
 asked on 08 Oct 2012
1 answer
234 views
I would like the Bank Name within my Grid to link to the Details page based on the BankID, but I get a Compilation Error on columns.Template(@<text>:
CS1646: Keyword, identifier, or string expected after verbatim specifier: @

My .cshtml code is as follows:

@model IEnumerable<PosPayAndBankRec.Domain.Models.ORTBank>
@using Kendo.Mvc.UI.Fluent

@functions {

    private void BankGridCommandDef(GridColumnFactory<PosPayAndBankRec.Models.BankListItem> columns)
 {
  columns.Command(command => { command.Edit(); command.Destroy(); }).Width(180);
        columns.Bound(p => p.BankID).Hidden();
        columns.Bound(p => p.BankName);
        columns.Bound(p => p.BankName);
        columns.Template(@<text>
                              @(Html.ActionLink("Edit", "Details", "Account", new {id = @item.BankID}))
                          </text>);
    }

    private void BankGridDataSource(DataSourceBuilder<PosPayAndBankRec.Models.BankListItem> dataSource)
 {
        dataSource.Ajax()
            .Model(AjaxBankDataSourceBuilder)
            .Sort(sort => sort.Add(p => p.BankName))
            .ServerOperation(true)
            .Create(create => create.Action("Create", "Bank"))
            .Read(read => read.Action("Read", "Bank"))
            .Update(update => update.Action("Update", "Bank"))
            .Destroy(destroy => destroy.Action("Delete", "Bank"));
            //.Events(e => e.Error("error"));
 }

    private void AjaxBankDataSourceBuilder(DataSourceModelDescriptorFactory<PosPayAndBankRec.Models.BankListItem> model)
    {
        model.Id(p => p.BankID);
        model.Field(p => p.BankName);
    }

    private void BankGridToolBarDef(GridToolBarCommandFactory<PosPayAndBankRec.Models.BankListItem> toolbar)
    {
        toolbar.Create().Text("New Bank");
    }
}

@{ ViewBag.Title = "Banks"; }
@(Html.Kendo().Grid<PosPayAndBankRec.Models.BankListItem>()
 .Name("Banks")
 .Columns(BankGridCommandDef)
 .DataSource(BankGridDataSource)
        .ToolBar(BankGridToolBarDef)
        .Editable(c => c.Mode(GridEditMode.InLine).Enabled(true).DisplayDeleteConfirmation(true))
        .Sortable()
    .Pageable(p => p.Enabled(false))
        .Scrollable(s => { s.Height(400); s.Virtual(true); })
      )
    

Alex
Top achievements
Rank 1
 answered on 08 Oct 2012
4 answers
3.2K+ views
Is there any way to tell through an event type mechanism when the drop down is done binding to data?  I am loading a drop down with a list through a datasource bound to remote data and need to initialize the value based on another data field retrieved previously.  I also need to fill in other controls through MVVM based on the data in the drop down list, so simply setting the drop down list initial value isn't enough for this.

The time to load the drop down seems to vary, and a timeout isn't working very well at that point, so it would be helpful to know when the drop down is finished and can safely have its value set through code.

If there is no event (which it doesn't appear there is from the documentation) is there a known way to handle this situation?  I should probably point out that I'm fairly new to javascript, so if there is something obvious that I'm missing, please excuse my ignorance!
Alexander Valchev
Telerik team
 answered on 08 Oct 2012
2 answers
295 views
Hello,
We're having a slight issue where when a page loads it displays controls momentarily as the unstyled versions of Kendo UI controls even in development (e.g. no network latency to load resources).  This seems to be a FireFox issue as Chrome is not showing the delay, but it is certainly there in FF 15.0.1.

When the page loads the controls are unstyled, then they are styled.  Is it possible to hook into some Kendo or jQuery framework event to know when Kendo thinks it is done initializing and styling all Kendo controls on the page (or maybe we can look at the last control on the page and base it off that).  We are wanting to prevent this flicker of unstyled to styled controls.


The style initialization we are doing is below: 
  $('#something).kendoNumericTextBox({
            format: "n0",
            spinners: false,
            decimals: 0
        });
Dimo
Telerik team
 answered on 08 Oct 2012
1 answer
185 views
Hello,

It seems there is an issue of calculating selected index of a tabstrip, if has inner tabstrip with selected index other than zero.
Here is jsfiddle 
http://jsfiddle.net/qd3YZ/210/

You can see that value in alert depends on the current tab of inner tabstrip which is wrong. Looks like shown value is the sum of two selected indices.
What is the workaround to find selected index of top tabstrip?
When are you going to fix this?

Thanks,
Ihor
Dimo
Telerik team
 answered on 08 Oct 2012
0 answers
118 views
Hey, could someone please help me with descent peace of code how to save a SVG to file system and then convert it to png, I looked at a lot of samples but couldnt make them work for me.
Any atempt appreciated.
Heres my code for the chart;

$("#chart3").kendoChart({
                        theme: $(document).data("kendoSkin") || "default",
                        dataSource: {
                            transport: {
                                read: {
                                    url: "Data/data.json",
                                    //url: "ChartDataService.svc/DoWork",
                                    dataType: "json"
                                }
                            }                           
                        },
                        title: {
                            text: "Daily Alarm Rate"
                        },
                        legend: {
                            visible: false,
                            position: "top"
                        },
                        seriesDefaults: {
                            type: "scatter",
                            color: "#347C2C",
                            labels: {
                                visible: true,
                                template: "#= series.name #",
                                position: "right"
                            }
                        },


                        series: [{
                            xField: "ChartUpsPerc",
                            yField: "Avg"
                        }],


                        xAxis: {
                            min: 0,
                            labels: {
                                format: "${0}"
                            },
                            title: {
                                text: "Price"
                            }
                        },
                        yAxis: {
                            min: 0,
                            labels: {
                                format: "{0}%"
                            },
                            title: {
                                text: "Performance Ratio"
                            }
                        },
                        tooltip: {
                            visible: true,
                            format: "{0:N0}",
                            template: "Date: ${dataItem.Avg}<BR>Value: ${value}"
                        }
                    });
Neil
Top achievements
Rank 1
 asked on 08 Oct 2012
0 answers
52 views
I have scenario where kendo grid model is getting updated while doing inline row edit. In our case i am getting some validations from services & i need to show them in UI. But what is happening the model is getting updated not the data base.
Is there any way to prevent/revert kendo grid data model from getting updated.
Deepak
Top achievements
Rank 1
 asked on 08 Oct 2012
0 answers
143 views
Hi

I have three combo boxes (department, category and sub category), see attached jsfiddle example: http://jsfiddle.net/cFLQr/1/

When I select the second combobox (category) the change event is fired but, for some reason, if I then click then third combobox immediately (without any other interaction on the page) I get an error of "Cannot read property 'value' of undefined".

If however I do things slightly differently and select the second combobox (category) then make a click elsewhere on the page, the event is fired twice (once on change and once on click elsewhere on page). The second change event stops the above error and passes the correct information.

Please can you help me to understand why there is a second change event on clicking elsewhere on the page and also why the first change event doesn't do the job of the second change event. :-/

Thank you very much
Rich
Rich
Top achievements
Rank 1
 asked on 08 Oct 2012
2 answers
237 views
My charts are filled and updated with data from DataSource. How can I make this with a Gauge object?
Renju Panicker
Top achievements
Rank 1
 answered on 08 Oct 2012
3 answers
1.4K+ views
I have a grid with custom commands to view an order's details. When clicking on the button I want to launch a Kendo Window and add the order's id into the url of the content. Is this possible?

var wnd = $("#window").kendoWindow({
title: "Order Details",
modal: true,
visible: false,
resizable: false,
width: 400
}).data("kendoWindow");

function showOrder(e) {
e.preventDefault();
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
var url = '<%= ResolveUrl("~/MyOrder.aspx?orderId=") %>' + dataItem.Id;
wnd.content(url);
wnd.center().open();
}


Nohinn
Top achievements
Rank 1
 answered on 08 Oct 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)
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
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
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?