Telerik Forums
Kendo UI for jQuery Forum
1 answer
159 views
When clicking a row, nothing happens. No error is throws, and no row is being selected.
I tried both selectable: "row" and selectable: "row multiple".

Is there anything wrong with this code ?

($codesListContainer is a reference to the <div> where the grid will be placed.)

$codesListContainer.kendoGrid({
    dataSource: {
        type: "json",
        transport: {
            read: '@Url.Action("AllCodes", "Dossier")'
        },
        aggregate: [
            { field: 'TotalPrice', aggregate: 'sum', format: "{0:C}" }],
        pageSize: 10
    },
    selectable: 'row',
    detailInit: detailInit,
    columns: [
        { field: 'Number', title: 'Nr.', width: '10%' },
        { field: 'Title', title: 'Title', width: '60%' },
        { field: 'UnitPrice', title: 'Price per unit', width: '10%' },
        { field: 'NumberOfUnits', title: 'Number of units', width: '10%' },
        { field: 'TotalPrice', title: 'Total', format: "{0:C}", footerTemplate: '#=kendo.format("{0:c}", sum)#', width: '10%' }
    ],
    pageable: true,
    scrollable: false,
    change: function () {
        alert("change");
    }
});

Thanks in advance.

Nick
Nick
Top achievements
Rank 1
 answered on 22 Oct 2012
0 answers
101 views
Hi

I have problem with hierarchical data within the datasource. As a trivial example I have the following data:

var data [{
    id1,
    firstName"Alex",
    positions[{
        address{
            street"somewhere"
        }
    }]
}];

in which the parent (firstName, id) should be shown inside a Grid and the Children (positions) inside the popup dialog. Now if I bind that it's not possible to show the street as a template #=address.street# 

How can I define a hierarchical DataSource and how can i define a hierarchical schema (to use the validation) 

Here I have a JSFiddle to reproduce my problem

Thanks in advance

Roland
Top achievements
Rank 1
 asked on 22 Oct 2012
1 answer
3.2K+ views
Hi

I have a grid that contains a field for an email address.  I need to validate that the email address at least conforms to the basic "<name>@<domain>.<tld>" format when the user enters a record.

I tried setting the type to "email" in the dataSource model, as below:

