Telerik Forums
Kendo UI for jQuery Forum
0 answers
169 views
Do Hierarchial Data Sources & Templates work well together? Would it be possible to get an example of such a thing?
Kyle
Top achievements
Rank 1
 asked on 13 Aug 2012
1 answer
107 views
Hi

Is it possible to have an area chart without the gaps to left and right of the chart area? (see image attached)

Hristo Germanov
Telerik team
 answered on 13 Aug 2012
0 answers
205 views
Hi everyone.

I have an issue with some comboboxes which I create dynamically inside a template for a listview.

I need to be able to get the value of the combobox when a button is clicked and use that value to update my datasource. My problem is that I cannot isolate the combobox in order to get the data.

Can someone please have a look at my code and give me some ideas??

Template:

<script type="text/x-kendo-template" id="packagesTemplate">       
        <h3 class="item-title">${Name}</h3>
        <p class="item-info">Status: ${Status}</p>                
        <select data-role="comboBox" id="select#:id#" >
        <option value="Pending">Pending</option>
        <option value="Delivered">Delivered</option>
        <option value="Damaged">Damaged</option>
        <option value="Refused">Refused</option>
        </select>   
         
        <a data-role="button" data-item-id="#:id#" data-click="saveChanges" class="details-link">Save Changes</a>

I have no problem getting the dataItem from the button click (var button = e.button). Is there no way to get the combobox in a similar fashion? (var combo = e.comboBox)? I have tried everything I can think of and nothing seems to be working.

Button Click: (This must get the combobox value/text)

function saveChanges(e) {
            var button = e.button,
                item = packageDataSource.get(button.data("itemId"));
            console.log(item);
        }
Devon
Top achievements
Rank 1
 asked on 13 Aug 2012
0 answers
182 views
hi,
I want to pass an array from view to the controller using parameterMap as shown below
parameterMap:
                        function (data, options) {
                            if (options === "read") {
                                val = sessionStorage.getItem("value");           // contains array
                                return kendo.stringify(val);

                            }
                        }
but i am not able to retrieve those values in the controller.can u tell me how to pass an array from view to the controller using parametermap.
charan
Top achievements
Rank 1
 asked on 13 Aug 2012
2 answers
662 views
Hi everyone,

I'm trying to display items containing html inside a dropdown.

So as an example let's imagine I got some items like :

var tMyItems = [{ value : "0", template: "<div class='myclass'><p>Item 1</p></div>"  },
{ value : "1", template: "<div class='myclass'><p>Item 2</p></div>"  }]

Im binding them to a dropdown using

 $("#LayoutDDL").kendoDropDownList({
        dataSource: tMyItems  
        dataTextField: "template",
        dataValueField: "value"
 });

And I would like to see each item content interpreted as html (no markups, css applied ..) So far I'm seeing the item itself but the html is not interpreted.

Is there anyways to handle that with the dropdown ?

Thanks,

Damien


Courouble Damien
Top achievements
Rank 1
 answered on 13 Aug 2012
2 answers
265 views
This is just a static table I'd like to apply the overall Kendo css theme of my site to. Unfortunately, I cannot get rid of the vertical scroll to the right of the table. I've tried everything. Any ideas?  


<div class="k-widget k-grid" id="Grid">
      <div class="k-grid-header">
        <div class="k-grid-header-wrap">
          <table cellspacing="0">
            <tr>
              <th>Type</th>
              <th>Estimate</th>
              <th>Actual</th>
              <th>Description</th>
            </tr>
          </table>
        </div>
      </div>
      <div class="k-grid-content">
        <table cellspacing="0">
          <colgroup>
            <col />
            <col />
            <col />
            <col />
            <col />
          </colgroup>
          <tbody>
            @foreach (var item in Model.EventFundings)
            {
                                     <tr >
                                      <td>
                                        @item.FundingCostTypeTitle
                                      </td>
                                      <td>
                                        @item.EstimateCost
                                      </td>
                                      <td>
                                        @item.ActualCost
                                      </td>
                                      <td>
                                        @item.Description
                                      </td>
                                    </tr>
            }
          </tbody>
        </table>
      </div>
    </div>
Ryan Lege
Top achievements
Rank 1
 answered on 13 Aug 2012
0 answers
174 views
Hi,

I am having a listview with 4 list items.Each item consists of a check box and when ever i am clicking the checkbox it is selecting the list view.But again when i click on another list view item's checkbox it is selecting and the first listview item is deselecting.
What i want is i want all the listviews selected when the check box is selected.
How can i able to do that 

Please provide me sample or an example 


Thanks and Regards,
Srinivas
srinivas
Top achievements
Rank 1
 asked on 13 Aug 2012
1 answer
293 views
Hi,

I am using the Kendo DropDownList via the Asp.Net Mvc wrapper and binding it to a SelectList in my Model. If a SelectItem is empty (i.e. Text = "") then it displays with a height of (almost) zero making it appear invisible in the list. This behaviour is different from the Telerik Extensions for Asp.Net Mvc, which displays as I would expect - empty items at the same line height as non-empty items.

