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

I'm trying to change the "groupable" property of a grid on an existing grid. 

I tried to do the following:

var grid = $("#usersGrid").data("kendoGrid");
grid.groupable = false;

Didn't work...

Anyone knows how can I do that?

Thanks,
Irit
Top achievements
Rank 1
 asked on 04 Sep 2012
1 answer
201 views
Hi,

My grid has a refresh Icon at the bottom right. How can I receive the click event of this image. I have already searched the API and could not find any reference.

Can you help me ???
Thanks in advance
mvbaffa
Top achievements
Rank 1
 answered on 04 Sep 2012
0 answers
208 views
 Hi,

I am using kendo grid in salesforce (apex). Which is similar to java and html.

Kendo grid is working fine for mozilla and chrome but not for safari.

In safari I am able to view kendo date picker on view mode but can't work on edit mode. And but when I change the value it displays null.

Regards,
Piyush Parmar

piyusjh
Top achievements
Rank 1
 asked on 04 Sep 2012
4 answers
736 views
Greetings to everyone!

As title says I'm trying to create custom tool - button to embed YouTube video.
The way it supposed to work - you click button - dialog appears - you insert video URL and it then add youtube iframe embed code into editor. At this moment I expect to see iframe in editor and iframe should show video.

I have most of this done, but last step do not work properly. iframe is added correctly, but video wont load. I get JS error saying "ReferenceError: yt is not defined". It looks like that JS file with YouTube API wont load properly.

Any help will be greatly appreciated.

Here is HTML code (make sure to add Script and CSS references to Kendo and jQuery)

<body>
     
 
<h2>Kendo Editor Example</h2>
 
<textarea cols="20" id="Description" name="Description" rows="5" style="width:600px; height:400px"></textarea><script>
    jQuery(function(){jQuery("#Description").kendoEditor({tools:[{name:"bold"},{name:"italic"},{name:"createLink"},{name:"unlink"},{name:"Insert Video",tooltip:"Insert Video",exec:insertVideo},{name:"insertImage"},{name:"insertUnorderedList"},{name:"formatBlock"}]});});
</script>
 
<script type="text/x-kendo-template" id="insertVideo-template">
    <div>
        <label for="videoUrl">Enter a URL from YouTube or Vimeo:</label>
        <input type="text" id="videoUrl" name="videoUrl"/>
             
        <div class="insertVideo-actions">
            <button class="k-button insertVideo-insert">Insert</button>
            <button class="k-button insertVideo-cancel">Cancel</button>
        </div>
    </div>
</script>
 
<script type="text/x-kendo-template" id="youTube-template">
    <iframe class="youtube-player" type="text/html" width="560" height="315" src="http://www.youtube.com/embed/#= source #?fs=1&feature=oembed&wmode=transparent" frameborder="0" allowfullscreen></iframe>
</script>
 
