Telerik Forums
Kendo UI for jQuery Forum
1 answer
3.1K+ views

Hi I need to append single Column with multiple values in Kendo Grid. Is it possible to achieve?

Like Below

Rule Description

Test

New

 

Anyway I have attached the PPT. Please verify and if you provide some ideas it could be better.

Boyan Dimitrov
Telerik team
 answered on 12 May 2016
5 answers
127 views

Hello.

I'm having a problem with the order of columns in the grouping bar.  I have a grid with one group.  Now I drag another column to the grouping bar and the column immediately gets droped in front of the existing column instead of behind it.  How can I fix this?

Best regards,
Kalli

Dimiter Topalov
Telerik team
 answered on 12 May 2016
1 answer
183 views
Hello!
The filter in Kendo Grid works on data from the source, not the formatted data. For example in my data source I have columns with numbers between 0 and 1 like 0.5, 0.3 etc. Then I format that numbers to be percents - like 50%, 30% etc. Now if I want to filter that column and put "greater than" 20, I get no results because kendo filters by real data, not the representation.
How do I fix this? Is there a way to write some custom function for that? Please advise.
Nikolay Rusev
Telerik team
 answered on 12 May 2016
2 answers
587 views
I am attempting to repopulate the dropdownlist with new items when a user clicks on a barchart. For the sake of the demo I made it simple html links instead of the barchart. Once they click on a link/bar the dropdownlist will repopulate with items in the new area. The old items will also be removed. The included example is close to what should occur but the dropdownlist's data is not being cleared and updated after clicking on the link. Please advise.
David
Top achievements
Rank 1
 answered on 11 May 2016
1 answer
404 views

Hi -

I'm trying to figure out how to autosize shapes to fix text and also nicely connect shapes.  For the most part this works, but when there are two shapes that connect back to one another the connectors overlap.  Is there a clean way of dealing with this?

Here is an example:

 

<div id="diagram"></div>
<script>
   
  var conns = [{"from":"338338","to":"338339","Label":"Send to Compliance"},{"from":"338338","to":"338341","Label":"Close Compliant"},{"from":"338339","to":"338338","Label":"Reject to Bank"},{"from":"338339","to":"338340","Label":"Review Complete"},{"from":"338340","to":"338341","Label":"Close Complaint"}];
   
  var nodes = [{"id":"338338","Name":"New Complaint","IsFirst":true},{"id":"338339","Name":"Compliance Review","IsFirst":false},{"id":"338340","Name":"Contact Customer","IsFirst":false},{"id":"338341","Name":"Closed","IsFirst":false}]
   
 $("#diagram").kendoDiagram({
        dataSource: nodes,
        connectionsDataSource:conns,
        layout: {
            type: "tree",
            subtype: "right"
        },
        shapeDefaults: {
            type: "rectangle",
            fill: {
              gradient: {
                type: "linear",
                stops: [{
                  color: "#1696d3",
                  offset: 0,
                  opacity: 0.5
                }, {
                  color: "#1696d3",
                  offset: 1,
                  opacity: 1
                }]
              }
            },
            content: {
                color: "White",
                template: "#= Name #"
            },
            height: 70,
            hover: {
                fill: "Gray"
            }
        },
        connectionDefaults: {
            stroke: {
                color: "#979797",
                width: 1
            },
            type: "polyline",
            startCap: "FilledCircle",
            endCap: "ArrowEnd",
            content:{
                template:"#= Label#"
            }
        },
 
        autoBind: true
    });
   
   
   
   
</script>

Dimiter Topalov
Telerik team
 answered on 11 May 2016
2 answers
1.1K+ views
I am successfully done cascading drop-down. But my requirement is to bind dropdown depend on the value of textbox.
Can you please help me.

My code snipe

