Telerik Forums
Kendo UI for jQuery Forum
0 answers
42 views
Can you support theming the active tab label separately from its related content please? For example, having .k-state-active and .header would result in a bright orange below, and on switching tabs, losing .k-state-active class would revert to usual colour. the .content class would not be orange, only the header, and so wouldn't change.

<div id="tabstrip">
    <ul>
        <li class="k-state-active header">First Tab</li>
        <li class="header">Second Tab</li>
        <li class="header">Third Tab</li>
    </ul>
    <div class="content"><p>TabStrip sample content, first tab</p></div>
    <divclass="content"><p>TabStrip sample content, second tab</p></div>
    <divclass="content"><p>TabStrip sample content, third tab</p></div>
</div>
Dave
Top achievements
Rank 1
 asked on 29 May 2012
3 answers
132 views
Hi,
I think this might be a dumb question but I am stumped. I have a view model with a property that contains an array of 'objects'. When I stringify this, my array property isn't being deserialized as an array, but rather I get something that looks like this:
\"Metrics\":{\"0\":{\"Id\":19,\"Curren...}, "\1\": { ....

I was expecting something like:
Metrics : [{"Id":19, "Current": 12.34155...}, {"Id": 23, "Current....}, ...]

When I post this all back through ajax my property of Metrics does not get deserialized properly by asp.net mvc.

Any help would be appreciated,
ian
Iliana Dyankova
Telerik team
 answered on 29 May 2012
0 answers
128 views
hi,
I have an image field in my database.i am able to load the grid from the database except image field.I want to load the image from the database.In the image field it is displaying like image size with cross mark.i wrote the code like:
{ field: "Image", title: "image", template:"<img src ='#= Image #'/>"}
how can i get the image in the grid?
charan
Top achievements
Rank 1
 asked on 29 May 2012
2 answers
156 views
Hi,

Is there any posibility to add a drop down list in editing  and save the values in the list view.

Thanks and regards,
Durga Bhavani Gubbala,
 
durga bhavani
Top achievements
Rank 1
 answered on 29 May 2012
0 answers
124 views
In the Drag/Drop demo (http://demos.kendoui.com/web/dragdrop/index.html), there is an example of setting a cursor offset, which gets applied to a div. Is there a way to apply a cursor offest to a data grid row?
Kyle
Top achievements
Rank 1
 asked on 28 May 2012
3 answers
304 views
In a tabstrip bound to a datasource, is there any way to specify a template for the text that displays on the tab or concatenate a string value along with the field bound to dataTextField?  For example, if I have datasource containing a column called "TeamName" containing  the values "Red", "Blue", and "Green", is there any way to concatenate a string such as " Team" so that the tab text actually displays the concatenated values of "Red Team", "Blue Team", "Green Team"?

Any assistance is appreciated; I'm happy to provide further clarification or sample code if needed.
Iliana Dyankova
Telerik team
 answered on 28 May 2012
3 answers
1.7K+ views
Grid configuration properties allows for only a static text message.  The default is 
DELETECONFIRM = "Are you sure you want to delete this record?",

I typically like to include teaser information in case the user isn't paying attention or stray clicked.  For example:
"Are you sure you want to delete Jim Bob's dental records?",

Such a message requires Grid _confirmation method to handle a confirmation setting which is a function.  The following code modifications does so:
grid.js
removeRow calls _confirmation with model
removeRow: function(row) {
     var that = this,
         model,
         mode;
  
     row = $(row); //RAD
     model = that._modelForContainer(row); // RAD
  
     // if (!that._confirmation()) {
     if (!that._confirmation(model)) { // RAD pass model unconditionally.  callee will decide what to do with it
         return;
     }
  
     row.hide();
     // row = $(row).hide(); // RAD
     // model = that._modelForContainer(row); // RAD
  
     if (model && !that.trigger(REMOVE, { row: row, model: model })) {
         that.dataSource.remove(model);
  
         mode = that._editMode();
  
         if (mode === "inline" || mode === "popup") {
             that.dataSource.sync();
         }
     }
 },

if confirmation is a function pass the model to it
_confirmation: function(model) { // RAD
    var that = this,
        editable = that.options.editable,
        confirmation = editable === true || typeof editable === STRING ? DELETECONFIRM : isFunction(editable.confirmation) ? editable.confirmation(model) : editable.confirmation;
  
    return confirmation !== false && confirmation != null ? that._showMessage(confirmation) : true;
},

mypage.js
and in .kendoGrid configuration specify confirmation as a function.
editable: {
    mode:"popup",
    confirmation: function(model) {
        return 'Are you sure you want to delete the '+model.rectype+' record of '+model.name+'?'
    }},

A coder could also template the confirmation text, but only the text because the confirmation dialog raised by _showMessage is the native browser routine window.confirm(text).

A further modification of _confirmation could handle the return type to enable an even more sophisticated custom confirmation() behavior: 
string -> use standard kendo prompter with returned text as prompt
false -> cancel the delete action. function raised a custom dialog, or programmatic determination
true -> attempted an unprompted deletion.  function raised a custom dialog, or programmatic determination

Enjoy,
Richard
Steve
Top achievements
Rank 1
 answered on 28 May 2012
0 answers
94 views
Hello,

Is it possible to hide a serie from the chart when switching from normal columns mode to stack mode? I searched the docs but didn't find a solution.

Thank you,
soso

EDIT:
Nevermind managed a fairly clean workaround. Another idea is here http://www.kendoui.com/forums/dataviz/chart/dynamically-switching-on-and-off-series.aspx
Soso
Top achievements
Rank 1
 asked on 28 May 2012
0 answers
76 views
Hi!
I've run into an issue with the aggregates and footer templates. When refreshing the grid, if there's no data, the console shows an error (about a missing aggregate) and the footers don't get updated. I've created a simple demo of this issue here:

http://jsfiddle.net/GNdy9/5/

Is this a known problem? Did I mess up the aggregate declaration?

Thanks a lot,
Andrés
Andrés
Top achievements
Rank 1
 asked on 28 May 2012
8 answers
103 views
This release broke my tabstrips completely.

I tried to run the example from the web site using this release and going from tab to tab doesn't display the new tab contests correctly.

As far as I can see tabstrips just aren't working.

Here is the HTML:

<!DOCTYPE html>
<html>
  <head>
    <title></title>
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="js/kendo.web.min.js" type="text/javascript"></script>
    <script src="js/kendo.mobile.min.js" type="text/javascript"></script>
    <link href="styles/kendo.common.min.css" rel="stylesheet" type="text/css" />
    <link href="styles/kendo.dataviz.min.css" rel="stylesheet" type="text/css" />
    <link href="styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <div data-role="view" id="tabstrip-profile" data-title="Profile" data-layout="mobile-tabstrip">
      <ul data-role="listview" data-style="inset" data-type="group">
        <li>
          <ul>
            <li>
              <h2>
                Carine <span>Callahan</span>
              </h2>
            </li>
            <li>
              Weekly average sales <span class="sales-up">$ 8,250</span>
            </li>
            <li>
              Monthly average sales <span class="sales-up">$ 32,000</span>
            </li>
          </ul>
        </li>
        <li>
          Languages
          <ul>
            <li>
              English <span class="value">Native</span>
            </li>
            <li>
              Hungarian <span class="value">Advanced</span>
            </li>
            <li>
              French <span class="value">Advanced</span>
            </li>
            <li>
              Chinese <span class="value">Beginner</span>
            </li>
          </ul>
        </li>
        <li>
          Sales commodity
          <ul>
            <li>Beverages</li>
            <li>Condiments</li>
            <li>Confections</li>
            <li>Diary Products</li>
            <li>Grains/Cereals</li>
            <li>Meat/Poultry</li>
            <li>Produce</li>
            <li>Seafood</li>
          </ul>
        </li>
        <li>
          PC Skills
          <ul>
            <li>MS Word</li>
            <li>MS Excel</li>
            <li>MS Outlook</li>
            <li>MS PowerPoint</li>
            <li>MS Project</li>
            <li>Windows (XP, Vista)</li>
            <li>Internet</li>
            <li>SAP - Sales and Marketing Module</li>
            <li>MS Visual Studio</li>
            <li>Adobe Acrobat</li>
            <li>CorelDraw</li>
          </ul>
        </li>
      </ul>
    </div>

    <div data-role="view" id="tabstrip-sales" data-title="Sales History" data-layout="mobile-tabstrip">
      <ul data-role="listview" data-style="inset" data-type="group">
        <li>
          Sales 2011
          <ul>
            <li>
              January <span class="sales-up">&uarr; $ 35,000</span>
            </li>
            <li>
              February <span class="sales-down">&darr; $ 25,000</span>
            </li>
            <li>
              March <span class="sales-down">&darr; $ 23,000</span>
            </li>
            <li>
              April <span class="sales-up">&uarr; $ 30,000</span>
            </li>
            <li>
              May <span class="sales-up">&uarr; $ 31,000</span>
            </li>
            <li>
              June <span class="sales-down">&darr; $ 29,000</span>
            </li>
            <li>
              July <span class="sales-up">&uarr; $ 35,000</span>
            </li>
            <li>
              August <span class="sales-up">&uarr; $ 37,000</span>
            </li>
            <li>
              September <span class="sales-hold">&rarr; $ 37,000</span>
            </li>
            <li>
              October <span class="sales-hold">&rarr; $ 37,000</span>
            </li>
            <li>
              November <span class="sales-up">&uarr; $ 38,000</span>
            </li>
            <li>
              December <span class="sales-up">&uarr; $ 40,000</span>
            </li>
          </ul>
        </li>
      </ul>
    </div>

    <div data-role="view" id="tabstrip-rating" data-title="Rating" data-layout="mobile-tabstrip">
      <ul data-role="listview" data-style="inset" data-type="group">
        <li>
          Sales Representatives
          <ul>
            <li data-icon="toprated">1. Andrew Fuller</li>
            <li data-icon="toprated">2. Janet Leverling</li>
            <li data-icon="toprated" style="background-color: #3589e7; color: #fff;">3. Carine Callahan</li>
            <li data-icon="toprated">4. Margaret Johnson</li>
            <li data-icon="toprated">5. Steve Collins</li>
            <li data-icon="toprated">6. Maria Steward</li>
          </ul>
        </li>
      </ul>
    </div>

    <div data-role="view" id="tabstrip-settings" data-title="Settings" data-layout="mobile-tabstrip">
      <ul data-role="listview" data-style="inset" data-type="group">
        <li>
          Carine Callahan
          <ul>
            <li>
              Notify when online
              <input type="checkbox" data-role="switch" checked>
            </li>
            <li>
              Administrator
              <input type="checkbox" data-role="switch">
            </li>
            <li>
              Access to stats
              <input type="checkbox" data-role="switch" checked>
            </li>
          </ul>
        </li>
      </ul>
    </div>

    <div data-role="layout" data-id="mobile-tabstrip">
      <header data-role="header">
        <div data-role="navbar">
          <!--<a class="nav-button" data-align="left" data-role="backbutton">Back</a>-->
          <span data-role="view-title"></span>
          <a data-align="right" data-role="button" class="nav-button" href="#index">Index</a>
        </div>
      </header>

      <p>TabStrip</p>

      <div data-role="footer">
        <div data-role="tabstrip">
          <a href="#tabstrip-profile" data-icon="contacts">Profile</a>
          <a href="#tabstrip-sales" data-icon="history">Sales</a>
          <a href="#tabstrip-rating" data-icon="favorites">Rating</a>
          <a href="#tabstrip-settings" data-icon="settings">Settings</a>
        </div>
      </div>
    </div>

  <style scoped>
    #tabstrip-profile h2
    {
      display: inline-block;
      font-size: 1.1em;
      margin: 1.5em 0 0 1em;
    }
    #tabstrip-profile h2 span
    {
      display: block;
      clear: both;
      font-size: 2em;
      margin: .2em 0 0 0;
    }
    #tabstrip-profile img
    {
      width: 5em;
      height: 5em;
      float: left;
      margin: 1em;
      -webkit-box-shadow: 0 1px 3px #333;
      box-shadow: 0 1px 3px #333;
      -webkit-border-radius: 8px;
      border-radius: 8px;
    }
    .sales-down,
    .sales-hold,
    .sales-up,
    .value
    {
      float: right;
    }
    .sales-up { color: green; }
    .sales-down { color: red; }
    .sales-hold { color: blue; }
    .value { color: #bbb; }
  </style>
 
  <script>
    var app = new kendo.mobile.Application(document.body);
  </script>
  </body>
</html>
Anker Berg-Sonne
Top achievements
Rank 1
 answered on 28 May 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?