Telerik Forums
Kendo UI for jQuery Forum
1 answer
5.1K+ views
Hi,

I am trying to disable kendo Grid Sorting ,Filtering and couple of Button click functionality out of grids  when a check box is Checked.

I tried something like adding k-state-Disabled class ;But it just gays out the grid and doesn't stop any click events on grid or buttons.

Next I tried with having a DIV Cover over the Buttons outside the grid ,which didn't work for me.

Please see the snippet below with the sample project attached below.

Steps to go to master check box in the project:

Click on the Edit row of User Grid-->Click on Roles Tab-->Click Edit of any row of the  Roles Grid--> Click "Next" on Select Role Wizard Tab-->Here You can see the Two Agents Grids where trying to move row "Data items" between the Grids; like a List Box and Master Check Box which Grays out the Grids and Buttons.

  //Master CheckBox Click
            $('#agentMaster').on('click', function () {
                if (this.checked === true) {
                  
                    $("#availableAgentsGrid").addClass("k-state-disabled");
                    $("#selectedAgentsGrid").addClass("k-state-disabled");
                    $("#pushbtn").addClass("k-state-disabled");
                    $("#popbtn").addClass("k-state-disabled");


                    //create a transparent <div> to cover the button

                    //For the Push button element
                    var createBtn = $(".k-button .popbtn .k-state-disabled");
                    //create a div
                    var div = $("<div id='myCover'>").css({
                        "position": "absolute",
                        "left": createBtn.offset().left,
                        "top": createBtn.offset().top,
                        "width": createBtn.outerWidth(),
                        "height": createBtn.outerHeight()
                    }).appendTo($("body"));


                    //For the Filter button element
                    var filterBtns = $("a.k-grid-filter");
                    var width = filterBtns.eq(0).outerWidth();
                    var height = filterBtns.eq(0).outerHeight();
                    filterBtns.each(function (index) {
                        var position = $(this).offset();
                        $("<div class='cover'>").css({
                            "width": width,
                            "height": height,
                            "position": "absolute",
                            "top": position.top,
                            "left": position.left
                        }).appendTo($("body"));
                    });


                } else {
                    $("#selectedAgentsGrid").removeClass("k-state-disabled");
                    $("#availableAgentsGrid").removeClass("k-state-disabled");
                    $("#pushbtn").removeClass("k-state-disabled");
                    $("#popbtn").removeClass("k-state-disabled");


                    //remove Cover
                    $("#myCover").remove();
                    $(".cover").remove();
                }

              
            });


Thanks,
Chatrapathi Chennam
Dimo
Telerik team
 answered on 22 Jul 2014
11 answers
1.1K+ views
Hi,

I am using kendo ui autocomplete widget. In that i am able to select multiple values in the autocomplete. The values have been coming 
from database. What i need is i don't want to allow duplicate values. i.e when i select orange from fruits. Then next time orange will
not be visible in the autocomplete. I have tried different methods. How can i able to do this.
I hope you guys understand my question.


Thanks and Regards,
srinivas
Gabriel
Top achievements
Rank 1
 answered on 22 Jul 2014
3 answers
172 views
Is it possible to get to the data currently contained in a PivotDataSource instance to generate a DataSource for DataViz charts? Can you point me in the general direction?

Are there better options for dynamically generating charts from PivotDataSource data?
Georgi Krustev
Telerik team
 answered on 22 Jul 2014
1 answer
577 views
Hi,
I am using Grid widget with Popup editor mode.
My items' fields are "title" and "contactPerson", both strings.
I'd like to set the popup's title dynamically, for example:

editable: {
    mode: "popup",
    window: {
        title: "Editing #=title#"
    }
}

So that if the row's "Edit" button is pressed the editor's title should be "Editing" + current_row_item.title
and if "Add new item" is pressed it should be "Adding new item".

Thx in advance.
Alex Gyoshev
Telerik team
 answered on 22 Jul 2014
1 answer
946 views

Hello Telerik,


One of the column in my Kendo grid is the Notes Column (which has atleast 3000 characters). 

Now the problem I'm facing is the grid cell expands to the size of the characters. It makes my cell huge.

I would like to make the grid cell single line with a fixed amount of characters and have a tooltip on the cell.

I'm not sure whether I can achieve it. 

Please let me know the possible solution for the above case.

Sample data in a cell  in  the Column (Notes):