<td class="EditlableTD">
                                        @Html.LabelFor(model => model.ReferredBy)
                                    </td>
                                    <td class="EditTextBoxTD">
                                        <input type="text" id="R_Ranks" name="ReferredBy" class="k-textbox" />
                                       
                                    </td>
                                </tr>
                                <tr>
                                    <td class="EditlableTD">
                                        Rank
                                    </td>
                                    <td class="EditTextBoxTD">
                                    <script>

                       function filterRank() {
                           return {
                               R_Ranks: $("#R_Ranks").val()
                              };
                       }
                    
                    </script>  
                      @(Html.Kendo().DropDownList()
                                      .Name("Rank")
                                      .OptionLabel("Select Rank...")
                                      .DataTextField("Rk_Name")
                                      .DataValueField("Rk_InternalCode")
                                      .DataSource(source =>
                                      {
                                          source.Read(read =>
                                          {
                                              read.Action("ShowSelectedRank", "Home")
                                                 .Data("filterRank");
                                          })
                                          .ServerFiltering(true);
                                      })
                                        .Enable(true)
                                        
                                        .AutoBind(false)
                                        //.CascadeFrom("BranchCode")
                                        .HtmlAttributes(new {style="width:200px;" })
                                        

                       )
</td>
</tr>

It bind value first time depend on R_Ranks text box value. But 2nd time text change does not effect the dropdown bind.
Doug
Top achievements
Rank 1
 answered on 11 May 2016
3 answers
829 views

In a nutshell, I can not get the Kendo datasource to work with a dropdown list.

I can use $.ajax to call my web service and populate the dropdown list in the success callback. The same transport mechanism does not work with the datasource.

Here's the complete code for the page:

<!DOCTYPE html>
<html>
    <head>
        <title>Kendo Test</title>
        <link rel="stylesheet" type="text/css" href="../CSS/Kendo/kendo.common.min.css" />
        <link rel="stylesheet" type="text/css" href="../CSS/Kendo/kendo.default.min.css" />
        <script type="text/javascript" src="../js/jQuery/jquery-1.7.js"></script>
        <script type="text/javascript" src="../js/Kendo/kendo.web.min.js"></script>
    </head>
    <body>
        <div>
            <input id="dropdownlist" /> <input id="lstfromajax" />
        </div>
        <div id="ajaxresult"></div>
    </body>
    <script type="text/javascript">
        $(function()
        {   // Make an AJAX call and bind on success - This works!
            $.ajax(
            {   url: "../WebServices/Resources.asmx/JSONLookupGetSurgeons2",
                type: "POST",
                dataType: "json",
                contentType: "application/json; charset=utf-8",
                data: "{}",
                success: function(msg)
                {   // Display returned JSON in result div
                    $('#ajaxresult').html(JSON.stringify(msg.d));
 
                    // Try to use directly in drop down list. This Works!
                    $('#lstfromajax').kendoDropDownList(
                    {   dataTextField: "Name",       
                        dataValueField: "Id",       
                        dataSource:
                        {   data: msg.d,
                            schema:
                            {   model:  kendo.data.Model.define(
                                {   id: "Id"
                                })
                            },
                        },
                    });
                },
                error: function(e)
                {   console.log('Ajax error: ' + JSON.stringify(e));
                }
 
            });
         
        // Now, try to use the web service as a direct data source - This doesn't work!
        $('#dropdownlist').kendoDropDownList(
        {   dataTextField: "Name",       
            dataValueField: "Id",
            dataSource: 
            {   transport:
                {   read:
                    {   url: "../WebServices/Resources.asmx/JSONLookupGetSurgeons2",
                        type: "POST",
                        dataType: "json",
                        contentType: "application/json; charset=utf-8",
                        data: "{}"
                    },
                    schema:
                    {   data: "d",
                        model:  kendo.data.Model.define(
                        {   id: "Id"
                        })
                    },
                    error: function(e)
                    {   console.log('Datasource error: ' + JSON.stringify(e));
                    }
                }
            }
        });
        });
</script>          
</html>



I've included a screen snapshot to show the list on the left not working and the list on the right that does work.

I coded a console.log message in the parseJSON method. As expected, this routine is called twice - once for $.ajax and once for the Kendo datasource. They both display the same result - since they are hitting the same web service.