Does anyone know of a workaround or if/when this will be fixed?

many thanks.
Dimo
Telerik team
 answered on 13 Aug 2012
1 answer
92 views
hi,
I need to localize the grid
how can I do?

if I modify the js I lost the mod in the next update

thanks
Alexander Valchev
Telerik team
 answered on 13 Aug 2012
0 answers
213 views
Hi everyone.

I have a listview that is populated from a remote datasource. What I need to do is populate a second list with relevant data from the item selected from the first list.

I can do it by "re-populating"
 the first list but this gives me errors later one when selecting something from the second list.

Long story short, I have a list of customers which is populated from an external datasource. Each customer record has an array of items "nested" within their data record. eg: 

{
  "ID": 3,
  "Name": "Sarah Carlson",
  "Telephone": "(011) 123 4567",
  "Address": "1 Test ave",
  "Suburb": "Test",
  "City": "Testville",
  "Province": "Gauteng",
  "Country": "South Africa",
  "PostalCode": "0001",
  "DeliveryStatus": "Pending",
  "Packages": [
    {
      "ID": 1,
      "Name": "Package 1",
      "Status": "Pending"
    },
    {
      "ID": 2,
      "Name": "Package 2",
      "Status": "Pending"
    }
  ]
}

What I need to do is, when the customer is selected, display a new list with the customer's packages on it with a combobox and a button for each package allowing the package status to be changed.

Here's my code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
    <title>Deliveries</title>
    <script src="js/jquery.min.js"></script>
    <script src="js/kendo.mobile.min.js"></script>
    <script src="js/console.js"></script>
    <link href="styles/kendo.common.min.css" rel="stylesheet" />
    <link href="styles/kendo.mobile.all.min.css" rel="stylesheet" />
</head>
<body>
    <a href="Index.html">Back</a>
   <div data-role="view" id="listview-customers" data-init="showCustomerList" data-title="Customers">
        <ul id="customer-listview">
        </ul>
    </div>
    <div data-role="view" id="listview-packages" data-title="Packages">
        <ul id="package-listview">
        </ul>
    </div>
    <div data-role="layout" data-id="databinding">
        <header data-role="header">
        <div data-role="navbar">
            <span data-role="view-title"></span>
            <a data-align="right" data-role="button" class="nav-button" href="Index.html">Home</a>
        </div>
    </header>
    </div>
    <script>
        var id;
        var packages;
        var packageDataSource = new kendo.data.DataSource({
            schema: {
                model: {
                    id: "ID",
                    fields: {
                        Name: { type: "string" },
                        Status: { type: "string" }
                    }
                }
            }
        });
 
        var dataSource = new kendo.data.DataSource({
            transport: {
                read: {
                    url: "http://localhost:8080/databases/shipping/docs",
                    dataType: "json",
                    data: {
                        q: "javascript"
                    }
                }
            },
            schema: {
                model: {
                    id: "id",
                    fields: {
                        Name: { type: "string" },
                        Telephone: { type: "string" },
                        Address: { type: "string" },
                        Suburb: { type: "string" },
                        City: { type: "string" },
                        Province: { type: "string" },
                        Country: { type: "string" },
                        PostalCode: { type: "string" },
                        DeliveryStatus: { type: "string" },
                        Packages: { type: "auto" }
                    }
                }
            }
        });
 
        function showCustomerList() {
            {
                $("#listview-customers").kendoMobileListView({
                    dataSource: dataSource,
                    template: kendo.template($("#customersTemplate").html()),
                    selectable: true,
                    click: function (e) {
                        packages = e.dataItem.Packages;
                        showPackageList();
                        //showButton();
                    }
 
                });
            }
        }
 
        function showPackageList() {
            for (var a = 0; a < packages.length; a++) {
                packageDataSource.add({
                    ID: packages[a].ID,
                    Name: packages[a].Name,
                    Status: packages[a].Status
                });
            }
            $("#listview-customers").kendoMobileListView({
                dataSource: packageDataSource,
                template: kendo.template($("#packagesTemplate").html())
            });
        }
 
        function saveChanges(e) {
            var button = e.button,
                item = packageDataSource.get(button.data("itemId"));
            console.log(item);           
        }
         
    </script>
    <script type="text/x-kendo-template" id="customersTemplate">       
        <h3 class="item-title">${Name}</h3>       
        <p class="item-info">Status: ${DeliveryStatus}</p>       
    </script>
    <script type="text/x-kendo-template" id="packagesTemplate">       
        <h3 class="item-title">${Name}</h3>
        <p class="item-info">Status: ${Status}</p>       
        <select data-role="combobox">
            <option value="Pending">Pending</option>
            <option value="Delivered">Delivered</option>
            <option value="Damaged">Damaged</option>
            <option value="Refused">Refused</option>
        </select>       
        <a data-role="button" data-item-id="#:id#" data-click="saveChanges" class="details-link">Save Changes</a>           
    </script>
</body>
</html>

I would really appreciate it if anyone could help me get this right???
Devon
Top achievements
Rank 1
 asked on 13 Aug 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
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
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?