<div><b>17/11/2010</b> - Not received many enquiries, uses Extra Sure and Holmans. Finds our Medical Screening too lengthy. Took her through system and printed off Mes Screen questions, will use us more than N J Heritage. She will aim to use us for new enquiries.</div><div><br></div><div><b>16/02/11</b> - L/M - R/C.</div><div><br></div><div><b>08/03/2011</b> - JCO - Spoke to Matthew Salmon, not finding us competitive been using ExtraSure who are a lot cheaper. Advised our USP's and our benefits. Will use us for next travel enquiry.</div><div><b><br>16/06/11</b> - Jane spoke to Richard and will be taking him through the system, SunWorld Plus.</div><div><br></div><div><b>12/10/11</b>-I Have spoken to Richard, I have emailed across details of Sunworld Extra &amp; medical screening along with Username &amp; Password. MP</div><div><br></div><div><b>01/11/2011 </b>- JCO spoke to Richard, Richard issuing a quotation today, likes that we don't have any age limits and restricted to 85 on AMT policies. &nbsp;First time to use us, usually use Citybond, likes the look of our product. JCO advised to contact me if requires detailed explanation of system.&nbsp;</div><div><br></div><div><b>25/05/12</b> - MW - Spoke to Richard, he is very nice, I thanked them for their continued support in using SunWorld and I am sending him the email with the Special Features and the SunWorld Extra info.. He said he rates SunWorld 8 and a half out of ten because he would like to see the option to increase the single article limit and also the rates have gone up quite a bit recently.. He said they don't really do that much travel but they are going to be pushing it over the next year because he said he thinks people are getting fed up of going on the internet to get insurance and realising they aren't actually covered for anything... He is generally happy with everything.</div><div><br></div><div><b>08/08/12</b> - MW - Spoke to Luke, I asked why they hadn't used us since June and he said it was just because of a slow down in enquiries. &nbsp;Travel is not something they push, they just offer it to accommodate their existing clients. &nbsp;He said the only use us and one other provider so any enquiries they do get they always quote with us, he has done some quotes this week but they haven't come back. &nbsp;They are very happy with everything. &nbsp;No problems etc. &nbsp;I am sending him the Special Features for 2012 and also SunWorld Extra info,</div><div><br></div><div><b>16/08/12</b> - MW - Spoke to Richard, asked if they would be interested in having a <span class="wysiwyg-color-red"><b>poster</b></span>, he said it would not really be of any use to them as they are not a high street broker, they are in an office and not customer facing, he said they don't really do much travel, they are mainly a commercial broker but they are happy with any travel business they can do, what they would like is a flyer as opposed to a poster so they can email it out to their customers. &nbsp;He said he thinks the product is great, likes the age limits and limits etc,<br><br><b>14/11/12 -&nbsp;</b>MW - Spoke to Luke, told him about <span class="wysiwyg-color-green"><b>Snowman Cover</b></span> and Broker <span class="wysiwyg-color-blue"><b>Survey</b></span>.<br><br><b>04/12/12</b> - MW - Spoke to Luke, he said they are really quiet at the moment. &nbsp;Only using SunWorld but just not getting the enquiries. &nbsp;he is happy with SunWorld though and I have told him about the <b>Changes for 2013.<br></b><br><b>08/02/13</b> - MW - I can see that they said back in August that they would like some leaflets so I am sending them some out.<br><br><b>28/02/13</b> - MW - Luke has sent this email &nbsp;- "Sorry, not sure if you are still doing this but can we havesome leaflets to send with our renewals to try and offer your services J thanks" , So I am sending them out some more leaflets.<br><br><b><span class="wysiwyg-color-yellow">01/05/13</span> -&nbsp;</b>MW - Spoke to Richard, he said the main person who does the travel, Luke, is on holiday in Turkey for the rest of the week and will be back on Tuesday. &nbsp;I have made a note in my diary to give him a call back on Wednesday.<br><br><b><span class="wysiwyg-color-yellow">08/05/13</span></b> - MW - Spoke to Luke, he said SunWorld are their main travel provider, they have not really had many enquiries for travel lately. &nbsp;He said our rates are competitive for annual but people can get travel insurance so cheap online now that he thinks they have just been doing that. &nbsp;I said we will reduce the rates for him and he said that would be good. &nbsp;They are also set up to use us via the AXA route which he said is fine to be deactivated and they will carry on using this one as they have been. &nbsp;He said he would like some leaflets as he never received the last lot so I have checked his address and I am sending out 20 more. &nbsp;I told him about the new product and I am sending him the email with the Underwriting Changes and Special Features for 2013. <span class="wysiwyg-color-red"><b>RATES REDUCED<br></b></span><br><b><span class="wysiwyg-color-yellow">01/07/13</span></b> - MW - Spoke to Luke, he said they are only using SunWorld so they must have not had any enquiries and that's why they haven't used us in the last month. &nbsp;He said they only really offer travel insurance to accommodate their existing clients, they don't really push for it. &nbsp;He said they have got the leaflets and they will be sending them out with renewals etc. &nbsp;As soon as they get the enquiries, we will be getting the business.<br><br><b><span class="wysiwyg-color-green">13/09/13</span></b> - MW - Spoke to Richard, told him about the new product going live on the 1st October. &nbsp;I am sending him the email with the Underwriting Changes and Special Features for 2013. &nbsp;He said they would like some leaflets so I have confirmed their address and I am sending out 20.<br><br><b><span class="wysiwyg-color-yellow">01/11/13</span><span class="wysiwyg-color-green">&nbsp;</span> -&nbsp;</b>MW - Spoke to Richard, he said they are very quiet at the moment, their customers are not going away and that's why they haven't issued anything. Luke is the main person who deals with this and he will be our contact going forward because he is the one who deals with it most of the time. &nbsp;I told Richard about the video tutorial and he is going to tell Luke and he will let us know if he has any queries. &nbsp;I am sending the email with the New Special Features and further information on the changes we have made to the website. luke.robson@aifltd.co.uk<br><br><b><span class="wysiwyg-color-yellow">02/01/14</span> -&nbsp;</b>MW - Spoke to Luke, I have confirmed all the contact information is correct and I have added his email address to the spreadsheet for the 2014 mailer and then he will forward it around to all the others. &nbsp;He said they only use SunWorld and it is the easiest to use, they just haven't had any enquiries for travel. &nbsp;I am sending him the email with the New Special Features and information about the changes we have made to the system. &nbsp;He said he has asked for some leaflets before but he has not received them. &nbsp;He really wants some to send out with all his renewals so I am sending him out 60 leaflets.<br><br></div>



 
Iliana Dyankova
Telerik team
 answered on 22 Jul 2014
