Telerik Forums
Kendo UI for jQuery Forum
1 answer
144 views
I do not know if this is possible, or if this can be added to a new version of the DataViz toolkit.

I would like to be able to add an image, or icon inside a Bubble Chart so you know exactly what it is with just looking at it

Thanks
Iliana Dyankova
Telerik team
 answered on 19 Sep 2012
0 answers
118 views
How to add 'Menu' next to title of 'Window' Component or on hover of custiom icon how to populate a menu with 4 items

Thanks,
Chetan
Chetan
Top achievements
Rank 1
 asked on 19 Sep 2012
1 answer
935 views
The following code is dataSource for validating values via a controller method:

            SampleDataSource: new kendo.data.DataSource({
                transport: {
                    read: {
                        url:  "Sample/ValidateSampleCodes",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        type: "POST"
                    },
                    parameterMap: function (options, operation) {
                        return JSON.stringify({ SampleCode: options.SampleCode });
                    },
                },
                schema: {
                    model: {
                        id: "Id"
                    },
                    parse: function (data) {
                        viewModel.set("SampleCodesFromDB",data[0]);
                        return data;
                    }
                }
            }),

The following code is the grid in which i need to validate values entered, instantly and display an in-line validation message. I am using the custom validator as shown below...

                $("#Sample-code-grid").kendoGrid({
                    dataSource: { 
                        data: viewModel.SampleCodes,
                        schema: {
                            model: {
                                id:"Id",
                                fields : {
                                    SampleCode : { editable: true, validation: { custom: function (input) {
                                            var isValid = true;
                                            if (input.attr("name") == "SampleCode") {
                                                
                                                // Reading the below datasource to check if value already exists in DB
                                                
                                                viewModel.SampleDataSource.read({ SampleCode: input.val() });


                                                // When debugging, i find that the above read method call is skipped until 
                                                // custom validator function is fully executed...


                                                var isValidMessage = viewModel.get("SampleCodesFromDB");
                                                if(isValidMessage == "Code Exists")
                                                    isValid = false;
                                                if(!isValid)
                                                    input.attr("data-custom-msg", "Sample Code already added.");
                                            }
                                            return isValid;
                                        }
                                        }
                                    }
                                }
                            }
                        },
                        change: function(e) {
                            if(e.action == "itemchange" || "remove") {debugger;
                                viewModel.SampleCodes = [];
                                $.each(e.sender.data(), function(inx, val) {
                                    viewModel.SampleCodes.push({ SampleCode : val.SampleCode });
                                });
                            }
                        }
                    },
                    selectable: true,
                    editable: "inline",
                    toolbar: [{ name: "create" , text : "Add Sample Code" }],
                    columns: [
                        { field: "SampleCode", title: "Sample Codes" },
                        { command: ["edit", "destroy"], title: " ", width: "210px" }
                    ]
                });

I have added some comments inside the code so that you get some idea about my problem. I just need to know how to approach validation for duplicates using the custom validator that calls a dataSource for the same purpose.

Any help will be greatly appreciated.
Alex
Top achievements
Rank 1
 answered on 19 Sep 2012
3 answers
389 views
I have a grid whose datasource has a filter set on a foreign key. It's a remote datasource to a SharePoint 2010 list odata service. The create command in the grid's toolbar does not do anything. As soon as I remove the filter from the datasource, the create command works again. How can I get the create command to work with the filter set? I assume I need to find a way to set the foreign key on the newly created object to the same value as the filter and only then will the new object show up in the grid.
Remco
Top achievements
Rank 1
 answered on 19 Sep 2012
1 answer
187 views
I can find plot bands, but I cannot find how to plot lines.

I can also add a plotband to the valueAxis like this: 
valueAxis: {
       plotBands: [{
             from: 0.4,
             to: 0.4001,                               
             color: "red"
         }]
 }
However this requires me to add a from and a to. This doesn't exist. i just want a simple line plotted at a particular value.

Can anyone help? I have a link to Highcharts where they show an example of how they do it (addPlotLine): http://www.highcharts.com/studies/dynamic.htm 
Iliana Dyankova
Telerik team
 answered on 19 Sep 2012
0 answers
140 views
Hi,

We have a web user control with an input and a HTML select:

<input id="createSubTenant_Name" type="text" data-bind="value: SubTenantName" />
<select id="CreateSubTenant_Parent" data-bind="value: TenantId">
    <option></option>
</select>

The options will be added by JavaScript (text and value).
The binding with kendo.observable and kendo.bind in JavaScript:

var viewModel = kendo.observable({
    SubTenantId: "",
    SubTenantName: "",
    TenantId: ""
});

kendo.bind(window, viewModel);

The user has to fill the input box and select an entry. In the submit method, we will get the view model:

viewModel.toJSON();

And here is the problem. By default the first entry of the select is selected. If the user does not select another option of the select, the “TenantId” of the viewModel will be null. If the user selects another option of the select, the “TenantId” will be set in the viewModel perfectly.
Our actual work around:

var sel = document.getElementById('CreateSubTenant_Parent');
viewModel.TenantId = sel.options[sel.selectedIndex].value;

Almost the same problem appears with an input box. In another web user control, the user only has to type a name in input box. By typing enter the submit method will be called. In this case the cursor does not leave the input box and the same problem appears.

Is it a general problem? Can someone help?

Thanks.
Patrick
Top achievements
Rank 1
 asked on 19 Sep 2012
0 answers
169 views
my command don't run 
.Create(c=>c.Action("CreateNewEmployee", "HRM")) 
.Update(update => update.Action("Employee_Update", "HRM"))
        .Destroy(update => update.Action("Employee_Destroy", "HRM")) 
in controller but can run
.Read(read => read.Action("Employee_Read", "HRM")) 

@(Html.Kendo().Grid(Model)
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.EmpID).Visible(false);
        columns.Bound(p => p.Role);
        columns.Bound(p => p.Branch);
        columns.Bound(p => p.Name);
        columns.Bound(p => p.Address);
        columns.Bound(p => p.Username);
        columns.Bound(p => p.Status);
        columns.Command(c =>
        {
            c.Edit();
            c.Destroy();
        }).Width(250);
    })
    .Editable(editable =>
    {
        editable.Mode(GridEditMode.PopUp);
        editable.TemplateName("EmployeeEditor");
    })
    .Pageable()
    .Sortable()
    .Scrollable()
    .Filterable()
    .ToolBar(toolbar =>
    {
        toolbar.Create();
        })
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(10)
        .Events(events => events.Error("error_handler"))
        .Model(model => model.Id(p => p.EmpID))
        .Create(c=>c.Action("CreateNewEmployee", "HRM"))
        .Read(read => read.Action("Employee_Read", "HRM"))
        .Update(update => update.Action("Employee_Update", "HRM"))
        .Destroy(update => update.Action("Employee_Destroy", "HRM"))
    )
    .HtmlAttributes(new { style = "height:550px" })
)

Dechochai
Top achievements
Rank 1
 asked on 19 Sep 2012
1 answer
136 views
I have a column in my grid that I do not wish the user to be able to hide using the column menu.

How do I prevent the column from appearing in the grid's column show/hide menu?

Thanks,

Doug
Nikolay Rusev
Telerik team
 answered on 19 Sep 2012
3 answers
164 views
Hi
I m using Kendo UI control. I found some issues using them, so need clarification.

1. When dropdown is used inside Kendo Window then it is hidden. Please see below code
 @(Html.Kendo().Window()
     .Name("widget")
            .Title("widget Menu")
    .Content(@<text>
    @model List<Dashboard.Models.WidgetData>
    <div id="widgetMenuselection">
       @* @Html.Action("WidgetType", "WidgetType")*@
               @(Html.Kendo().DropDownList()
                .Name("Text")
        .DataTextField("Text")
        .DataValueField("Value")
        .AutoBind(true)
        .BindTo(new List<SelectListItem>() {
                new SelectListItem() {Text = "Filter/Menu",Value = "-1"},
                new SelectListItem() {Text = "Graph",Value = "1"},
                new SelectListItem() {Text = "Tabular",Value = "2"}
                })
        .Value("-1")
        .SelectedIndex(-1)
        .Events(e => e.Change("wdgtMenudrplist_change"))
    )
 </text>)
    )
2. I donot find any way to attach checkbox to tree view in Kendo. I m using Razor MVC 4, and my table structure has a seatinggroup table and seating table distinctly with seating group has many seats under it. So can i provide tree view individual values of group and seats.
Daniel
Telerik team
 answered on 19 Sep 2012
0 answers
90 views
Hi,

I need to exclude weekend days from the datepicker's list due to my client's needs, how can I do that?

Best regards,
Anton
Softcloud
Anton
Top achievements
Rank 1
 asked on 19 Sep 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
Drag and Drop
Application
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
DropDownTree
ListBox
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
Styling
ColorPicker
Pager
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
Licensing
PivotGridV2
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
LLM Kit
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?