Telerik Forums
Kendo UI for jQuery Forum
0 answers
147 views
hello.
I have a problem with the buttons that I have for a grid with a radio button.
when selecting out of the box or button to select radiotbutton clears the entire contents of the cell.
any help is appreciated!
Greetings!

<div id="example" class="k-content">
           <div id="organizer">
          <ul id="panelbar">
               <li class="k-state-active">
                
                   <span class="k-link k-state-selected">producto 1</span>
                   
               <div id="example" class="k-content">
      
           <div id="rowSelection" style="width:620px; height:300px"></div>
 
          <script>
                 $(document).ready(function() {
                   $("#rowSelection").kendoGrid({
                       dataSource: {
                           data: FuncionDellenado(),
                           
                       },
                       selectable: "multiple",
                       pageable: true,
                       scrollable: true,
                       navigatable: true,
                      columns: [
                          { field: "FirstName", title: "productos", format: "{0:c}", type:"String",editable: false, width: "150px" },
                           { field: "City", title: "cantidad", editable:true, type:"Number", validation: { min: 1, required: true },width: "80px" },
                           {field: "BirthDate", title: "fecha de Entrega",type:"String",editable:true,width:"100px"},
                           { field: "Favoritos", template: "#= kendo.toString(\'<label \class=\"label_radio\"for=\"radio-01\">\<input name=\"sample-radio\" id=\"radio-01\" value=\"1\" type=\"radio\"/>\.\</label>\')##= kendo.toString(\'<label \class=\"label_radio\" for=\"radio-01\">\<input name=\"sample-radio\" id=\"radio-01\" value=\"1\" type=\"radio\" />\.\ </label>\') ##= kendo.toString(\'<label \class=\"label_radio\" for=\"radio-01\">\<input name=\"sample-radio\" id=\"radio-01\" value=\"1\" type=\"radio\" />\.\ </label>\') ##= kendo.toString(\'<label \class=\"label_radio\" for=\"radio-01\">\<input name=\"sample-radio\" id=\"radio-01\" value=\"1\" type=\"radio\" />\.\ </label>\') ##= kendo.toString(\'<label \class=\"label_radio\" for=\"radio-01\">\<input name=\"sample-radio\" id=\"radio-01\" value=\"1\" type=\"radio\" />\.\ </label>\') #", title: "Favoritos", width: "80px" },
                           { field: "añadir", template: "#= kendo.toString(\'<input type=IMAGE SRC=\"add.gif\"\id=\"añadir\" value=\"CODE\"  />\') #", title: "añadir", width: "210px" }
                            
                           ],
                           editable: true
                   });
 
                   $('#añadir').click(function () {
 
           var sourcegrid = $('#rowSelection').data('kendoGrid');        //SOURCE GRID
          var destinationgrid = $('#Selection').data('kendoGrid'); // DESTINATION GRID
 
           sourcegrid.select().each(function () {
              var dataItem = sourcegrid.dataItem($(this));
               var column = dataItem.FirstName; // whatever the name of the unique id for your data source
                
               destinationgrid.dataSource.add(dataItem);       // DESTINATION DATASOURCE
          
                      });
           
           
         destinationgrid.refresh();                          // MUST REFRESH THE DESTINATION GRID
          
           });
            
            
            
            
           });
           </script>
Ricardo
Top achievements
Rank 1
 asked on 25 Apr 2012
0 answers
167 views
I'd like to know if there is an example of dropdownlist with checkboxes.
I think I could use a template to display checkboxes on each list item, but then how could I retrieve the checked items ?
Bruno
Top achievements
Rank 1
 asked on 25 Apr 2012
2 answers
406 views
Previously I had been configuring my DataSource with an ObservableArray initialized with an empty array, like:

dsData = new kendo.data.ObservableArray([]);
ds = new kendo.data.DataSource({

    data: dsData
});

With the newest nightly builds, this results in a "ghost" item in the DataSource with all undefined values.

Just passing the DataSource an empty array fixes the problem but is what I was doing wrong and is it effectively the same as what I'm now doing?

De
Top achievements
Rank 1
 answered on 25 Apr 2012
7 answers
787 views
If I set scrollable and set the height, it puts the height on the "k-grid k-widget" element, but then the SAME value on the "k-grid-content" child item. 

So shouldn't ...k-grid be the height, but the k-grid-content be (k-grid - k-grid-header)?
Brandon
Telerik team
 answered on 25 Apr 2012