$("#usersGrid").kendoGrid({
     dataSource: {
         schema: {
             model: {
                 id: "Id",
                 fields: {
                     Id: { editable: false },
                     Email: { type: "email", validation: { required: true} },
                     Username: { validation: { required: true} }
                 }
             }
         }
     },
...

Interestingly,  it worked for updates.  However, when I try to create a new record, it gives the error: "Uncaught ReferenceError: Email is not defined".

My questions are:

1. Is there a way to validate a field that contains an email address in the grid? 

2. Additionally, is there a way to detect a validation failure from outside the grid?  I'm implementing a wizard and want to prevent the user from proceeding if they press the 'Next' button when the grid has an outstanding validation failure.
Vladimir Iliev
Telerik team
 answered on 22 Oct 2012
1 answer
121 views
Hi All,

I know this might be an ODD question, but if anyone knows how to do this, please let me know.  During a meeting, a request came up to expand the width of each tab labels to fill up the width of the tab control.  The number of tab labels are generated dynamically, there could be 1 to 6 tabs labels and we need to find a way to increase the width of the labels, so they will leave no "empty" space on the left of the last tab label when there's not enough labels to fill the width of the control.

Thanks~
Pooja
Top achievements
Rank 1
 answered on 22 Oct 2012
0 answers
69 views
Hi,

I tried reducing the size of my grid header as well as the footer where the page size and page numbers are mentioned. On doing so , the text in the header doesnt fit completely inside the header. Also, In case i want to remove any padding or margin around the title I am unable to do so in the header or footer.

The same hold true for any kendo control whose header or footer i need to change size. Please help
Pooja
Top achievements
Rank 1
 asked on 22 Oct 2012
1 answer
221 views
I'm using ServerGrouping, I can group 1 level without problem, however when I try to group by a second level I get an error "Uncaught TypeError: Cannot read property 'ProductLine' of null"
My Json Data set that is returned from the server is:

{
   "Count":5,
   "ViewData":null,
   "groups":[
      {
         "aggregates":null,
         "field":"ProductLine",
         "hasSubgroups":true,
         "items":[
            {
               "aggregates":{
                  "JobID":{
                     "count":2
                  }
               },
               "field":"Tier",
               "hasSubgroups":false,
               "items":[
                  {
                     "ProductLine":"CART for Commuters",
                     "JobID":"042712",
                     "Tier":"Tier 1"                     
                  },
                  {
                     "ProductLine":"CART for Commuters",
                     "JobID":"060712",
                     "Tier":"Tier 1"
                  },
                  {
                     "ProductLine":"Platinum",
                     "JobID":"101792",
                     "Tier":"Tier 1"
                  }
               ],
               "value":"Tier 1"
            }
         ],
         "value":"CART for Commuters"
      },
      {
         "aggregates":null,
         "field":"ProductLine",
         "hasSubgroups":true,
         "items":[
            {
               "aggregates":{
                  "JobID":{
                     "count":1
                  }
               },
               "field":"Tier",
               "hasSubgroups":false,
               "items":[
                  {
                     "ProductLine":"CART for Commuters",
                     "JobID":"042712",
                     "Tier":"Tier 1"
                  },
                  {
                     "ProductLine":"CART for Commuters",
                     "JobID":"060712",
                     "Tier":"Tier 1"
                  },
                  {
                     "ProductLine":"Platinum",
                     "JobID":"101792",
                     "Tier":"Tier 1"
                  }
               ],
               "value":"Tier 1"
            }
         ],
         "value":"Platinum"
      },
      {
         "aggregates":null,
         "field":"ProductLine",
         "hasSubgroups":true,
         "items":[
            {
               "aggregates":{
                  "JobID":{
                     "count":2
                  }
               },
               "field":"Tier",
               "hasSubgroups":false,
               "items":[
                  {
                     "ProductLine":"Platinum",
                     "JobID":"101792",
                     "Tier":"Tier 2"
                  },
                  {
                     "ProductLine":"Platinum",
                     "JobID":"101792",
                     "Tier":"Tier 2"
                  }
               ],
               "value":"Tier 2"
            }
         ],
         "value":"Platinum"
      }
   ],
   "aggregates":null,
}

My grid code is as follows:
var grid = $("#grid").kendoGrid({
   dataSource: {
type: "json",
serverPaging: true,
serverGrouping: true,
serverAggregates: true,
pageSize: 500,
transport: {
   read: "http://localhost:6332/api/Test
},
schema: { data: "ViewData", total: "Count", groups: "groups", aggregates: "aggregates" },
group: [{ field: "ProductLine" }, { field: "Tier"}]
   },
   scrollable: false,
   sortable: true,
   pageable: true,
   columns: colList
});


I have been over it and over it and as far as I can see everything looks correct. I'd appreciate any assistance. Thanks.


masterK
Top achievements
Rank 1
 answered on 22 Oct 2012
3 answers
86 views
Hello, 
I have an iPhone 5 and in the demo i have many display bug like no footer, can't scroll in the bottom of page....

have you a solution? Kendoui mobile is compatible with IO6 and iphone 5?
Petyo
Telerik team
 answered on 22 Oct 2012
1 answer
150 views
Ok so the data object I have to bind to (remote data, have no control over it) has a property called "Date", and since it's also sending me dates in ISO format I need to do one of these

#= kendo.toString(new Date(data.Date), 'hh:sstt') #

However the error thrown is "Date is not a function"

I do this same thing in another similar object whos date property is PublishedDate (not "Date") and the above code works fine...so I assume its the ambiguous naming.

Is there anything I can do outside of telling telligent community server to change their REST API :)
Dimo
Telerik team
 answered on 22 Oct 2012
3 answers
349 views
Hi

I have added splitter in a tab but it is not resize with tab content.Also I have resize the tabstrip size with the window size with follwing parameter

<div id="tabstrip" style="height: 100%; border: 0;">

The tab has resize but the content is not resized.

code :
001.<div id="tabstrip" style="height: 100%; border: 1;">
002.           <ul>
003.               <li>First tab</li>
004.               <li>Second tab</li>
005.           </ul>
006.           <div>
007.                     
008.           </div>
009.           <div>
010.               <div id="vertical" >
011.                   <div>
012.                       <div id="horizontal1" >
013.                           <div><div id="grid"></div></div>
014.                           <div><div id="grid1"></div></div>
015.                       </div>
016.                   </div>
017.                   <div>
018.                       <div id="horizontal2" >
019.                           <div></div>
020.                           <div></div>
021.                       </div>
022.                   </div>
023.                   <div>
024.                       <div id="horizontal3" >
025.                           <div></div>
026.                           <div></div>
027.                       </div>
028.                   </div>
029.               </div>
030.           </div>
031.       <script type="text/javascript">
032.               $(document).ready(function() { 
033.                  $("#tabstrip").kendoTabStrip();
034.                   
035.                  $("#grid").kendoGrid({ 
036.                      dataSource: { 
037.                          data: createRandomData(50),
038.                           pageSize: 10 
039.                      },
040.                       height: 250, 
041.                       groupable: true, 
042.                       scrollable: true,
043.                       sortable: true,
044.                       pageable: true,
045.                       columns: [ 
046.                          
047.                              field: "FirstName",
048.                               title: "First Name"
049.                           },
050.                           
051.                             field: "LastName",
052.                             title: "Last Name"
053.                           }, 
054.                          
055.                             field: "City"
056.                           }, 
057.                          {
058.                             field: "Title" 
059.                          }, 
060.                          {  
061.                             field: "BirthDate", 
062.                             title: "Birth Date",
063.                             template: '<#= kendo.toString(BirthDate,"dd MMMM yyyy") #>'
064.                           },
065.                           {
066.                               field: "Age"
067.                           }
068.                       
069.                  });
070.                   $("#grid1").kendoGrid({
071.                      height: 250,
072.                       groupable: true,
073.                       scrollable: true,
074.                       sortable: true,
075.                       pageable: true,
076.                       columns: [
077.                          {
078.                              field: "FirstName",
079.                               title: "First Name"
080.                           },
081.                           {
082.                              field: "LastName",
083.                               title: "Last Name"
084.                           },
085.                            
086.                       ]
087.                  });
088.                   $("#vertical").kendoSplitter({
089.                       orientation: "vertical",
090.                       panes: [
091.                           { collapsible: true, size: "100%" },
092.                           { collapsible: false },
093.                           { collapsible: true, size: "100%" }
094.                       ]
095.                   });
096.                   $("#horizontal1").kendoSplitter({
097.                      orientation: "horizontal",
098.                      panes: [
099.                           { collapsible: true, size: "100px" },
100.                           { collapsible: false },
101.                           { collapsible: true, size: "100%" },
102.               { resizable: true }
103.                       ]
104.                   });
105.                   $("#horizontal2").kendoSplitter({
106.                       orientation: "horizontal",
107.                      panes: [
108.                           { collapsible: true, size: "100px" },
109.                           { collapsible: false },
110.                           { collapsible: true, size: "100%" },
111.               { resizable: true }
112.                       ]
113.                   });
114.                   $("#horizontal3").kendoSplitter({
115.                       orientation: "horizontal",
116.                      panes: [
117.                           { collapsible: true, size: "100px" },
118.                           { collapsible: false },
119.                           { collapsible: true, size: "100%" },
120.               { resizable: true }
121.                       ]
122.                   });
123.                                        
124.              });
125.                
126.       
127.           </script>
128.     </div>

Please help me.

Thanks & Regards,
Sourav
Luke jj
Top achievements
Rank 1
 answered on 22 Oct 2012
1 answer
243 views
If i set column as encoded false it still shows html text.kendo grid does not set encoded false.how can i change this?
Muthu
Top achievements
Rank 1
 answered on 22 Oct 2012
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
Date/Time Pickers
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)
SPA
Filter
Drawing API
Drawer (Mobile)
Globalization
Gauges
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
OrgChart
TextBox
Effects
Accessibility
ScrollView
PivotGridV2
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
Popover
DockManager
FloatingActionButton
TaskBoard
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
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?