If I click the first dropdown list box (the one that's not populated), the browser ultimately complains of a long-running script and/or aborts!

Please tell me I'm missing something easy. I need to use the CRUD capabilities of the datasource but can't even get the simplest aspect going.

Rama
Top achievements
Rank 1
 answered on 11 May 2016
1 answer
616 views

I have a Kendo UI Grid with a command button column formatted to display a font awesome icon. The grid also handles the change event in order to redirect to the particular records detail page when the row is clicked. The button and icon display as expected but if you click on the button exactly where the icon is the change event get triggered prior to the button click event. Clicking anywhere else on the button causes the button to behave as expected.

Here is an example based on the Use FontAwesome Icons in Kendo UI Grid demo - 

http://dojo.telerik.com/uCOxA

Can anyone think of a way around this problem?

Thanks

Dimo
Telerik team
 answered on 11 May 2016
2 answers
264 views

I have an AngularJS page, and have a populated dataItem. No problem. Now, I would like to populate a dropdown with one of the columns. I can't quite figure out how to do this. Here is my current code. I have hardcoded the dropdown values but would like to populate it instead from the "ticker" column in the dataItem instead. I think this should be super-easy, right?

 

$scope.positionGridOptions = function(dataItem) {
 
    return {
        dataSource: {
            type: "xml",
            transport: {
                read: function(options) {
                    $.ajax({
                        url: "http://fraitcf1vd2607.de.db.com:2701/WS_GetPositionsV3?startDate=" + dataItem.filterStart + "&endDate=" + dataItem.filterEnd + "&fiId=" + dataItem.swapId + "&maxRows=1000",
                        dataType: "xml",
                        success: function(result) {
                            options.success(result);
                        },
                        error: function(result) {
                            options.error(result);
                        }
                    });
                }
            },
            schema: {
                type: "xml",
                data: "/root/row",
                model: {
                    fields: {
                        ticker: {field: "@ticker", type: "string" },
                        longShort: {field: "@longShort", type: "string" },
                        legId: {field: "@legId", type: "number" },
                        instrId: {field: "@instrId", type: "number" },
                        qty: {field: "@qty", type: "number" },
                        thisDay: {field: "@thisDay", type: "string" }
                    }
                }
            },
            serverPaging: false,
            serverSorting: false,
            serverFiltering: false,
            pageSize: 20
        },
        sortable: {
            mode: "multiple",
            allowUnsort: true
        },
        height: 200,
        scrollable: false,
        sortable: true,
        groupable: true,
        pageable: { buttonCount: 4 },
        filterable: {
            extra: false,
            operators: {
                string: {
                    startswith: "Starts with",
                    eq: "Is equal to",
                    neq: "Is not equal to"
                }
            }
        },
        columns: [
            {field: "ticker", title: "Ticker", width: "50px", filterable: {ui: $scope.ticker3Filter} },
            {field: "longShort", title: "Long/Short", width: "50px", filterable: false},
            {field: "legId", title: "Leg ID",  width: "50px", filterable: false},
            {field: "instrId", title: "Instr ID", width: "50px", filterable: false},
            {field: "qty", title: "Quantity", width: "50px", filterable: false},
            {field: "thisDay", title: "Day", width: "50px", filterable: false}
            ]
        };
    };
     
    // How to get the ticker element for each row in dataItem?
    $scope.ticker3Filter = function(element) {
        element.kendoDropDownList({
        optionLabel: "--Select Value--",
        dataSource: ["ABC.AX","AGL.AX","AHD.AX","AHE.AX"]
     });
    }      

Mark
Top achievements
Rank 1
 answered on 11 May 2016
3 answers
238 views

Hey,

i'm using the scheduler component with angular.
The result so far is pretty okay, but the events do not fill up the timeslots. When looking at the event div, there is a fixed width, that is not set correctly. I have no fancy custom css going on, so any idea what causes this issue?

Cheers,
Jens

Dimo
Telerik team
 answered on 11 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?