Telerik Forums
Kendo UI for jQuery Forum
1 answer
190 views

If using the upload control as a drop-in replacement for the default file upload control (not using async), is it possible to handle multiple files on the server-side?

I don't see how it is possible since when you get back to the server-side, there is only one fileUpload control on the page. Thus one file.

Is there some trick I am missing?  Or do I need to turn off multiple files, unless using async?

Vivek
Top achievements
Rank 1
 answered on 25 Apr 2012
0 answers
100 views
Hi Guys,

I have a grid page, In this page i need Drag and drop item from listItem to Grid...

Please Help Me...

Thanks
Loganathan
Top achievements
Rank 1
 asked on 25 Apr 2012
3 answers
208 views
Hi All,

I have a product listing grid and I need to be able to drag each product onto another panel on the same page.

One of the posts suggested that the Grid has no built-in drag and drop support yet.  So I attempted to use the non-visual Drag and Drop component, as follow:

1. Using Table method with each TD:
<td><div class="pc-draggable" style="display: inline-block; width:100%; cursor:pointer">Each product name goes here</div></td>

2. Using jQuery.each to convert each of the div within each td into draggable.
$(".pc-draggable").each(function () {
          {
                  var dragHint = $(this).clone();
                  $(this).kendoDraggable({ hint: function () { return dragHint; } });
         }
}

This seems to allow dragging UNTIL the user change the listing via pagination.  It seems pagination "ditches" my custom drag bindings in step 2.

Is there any way I can work arround this issue of losing the custom draggable binding?   One way I could think of is to catch the "pagination change event", but I don't know (if it is possible) how to hookup/bind such an event, so that I could re-execute the code in step 2 above.   The only way I could catch the pagination click was using the following code:
 $(".k-link").click(function () { setTimeout("prepareDraggable()""300");});  
// Where prepareDraggable() is actually step 2 above.


Or, if any one can suggest a better or proper way to implement per-grid row drag and drop?

Thanks!

JB





Loganathan
Top achievements
Rank 1
 answered on 25 Apr 2012
4 answers
629 views
When creating a treeview from hierarchical html, is there an attribute I can include on a <li> element to make it the selected node
Richard
Top achievements
Rank 1
 answered on 25 Apr 2012
1 answer
404 views

I am following the “Basic Usage” example.  I am using the variant wherein I specifically create a <span data-for=”id_of_validated_control”> for each field. In  this case, I have two fields, the first being "Name", the second being "Code".

“Name” and “Code” each have a ‘k-invalid-msg’ span.  Now let’s say I blank out the second field ‘Code’ first.  It’s get “Code is required” message.  So far so good.  Now I put a value in Code, then go to the field above it – “Name” – blank it out, and blur.  I expect the <span> next to "Name" to get a message, but what happens is that “Name is required” displays in the span adjacent to “Code” field, becauseat the moment I tab out of the "Name" field, the <span data-for=”name” class=”k-invalid-msg”/> is removed from the DOM, and Code’s <span> is the one populated.

I have tried several approaches.  The first approach is to declare my own <span data-for="name_of_validated_input" class="k-invalid-msg></span> after each <input> that has the "required" attribute.  I also tried not declaring my own <span>'s, and applying a validationMessage="xxx is required" to each <input> that has the "required" attribute.

Here is one of the <input> controls with an explicit <span>.  Note that this is copied from Chrome "inspect element" which is adding the ="" to required. 

<div class="form-FieldOuter" id="view-FieldBox1" style="display:block;">
<label for="view-FieldBox1CodeInput" class="form-label" style="overflow:hidden;">Code</label>
<input type="text" class="form-control" id="view-FieldBox1CodeInput" data-bind="value: Code" required="" validationmessage="Code is required.">
<span class="k-invalid-msg" data-for="view-FieldBox1CodeInput"></span>
</div>


And a couple of notes/comments:
1. In my program's html output, the attribute doesn't have a value, it looks like <input id="x" name="x" required validationmessage="blah blah"/> 
2. I've tried also assigning the name attribute.  But I see from other forum post that data-for relates to the 'id' attribute and not the 'name' attribute, so I think my use above should be correct in that regard.  (see: http://www.kendoui.com/forums/framework/validation/is-there-a-way-to-control-the-position-of-validation-messages.aspx , where it says To force it to use specific place for its hint, place a span with data-for="your_input_id" and class="k-invalid-msg", so that the Validator can recognize and use it )
3. I observe that data-role="validator" is being applied to the <div> that contains my form and all of the validated <input> and their <span> elements.
4. Using kendo.web.js from version 2012.1.322 Full-license not minified.

Mike
Top achievements
Rank 1
 answered on 25 Apr 2012
5 answers
116 views
Hi,

I'd like to get datas from a xml document that I have exported from mySQL database. 
So I want to create charts with these datas, I wrote down the script like this :

<body>


<div id="chart" style="width: 400px; height: 600px"></div>
        <script>


            ds = new kendo.data.dataSource({
                transport : {
                    read : {
                        url : "C:/Users/Julien/Downloads/kendo.xml"
                    }
                }
            })


            $("#chart").kendoChart({


                dataSource: ds,
                categoryAxis: {
                    categories: [January,February,March,April]
                },
                seriesDefaults: {
                    type: "line"
                }


            });
   </script>

    </body>
</html> 



Maybe it's totally wrong but I started to learn about Kendo UI and I didn't know so much about AJAX and stuff, so for now I have nothing appearing on my screen. 

The thing is that when I wrote some datas in local it works so if someone could help me I'd really apreciate it.

Thanks,

Julien

Julien
Top achievements
Rank 1
 answered on 25 Apr 2012
3 answers
445 views
I'm having trouble calling the update method exposed as a JSON endpoint by a .NET WCF domain service. I think the domain service is set up correctly because the read method is working fine - I can get data into the bound kendoGrid very nicely. But I can't seem to post any data to the domain service via the update method.

Fiddler shows the following when I try to update a record in the kendoGrid...
GET http://localhost:3223/DataServices/Application-myDomainService.svc/JSON/UpdateDATA?AUTOID=1&CODE1=code1&CODE2=code2 HTTP/1.1
Host: localhost:3223
Connection: keep-alive
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.83 Safari/535.11
Accept: application/json, text/javascript, */*; q=0.01
Referer: http://localhost:3223/Pages/Home.aspx
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: ASP.NET_SessionId=dl1a5qkkzbsaur0o5qlhuvhf

Does this mean that it's using a GET method to call the update endpoint rather than a POST? The response is a 404 error with message "Endpoint not found."

Any help here?
Michael
Top achievements
Rank 1
 answered on 24 Apr 2012
11 answers
480 views
I've just tried to convert my original ViewModel to a Kendo-based viewmodel, in hopes I'd be able to use this model to pick up functions from my custom template assigned to a Grid. This, however, doesn't seem to be the case.

Right now I have:

<script id="gridTemplate" type="text/x-kendo-template">
         <span class="k-icon k-arrow-next cursor detailLink" cId="#= ContactID #" data-bind="click: doSomething"></span>
</script>

With the template assigned to my Grid, and doSomething as a function within my Kendo ViewModel. The Grid only gets loaded when a user presses a button on the page, which may have something to do with it - but if it has, then it takes out the point of a View Model always being active.

Is this a known issue in the beta?
Luc
Top achievements
Rank 1
 answered on 24 Apr 2012
1 answer
226 views
Problem reproduced at http://jsfiddle.net/MenYM/12/

I am using a drop down list, with following bindings to a view model:
1. source (simple array of items)
2. value 

I have also defined the data-role and, perhaps most importantly for this query, a data-option-label.

The problem is that if the data source defined in the view model is defined as an empty array, and at some point the data source is modified, the drop down list has an empty element, even before the data-option-label. (See the jsfiddle linked above).

On the other hand, if the data source had an element and afterwards was modified in the same way, the drop down list does not have an empty element.

What could be the problem here? Any pointers are appreciated.

Thanks,
Siddhartha Agrawal
Georgi Krustev
Telerik team
 answered on 24 Apr 2012
6 answers
741 views
Does anyone have an example of a controller method that will get the success event to fire? I keep getting the unexpected result error. 

My current controller method looks like this. I have tried many different results and nothing seems to work.
        [Authorize]
        [HttpPost]
        public String AddFile(int Id, IEnumerable<HttpPostedFileBase> attachments)
        {
            
            Response.ContentType = "text/plain"; 
            return   @"{""status"": 0, ""data"": [{""DocumentId"": ""5""}]}"; 
 
        }


        $("#attachments").kendoUpload({
            async: {
                saveUrl: saveURL,
                removeUrl: removeURL,
                autoUpload: true
            },
            upload: attachOnUpload,
            success: attachOnSuccess,
            error: attachOnError
        });


function attachOnUpload(e) {
 
        e.data = { Id: '@Model.Id' }
 
    }
 
    function attachOnSuccess(e) {
         
        var hiddenField = $("#DocumentId");
        hiddenField.val(e.DocumentId);
        
 
    }
    function attachOnError(e) {
        debugger;
	//always fires no matter what is returned from controller

    }
James
Top achievements
Rank 1
 answered on 24 Apr 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)
SPA
Filter
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
OrgChart
TextBox
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
Popover
DockManager
FloatingActionButton
TaskBoard
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
TimePicker
DateTimePicker
RadialGauge
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?