1 answer
88 views
For the toolbar Getting Started guide, the split button example isn't correct:
http://docs.telerik.com/kendo-ui/getting-started/web/toolbar/overview#example---initialization-and-basic-usage
should be items.menuButtons and not items.items.

//split button
{
    type: "splitButton",
    text: "Split Button",
    items: [
        { id: "option1", text: "Option 1" },
        { id: "option2", text: "Option 2" },
        { id: "option3", text: "Option 3" }
    ]
},
Alexander Valchev
Telerik team
 answered on 22 Jul 2014
3 answers
385 views
Is there anyway to disable the dirty flag from being set for a few properties so that the DataSource does not think there are changes?

For example I may have a model defined as: 

var model = new kendo.data.Model({
name: "John Doe",
visible: true
});

However when I change the visible (to hide or display something using CSS MVVM binding), I don't want the DataSource to think that my model is "dirty" and send that back to the server, however I do want MVVM binding to still work so that I can hide or show.
Nikolay Rusev
Telerik team
 answered on 22 Jul 2014
3 answers
378 views
Is it possible to dynamically set the height of a ScrollView?

I have a series ListViews inside a ScrollView and would like to set the height of the ScrollView to the height of the ListView.

I have researched this and found it suggested to use  data-stretch=true on the view and data-content-height="100%" on the ScrollView.  When I do this and the ListView contains more items than will display on the screen, it does not scroll vertically.  Example:
http://jsbin.com/fosoj/1/edit?html,output

I can hard code a content height on the ScrollView but it may be larger than necessary and it allows the ListView to scroll off the top of the page.  Example:
http://jsbin.com/hatib/1/edit?html,output

I would appreciate any alternatives.

Thanks,
Kerry
Kiril Nikolov
Telerik team
 answered on 22 Jul 2014
3 answers
1.2K+ views
I am using the MVC wrapper of Kendo. I have scheduler with draggable and resizable tasks. However, when I double click a task I see this message "Do you want to edit only this event occurrence or the whole series?”. I tried to disable it using Kendo's client events but without any success.
Rosen
Telerik team
 answered on 22 Jul 2014
1 answer
366 views
 
  Hi Guys

     Maybe this would seems a kind of silly question, but it really bothers these days, the problem is that

     I use the kendo MVVM to databind the viewmodel to the grid control. i use the template to display to content.
 
      ViewModel name is 'DetailModel', kendo grid control name is 'DetailGrid'
 
      the template is "<span title='" + FieldName + "'> #: " + (FieldName == null) ? ' ' : FieldName + "# </span>"    which FieldName is a Viewmodel field name dynamically get from server after a post request to the server. for simplicity, I omit the code for post request.

     It works fine when the FieldName is 'normal' character (alphanumeric, 'FirstName', 'LastName' etc), but it fails when the FieldName contains '&', for example 'Family&WoldTeam'. I
 
    The scenario is kind of the same in  http://jsfiddle.net/cJmE2/315/ link with  'firstDate' field name changes to 'first&Date' .

    Is there a work around for this problem ? i don't think that we can escape that '&' character or html encode in the field name with '&&' or '&amp;'

   I would greatly appreciate if you can come up with some suggestion or solution .


                                                                                                                                                   Thanks & Regards 
Petyo
Telerik team
 answered on 22 Jul 2014
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
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
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?