Telerik Forums
Kendo UI for jQuery Forum
8 answers
722 views
Hi,

We use jQuery very much, and rely on many of the features as well as plugins that make life easy.
One of the plugins we use a lot is livequery.  this plugin allows us to do modifications on elements that are being added to the DOM after the page was already loaded, by AJAX for instance.

Example code:
$('h1,h2,h2 a,h3,h5,h6:not(.fx-cufon)').livequery(function() {
        $(this).addClass('fx-cufon');
        Cufon.replace($(this), { fontFamily: 'Decker', hover:true });
    });

As I'm sure you can read yourself, this bit of code says "each time you find a new h1 tag which is added to the dom, and which does not yet have the classname fx-cufon assigned to it, add the class name (to indicate this element has been processed already), and replace the tag with its Cufon font.

This works really great, and I can recommend anyone doing so, as I never need to think about newly added items; in fact this enables me to write grid initialisation code just once, and initialise it everytime I load a <div> with a specifica class...

Now my question.  I noticed this was no longer working when we migrated from jQueryUI dialogs to the KendoUI Window widget.  Digging into the code, I noticed that your window put the page in an iFrame (??!!??) which in my opinion isn't a nice solution really, as that means that the code is NOT being added to the DOM.

I found a configuration "iframe" in the documentation which I set to false, but that test didn't being a solution that helped me out. (I still got iframes as a result...)


I'm sure I can work around this by loading the ajax content myself, adding it to a newly created div, and popup the window from that div, but I don't think that should be the way we should be adding.

Is there a reason why you use iframes?  It just doesn't make sense to me to be honest.
Neo Wong
Top achievements
Rank 1
 answered on 06 Jun 2012
1 answer
796 views
I am try to bind data to a list view (http://demos.kendoui.com/web/listview/index.html) from result of asp.net mvc controller method.
What is the way we can attach the model data or Controller data to the kendo datasource?

Below code does not work.

--MVC Controller Method returning Products results set.
public ActionResult GetProducts()
{
----------
  return Json(Products, JsonRequestBehavior.AllowGet);
}

--Javascript to bind datasource
var dataSource = new kendo.data.DataSource({
                    transport: {
                        read: {
                            url: ('@Url.Action("GetProducts")'),
                            dataType: "jsonp"
                        }
                    },
                    pageSize: 12
                });
// Model View @model IEnumerable<Models.Product>
@{
    ViewBag.Title = "Index";
}

nachid
Top achievements
Rank 1
 answered on 05 Jun 2012
4 answers
192 views
I try to open my IE9 Developer Tools and my grid goes into edit mode instead!

Jerry T.
Top achievements
Rank 1
 answered on 05 Jun 2012
0 answers
199 views
Hi,
I have seen couple of examples related to the same functionality but didn't find a working solution.

I'm using WCF services, Html Pages with Kendo Library. Please share me some working example on how to add a handler / method in WCF service & use the same in client end.

Please share how to write a WCF operation contract for this. Quick reply is greatly appreciated !

$(document).ready(function () {
                    $("#files").kendoUpload({
                        async: {
                            saveUrl: "WCF URL",
                            autoUpload: true
                        }
                    });
                });

Thanks,
Balu D.
Balu
Top achievements
Rank 1
 asked on 05 Jun 2012
0 answers
174 views
Hi,

I have a issue in IE 8 with window ui , I am using window as modal and when I open its show me perfect only silver light object is not working with shadow.

you can see in attached image.
wajimam
Top achievements
Rank 1
 asked on 05 Jun 2012
1 answer
2.1K+ views
hi,
I have a column named Image in my database.i am able to load all the fields in the database including image also,but I am getting only one image in all the rows and that image is related to the mentioned ID in the query.
my code is:
public ActionResult GetImage()
        {
            var imgquery = (from img in dbContext.Personaldetails where img.ID == 1
 
                            select new 
                            {
                                Image = img.Image
                            }).FirstOrDefault();
            {
                System.IO.MemoryStream outStream = new System.IO.MemoryStream();
                byte[] Image = imgquery.Image;
                return File(Image, "Image/jpg");
            }
        }
In the view,i retrieved by using
<img src="@Url.Action("GetImage", "Home")"  alt = "image" />
 
now, i want to display specific images with specific ID value.

	 
Dimo
Telerik team
 answered on 05 Jun 2012
3 answers
459 views
hi,
I have a table in mysql with an Image field.I have the images in my database.I am able to load the remaining data dynamically except the image field.I used like { field: "Image", title: "image",template:"<img src ='#=Image #'/>"},but i didn't get the image in grid.can u tell me how to load the images into the grid.
Alexander Valchev
Telerik team
 answered on 05 Jun 2012
0 answers
114 views
Is there some trick to exposing events in kendo-style plugins so that I can bind them using the declarative style? Currently I am just establishing the events on my plugins using the reserved "events" array field, using strings for their names. I thought that was enough, but when I attempt to bind them with the declarative style it keeps saying "Uncaught TypeError: Cannot read property 'change' of undefined". Any input on this?

Code examples: 
From plugin:
events: [
"error",
"change"
 ],

From declaration:
<div data-role="pluginname" data-bind="events: { change: testChange }"></div>

Where the plugin itself has been tested and is found by the bind, and the function "testChange" exists in the viewModel.
Joshua
Top achievements
Rank 1
 asked on 05 Jun 2012
1 answer
237 views
Hi,

I am having some problems when refreshing my grid view. I have a refresh button that calls refresh() from the grid documentation. It seems to do nothing. Then I tried sync() and read() but nothing seems to be actually refreshing my view of the grid information. Only when I filter the columns by clicking the column header is the change visible. When I click the header again the change disappears. Are there any cache settings here that may be getting in my way? Any help would be appreciated...

...
 dataSource : {
// JSONP is required for cross-domain AJAX
    dataType : "jsonp",
    transport : {
          read : baseURL + "Data;jsessionid=" + jsessionId + "?browserid=" + browserId + "&type=2&tool=fooBar",
                cache: false,
                contentType: "application/json; charset=utf-8",
                //
                // add additional parameters here...
                //
                parameterMap : function(options, type) {
                    options.cafe_dataplugin = "dispo_ticket_list";
                    options.cafe_fields = ticketColumns;
                    return kendo.data.transports["odata"].parameterMap(options, type);
                }
            },
...
Markus
Top achievements
Rank 2
 answered on 05 Jun 2012
0 answers
136 views
Hello!

I added a custom editor to a row of the grid, using the "editor widget" but, when I edit the cell and save the changes I get the following error:

Uncaught TypeError: Cannot read property 'field' of undefined   


and no data is send to de server. 


Am I doing something wrong?


I attached the following URL to represent the problem:
http://jsfiddle.net/M6VmL/1/ 



Thanks
Greetings
Swas
Top achievements
Rank 1
 asked on 05 Jun 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
Drag and Drop
Application
Map
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
DropDownTree
ListBox
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
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?