<script>
     
    function insertVideo(e)
    {
         
        var editor = $(this).data("kendoEditor");
 
        var dialog = $($("#insertVideo-template").html())
            .find(".insertVideo-insert")
                .click(function ()
                {
                     
                    var media = testUrlForMedia(dialog.element.find("input").val());
                    if (media)
                    {
                        var template = kendo.template($("#youTube-template").html());
                         
                        editor.exec("insertHTML", { value: template({ source: media.id }) });
                    }
                     
                    dialog.close();
                })
            .end()
            .find(".insertVideo-cancel")
                .click(function() {
                    dialog.close();
                })
            .end()
            .kendoWindow({
                modal: true,
                title: "Insert Video",
                deactivate: function() {
                    dialog.destroy();
                }
            }).data("kendoWindow");
 
        dialog.center().open();
         
    }
     
 
    function testUrlForMedia(pastedData) {
        var success = false;
        var media = {};
        if (pastedData.match('http://(www.)?youtube|youtu\.be')) {
            if (pastedData.match('embed')) { youtube_id = pastedData.split(/embed\//)[1].split('"')[0]; }
            else { youtube_id = pastedData.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0]; }
            media.type = "youtube";
            media.id = youtube_id;
            success = true;
        }
        else if (pastedData.match('http://(player.)?vimeo\.com')) {
            vimeo_id = pastedData.split(/video\/|http:\/\/vimeo\.com\//)[1].split(/[?&]/)[0];
            media.type = "vimeo";
            media.id = vimeo_id;
            success = true;
        }
        else if (pastedData.match('http://player\.soundcloud\.com')) {
            soundcloud_url = unescape(pastedData.split(/value="/)[1].split(/["]/)[0]);
            soundcloud_id = soundcloud_url.split(/tracks\//)[1].split(/[&"]/)[0];
            media.type = "soundcloud";
            media.id = soundcloud_id;
            success = true;
        }
        if (success) { return media; }
        else { alert("No valid media id detected"); }
        return false;
    }
 
</script>

Alex
Top achievements
Rank 1
 answered on 04 Sep 2012
4 answers
217 views
Seems like i have discovered a bug in Kendo UI MVVM. When binding a checkbox with a value attribute in a nested binding, the checkbox can't be checked anymore by the user, just programmatically.

This fiddle demonstrates the bug:

http://jsfiddle.net/fbuchinger/CagJG/ 

Any ideas for a workaround or is a hotfix on the way.
Sree Rachakonda
Top achievements
Rank 1
 answered on 04 Sep 2012
1 answer
174 views
i have 2 views, the "main page" view and the "settings" view.

the "main page" view fires up as soon as the app starts and the "settings" view fires up when the user clicks on the settings icon.

i want to access a switch in the "settings view" from the "main view". 

the problem is that right now unless the user clicks the "settings view" first, the switch is not initialised so it is inaccessible.

what options do i have to make the switch on the "settings view" initialised from the very start?


thanks
Ali
Top achievements
Rank 1
 answered on 04 Sep 2012
1 answer
230 views
hi everyone!

i want to know if is posible customize the sections of the grid for mvc.

i need to add a div between the div content and the div pager and show data that i obtain in the server side, this can be fill it in the same action that fills the grid, 

the attached image shows the example that i want to do, the blue section is the div that i want to add in the grid
Iliana Dyankova
Telerik team
 answered on 04 Sep 2012
2 answers
215 views
Hi,

I have an MVC 4 application and I am trying to populate a kendo grid control.

I am calling a method from a jquery click event 
$('#btnSearch').click(function () {
        $.ajax({
            type: "GET",
            url: "/PropertyAddress/SearchForPostcode",
            data: { postcode: $('#Postcode').val(), property: $('#Property').val() },
            success: function (result) {
                $("#dialog-addresssearch").data('addresses',result).dialog('open');
            }
        });
    });

my controller is passing back a JSON formatted result set.
//controller detail removed 
return this.Json(postcodeAddresses, JsonRequestBehavior.AllowGet);

this is being passed to a jquery ui dialog box in the open call to the dialog box.

I have the following html mark up on the dialog box 
 <div id="grid"></div>

in the open method of the dialog box I set up the datasource and the grid in jquery
this is the passed in JSON results, I have checked and validated that this is correct JSON

 var results = $(this).data('addresses');
create new data source
            var gridDataSource = new kendo.data.DataSource({
                type: "json",
                data: results,
                pageSize: 1
            });           

   gridDataSource.read();

            $('#grid').kendoGrid({
                datasource: gridDataSource,
                columns: [
                     { field: "Premise", title: "Name or number" },
                     { field: "Organisation", title: "Organisation" },
                     { field: "Street", title: "Street" },
                     { field: "Locality", title: "Locality" },
                     { field: "PostTown", title: "Town or city" },
                     { field: "Postcode", title: "Postcode" }
                ],
                scrollable: false,
                pageable: true
            });
  

This all works with no errors, it shows a grid on the dialog box, it shows paging except there are no results shown, I have checked and validated the JSON and verified that there is data in the results. 

I am clearly missing something but really not sure what it is I have tried a number of examples, for instance if I add a JSON array to the datasource instead of passing in the results this seems to populate OK. I can only assume it must be something to do with the data but unable to track down the issue.

Hoping that someone can spot my mistake





Duncan
Top achievements
Rank 1
 answered on 04 Sep 2012
0 answers
155 views
Hi all

I have created 3 dropdownlist in my page and I have 3 functions that get the data from a webservice and store it in a datasource. The second function is called on the change event of the first function, and the third function is called on the change event of the second function. My code worked well on browser, but when I ported to android through phonegap, when I go to any page that has dropdown list as soon as the page is loaded, it brings up an empty selection (as if someone selected a dropdown list that is empty), but the data is actually being placed in all 3 drop down lists. So when I touch away from that selection, everything works fine. But how can I prevent it from displaying that empty selection ? 
Pourya
Top achievements
Rank 1
 asked on 04 Sep 2012
1 answer
229 views
hi all,



I've a listview bound to MVC4 ApiController calls, this all works fine except when I try to insert a duplicate.

My server will fail it's validation and return a different HttpStatus code,



how can I cancel the insert?? or even refresh the listview?



also,, kendo appears to call my ApiController multiple times from now on when creating new valid records, it's like it keeps trying to resend the invalid entry :-(







Nikolay Rusev
Telerik team
 answered on 04 Sep 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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
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
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?