8 answers
276 views
I am trying to create a sample that will look like the instagram and I can do this statically as follows:

<div data-title="images" data-role="view" id="index" data-url="/" data-layout="default" data-model="ImageViewModel" data-init="initImageView">
         <div id="container">
            </div>
 
    </div>

now this produces the look that I want (see attached file) with each image side by side and N fit on a row according to the width of container. of course this is more than crude as I am not using the VM but cannot see how to use one of your containers that allow using data-binding and MVVM. All the List want to put each image on its own line. This is pretty easy in Sencha Touch as they have dataview container which u seem to be missing.

Thanks
john
Top achievements
Rank 1
 answered on 25 Apr 2012
3 answers
164 views
Hi there,

It looks like I can't setup batch editing with a Grid/DataSource with grouped data.  When it calls Grid._modelForContainer(container) which calls DataSource.getByUid(id) it does not return any values even though the uid is valid.  It looks to me like getByUid does not handle grouped/nested data.  When I step into the loop in the code below the data object has 2 items at the top level which are groups and then each of those has an array of items which are the data items inside that group.

getByUid: function(id) {
    var idx, length, data = this._data;
 
    for (idx = 0, length = data.length; idx < length; idx++) {
        if (data[idx].uid == id) {
            return data[idx];
        }
    }
}

Is there something I should be doing differently on the grid/datasource setup to make this work as I expected it to?

Thanks!
Matt
Rosen
Telerik team
 answered on 25 Apr 2012
3 answers
163 views
Can I use attributes on each property in my C# view (class) and just have the Kendo Grid use that text for the column titles?

Thanks,
Jay
Dimo
Telerik team
 answered on 25 Apr 2012
2 answers
128 views
i'm trying to create an input widget similar to a datepicker. It should have an icon. When its clicked it should show a window popup (rather than a calender).

can anyone point me to a good example.
thanks
kashim
Kashim
Top achievements
Rank 1
 answered on 25 Apr 2012
0 answers
26 views
Hi,

I'm porting a simple Energy cost calculator made in Javascript.
When i use the <form> tag Kendo UI isn't correcly displayed. This simple tag ins't supported or im wrong?

How can i fix this code to work with kendo ui? how can i access to my fields watts, hours and how to call the javascript function?


<div data-role="view" id="forms" data-title="Calculadora de Consumo" data-layout="layout" data-transition="slide" data-init="initForm" >
    <ul data-role="listview" data-style="inset" data-type="group">
         
         
        <li>
         
            Sepa cuánto consumen sus artefactos.
            <ul>
                <li>
                    <input type="tel" name="watts" size="5" value="0" />Watts del artefacto
                </li>
                 
                <li>
                    <input type="tel" name="hours" size="5" value="0" />Horas de funcionamiento
                </li>
                 
                <li>
                <input type="tel" name="unitcost" size="9"  value="105" />Costo KWh
                </li>
                <li>
                    <input type="button" value="Calculate" onclick="workitout(this.form)" />
                </li>
                 
                <li>
                <input type="text" name="daycost" size="7" />Costo diario
                </li>
                <li>
                <input type="text" name="qtrcost" size="7" />Costo mensual
                </li>
                 
                <li>
                <input type="text" name="yrcost" size="7" />Costo anual
                </li>
                 
            </ul>
             
        </li>
         
    </ul>
</div>



<script language="JavaScript" type="text/JavaScript">
<!--
function workitout(form)
{
var kw = form.watts.value / 1000;
var hrs = parseInt(form.hours.value);
 
var cost = (form.unitcost.value * kw * hrs) / 100;
var annual = cost * 365;
var quarter = annual / 12;
  
cost = round(cost);
annual = round(annual);
annual = round(annual);
 
form.daycost.value = cost;
form.qtrcost.value = quarter;
form.yrcost.value = annual;
}
function round (num) {
num = Math.round(num * 100) / 100;
num = (num + 0.001) + '';
return num.substring(0, num.indexOf('.') + 3);
}   
//  End -->
</script>
Orlando
Top achievements
Rank 1
 asked on 25 Apr 2012
1 answer
510 views
is there a way to fire keyup event in editor? also how to use onChange? but still onchanges uses blur right? and i need to know if someone changed one letter without blur.
Eric
Top achievements
Rank 1
 answered on 25 Apr 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
Iron
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
Iron
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?