Telerik Forums
Kendo UI for jQuery Forum
0 answers
92 views
Hi,

Is it available the option like visible: false for a kendo ui grid column?

column: [
title: "class",
field: "CLASS",
width: "120px",
]

Thanks In Advance
Ganesh
Top achievements
Rank 2
 asked on 29 May 2012
1 answer
86 views
When my tab contains some elements that are floated they appear, however, the tab background is the wrong color because the tab height is 0.
http://jsfiddle.net/RichardAD/h6SLH

Any suggestions on making even floated stuff look like it is in the tab?
Iliana Dyankova
Telerik team
 answered on 29 May 2012
0 answers
91 views
How to make zero index column of Grid fixed while other column movable(reorderable=true) ?
Engifaar
Top achievements
Rank 1
 asked on 29 May 2012
0 answers
41 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
119 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
117 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
147 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
118 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
293 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.6K+ 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?