Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
82 views
How to clear all filter expressions and back to initial status by a button event?
Eyup
Telerik team
 answered on 07 Sep 2012
1 answer
118 views
So we will be implementing RadAsyncUpload in a few different areas in our site. However, I had a question about cancelling an upload and I also noticed what seems to be a severe issue in Internet Explorer 8:

<telerik:RadAsyncUpload ID="AsyncUpload" runat="server" TemporaryFolder="~/Uploads" CssClass="ClientFileUpload"
            MultipleFileSelection="Automatic" AutoAddFileInputs="true" EnableInlineProgress="true"
            ControlObjectsVisibility="RemoveButtons"
            OnClientFileSelected="AsyncUpload_FileSelected"
            OnClientAdded="AsyncUpload_AddClientSelection"
            OnClientFileUploadFailed="AsyncUpload_UploadFailed"
            OnClientProgressUpdating="AsyncUpload_ProgressUpdating" />


1. What is the best way to cancel a row from uploading its file on the client? I noticed what seem to be some internal javascript errors that get thrown no matter if I use _cancelUpload() or _stopUpdating(). To try and be the most safe I decided to find the cancel element itself and trigger a click client side, but I noticed some javascript errors from this too so I wanted to ask if this is normal? Cancelling like this:

// TODO: Instead of deleting the file input which seems to prompt the control to just force-create another
                    // input, cancel the upload by using the cancel element provided by Telerik. - KO 8/31/2012
                    //sender.deleteFileInputAt(eventArgs.get_rowIndex());
                    var errorRow = eventArgs.get_row();
                    // get the row's remove element
                    var cancelElement = $(errorRow).children('input')[0];
                    cancelElement.click();
                    badFile = true;

2. OnClientProgressUpdating does not seem to trigger in Internet Explorer 8. The page loads with no errors or anything indicating a problem but when I debug and try to upload a file with zero size the AsyncUpload_ProgressUpdating function shown below is never executed and the file is flagged as a green file to be uploaded on the client, which is not good for us:

function AsyncUpload_UploadFailed(sender, eventArgs) {
 
                var errorMessage = eventArgs.get_message();
                var errorCode = parseInt(errorMessage.substring(errorMessage.indexOf(":") + 1).trim());
 
                // 0 must be code for cancelled upload
                if (errorCode == 0) {
                    var errorRow = eventArgs.get_row();
                    var fileName = $(errorRow).children('span')[0].innerText.trim();
                    var extension = fileName.substring(fileName.lastIndexOf("."));
                    NotificationsWcfService.AddWarning("The file {0} has an inappropriate extension ({1})",
                        [fileName, extension]);
                    eventArgs.set_handled(true);
                }
            }
 
            function AsyncUpload_ProgressUpdating(sender, eventArgs) {
 
                var fileSize = eventArgs.get_data().fileSize;
                // If the file size is zero then stop the upload by triggering a click on the cancel object.
                // This is the only way I have found to "stop" an upload.
                // This still causes javascript errors but they are the same errors that get generated from a user
                // cancel click so I will assume this is the most safe. - KO 8/31/2012
                if (fileSize <= 0) {
                    var errorRow = eventArgs.get_row();
                    // get the row's remove element
                    var cancelElement = $(errorRow).children('input')[0];
                    cancelElement.click();
                }
            }
Peter Filipov
Telerik team
 answered on 07 Sep 2012
1 answer
40 views
How to get the expression in my button event instead of apply button?
Eyup
Telerik team
 answered on 07 Sep 2012
2 answers
87 views
Hi,
I'm using the techniques described here in order to use RadWindow as insert/edit dialog for RadGrid.

Now, I have several pages with this code, so I'm concerned about having to repeat the same code for all pages; I'm wondering if I can put the JavaScript code into two separate files, one for the page with the RadGrid and one for the page showed with the RadWindows in order to optimize page load and simplify pages maintenance.

Any suggestion and/or sample code will be greatly appreciated.Thank you.
John Swenson
Top achievements
Rank 1
 answered on 07 Sep 2012
1 answer
121 views
Hi All,

In Rad Scheduler we are able to show Day Start Time and Day End Time on left side of the scheduler, But i need to show this on both sides of the scheduler.

How can we show this show Day Start Time and Day End Time both sides of the scheduler?

Thanks,
Madhan
Plamen
Telerik team
 answered on 07 Sep 2012
1 answer
61 views
Hi,
Here, I am trying to execute radeditor command from another button control which is outside the the editor toolbox. So, I am able to execute the commands but the issue is, when we select some/all text in the editor and try to click button to apply some formatting the highlight/selection of text is clear. but when we do the same thing on Chrome, firefox, safari it works well.

To re-produce the issue, 

  1. Create a new page 
  2. Add two RadEditor controls 
  3. Run the application on IE
  4. Enter text into first editor and select some part of text
  5. Now, move to second editor. 
  6. See, the selection is lost.
  7. Now, Run application on Chrome and repeat 4 & 5.
  8. See, Selected text is still highlighted.

Or, you can test to select text in  http://mono.telerik.com/Editor/Examples/ToolbarMode/DefaultCS.aspx 

See the attached file for expected behaviour from IE. The snapshot is taken from Chrome.
Please look into the issue.

Regards,
Aditya Kumar
Marin Bratanov
Telerik team
 answered on 07 Sep 2012
7 answers
108 views
Hi,

I have a page that contains a grid. The grid contains a formtemplate for use when editing an item in the grid. Inside the formtemplate I have an aspplaceholder control that will be populated with a table that contains other controls. I am able to get the controls to populate in the place holder and to also populate with data. When the update command event is fired and I try to pull the values from the placeholder control the placeholder states it contains no controls. Here is a sample of the aspx page code I am using and the C# code that is used in the update command event.

 

<div>

 

 

<asp:PlaceHolder id="phEdit" runat="server" />

 

 

</div>

 



if

 

(((PlaceHolder)e.Item.FindControl("phEdit")).Controls.Count>0)

 



I have placed the code to populate the placeholder control in the itemcreated and the itemdatabound methods of the datagrid, but it still loses its controls when using the updatecommand.

Thanks
Tsvetoslav
Telerik team
 answered on 07 Sep 2012
3 answers
229 views
Greetings,

I'm having trouble getting the Splitter/RadPane scroll to function correctly with Scheduler OverflowBehavior="Expand."  Basically I want the scheduler width=100% and the height to expand/contract as required by the content. 

So far I'm only able to get the scheduler's header to scroll in IE7.  The rest of the content remains fixed in place.  I've tried placing the scheduler inside a <div> with a set height as recommended in previous posts, but doesn't work.  Seems to work ok in Firefox.

Can you please post a simple working example with overflowbehavior=expand and radpane scrolling the schduler's content?

Thanks,

Gary.
Plamen
Telerik team
 answered on 07 Sep 2012
3 answers
69 views
I've been playing with the Scheduler and I've managed to get it working with a SQL database and using an Advanced Form. For some reason though when I close the form (either by clicking Save or Cancel) my Scheduler vanishes.

It save whatever I have done, but I have to refresh the page.

I've checked it against the demo and nearly everything in the .aspx page looks the same.
Boyan Dimitrov
Telerik team
 answered on 07 Sep 2012
4 answers
84 views
Hi
CAn we customize the grid header like this
See th attached image

Thanks
waiting for your reply

Hari
Pavlina
Telerik team
 answered on 07 Sep 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
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
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?