Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
145 views
Hi ,
I am using Radupload control to upload multiple files in my project.It Working Correctly on uploading single file .But It Is not working Multiple Files.It Upload only one file in multiple times with same name.Please give me the Solution.

In My aspx page:
 <telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" 
                        TargetFolder="~/uploadattachment/" AllowedFileExtensions=".pdf,.doc,.docx,.txt,.gif,.jpg,jpeg,.png"
                        MaxFileSize="524288" Skin="Simple" MultipleFileSelection="Automatic" UploadedFilesRendering="BelowFileInput"
                        ChunkSize="0" Style="margin-right: 110px; margin-top: 10px" OnFileUploaded="RadAsyncUpload1_FileUploaded">
                    </telerik:RadAsyncUpload>

In My .cs page:

protected void RadAsyncUpload1_FileUploaded(object sender, Telerik.Web.UI.FileUploadedEventArgs e)
        {       


            string fileid;
            UploadedFile file = RadAsyncUpload1.UploadedFiles[0];
            string filename = file.FileName;
            string pathname = Path.GetFileName(filename);
            string targetfolder = Server.MapPath(RadAsyncUpload1.TargetFolder);
            string folderpath = targetfolder + filename;           
            string temp = "";
            string fname = "";
            int cnt = 1;
            if (File.Exists(folderpath))
            {
               for (int i = 1; i <= cnt; i++)
               {
                    string woext = Path.GetFileNameWithoutExtension(filename);
                    string ext = Path.GetExtension(filename);
                    string addnum = woext + "(" + cnt + ")";
                    temp = addnum + ext;
                    if (File.Exists(targetfolder + temp))
                        cnt++;
               }

                fname = temp;
                e.File.SaveAs(Server.MapPath("~/uploadattachment/" + fname));
                fileid = fname;
                builder.Append(fileid).Append(",");
               
            }
            else
            {

                e.File.SaveAs(Server.MapPath("~/uploadattachment/" + filename));
                fileid = filename;
                builder.Append(fileid).Append(",");
              //  Id = builder.ToString();
            }
            Id = builder.ToString();
        } 
Princy
Top achievements
Rank 2
 answered on 31 Jul 2013
1 answer
104 views
How can i change a FieldType in Runtime on C#?

After a Add a field like PivotGridRowField. There is some method to change this type to PivotGridColumnField?

Maria Ilieva
Telerik team
 answered on 31 Jul 2013
2 answers
379 views
I am in love with the new RadGrid EditMode = Batch feature!

There is just two snags I have ran into.  I am switching our grid from EditMode = InPlace to Batch. I have removed the GradEditCommandColumn that I had in place.  Which helped a lot with my columns lining up since I also added in the Scrolling Feature.  :)   
<Telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
       <HeaderStyle Width="40px" />
       <ItemStyle CssClass="MyImageButton" />
</Telerik:GridEditCommandColumn>

If the date is older than a month, we need to lock down the grid so the users can not make any changes to it.  In the past I just hid the Edit and delete button for this.  Now, with Batch I am unsure how to turn off the edit mode?
GridTime.MasterTableView.GetColumn("EditCommandColumn").Visible = false;

Also, The grid is for our Time Management, so the headers say Sunday, Monday, etc with the corresponding dates underneath.  (ie this week the headers read: Sunday 07/21/2013, Monday 07/22/2013, etc). 

The code I have to do this blows up now.  (It errors on the first time in the example below).
GridHeaderItem headerItem = GridTime.MasterTableView.GetItems(GridItemType.Header)[0] as GridHeaderItem;
headerItem["Sunday"].Text = reader.GetValue(0).ToString();
headerItem["Monday"].Text = reader.GetValue(1).ToString();
headerItem["Tuesday"].Text = reader.GetValue(2).ToString();
headerItem["Wednesday"].Text = reader.GetValue(3).ToString();
headerItem["Thursday"].Text = reader.GetValue(4).ToString();
headerItem["Friday"].Text = reader.GetValue(5).ToString();
headerItem["Saturday"].Text = reader.GetValue(6).ToString();

Error message: 

Index was outside the bounds of the array.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IndexOutOfRangeException: Index was outside the bounds of the array.

Any help will be much appreciated!
Antonio Stoilkov
Telerik team
 answered on 31 Jul 2013
3 answers
132 views

Hi,

 I am using RadDatePicker I have own image for the Icon.
 Am able to show it but it has border. could not remove it.
 Where should I apply style for it?


Best Regards,
Damodar
Princy
Top achievements
Rank 2
 answered on 31 Jul 2013
14 answers
515 views
Hello,

I am getting a list of objects such as this:

Category             Name                    Sequence
Category B           Something                    1    
Category B           Something                    2    
Category C           Something                    3    
Category A           Something                    4    
Category A           Something                    5    


When I do a Group By with the Category I get this:

Category: Category A
Category A           Something                    4    
Category A           Something                    5    

Category: Category B
Category B           Something                    1    
Category B           Something                    2    

Category: Category C
Category C           Something                    3    

My markup looks like this:

 

<GroupByExpressions>

 

 

<telerik:GridGroupByExpression>

 

 

<SelectFields>

 

 

<telerik:GridGroupByField HeaderText="Classification" FieldName="Classification.Name" ></telerik:GridGroupByField>

 

 

 

 

</SelectFields>

 

 

<GroupByFields>

 

 

<telerik:GridGroupByField FieldName="Classification.Name" SortOrder="None"></telerik:GridGroupByField>

 

 

</GroupByFields>

 

 

</telerik:GridGroupByExpression>

 

 

</GroupByExpressions>

 


Where Classification is my Category.

This is sorting the classifications in alphabetical order. I cannot get this to not happen this way. I want them to sort by the sequence that I pass it in. I have tried referenceing the sequence, this doesn't work. Please tell me how to get it to group by Category, but do not alphabetize them and do not show the sequence in the header as this will be a hidden column. Thanks.

Ultimately, I want it to end up like this:

Category: Category B
Category B           Something                    1    
Category B           Something                    2    

Category: Category C
Category C           Something                    3    

Category: Category A
Category A           Something                    4    
Category A           Something                    5    

Thanks,
Mike




Swathi
Top achievements
Rank 1
 answered on 31 Jul 2013
13 answers
1.3K+ views
HI all is it possible to get data filtered in a radgrid???
What i want to do its getting the data from a radgrid after a filter its apllyed.

Thanks you all.
Princy
Top achievements
Rank 2
 answered on 31 Jul 2013
1 answer
296 views
Hi

I created a radial gauge in C# and added all the scales and label. But I cant find a way to set the label position. So can anyone help me with code to do this?

Thanks
Henry
Shinu
Top achievements
Rank 2
 answered on 31 Jul 2013
3 answers
138 views
Hello

How to localize/translate the terms "From" and "To"  that appear inside the filter area of GridDateTimeColumn? There is no entry related in the Global Resources file.

Regards
Eyup
Telerik team
 answered on 31 Jul 2013
1 answer
227 views
Hi everyone;
We have a problem with one of our deployed Web apps' on our production server.  This app uses a number of third party tools including many telerik ones.  We recently upgraded that app from 2.0 to 4.0.  When the 4.0 version was deployed we started having some major problems.

We are seeing problems with the App Pool exceeding its memory settings, thus causing it to reset.  It was on an App pool set to use .Net Framework 4.0, with several other applications.  However, after it was deployed, every app in that app pool started losing its session values long before the timeout was reached.  The log file showed that the app pool was resetting and each time it was resetting it was due to this app exceeding the memory of the app pool.

So we put it into its own app pool and upped the amount of memory for that app pool.  We found that there were still issues such as taking 11 minutes to go load a new page after pressing a button on the first page. 

As stated, this application uses a number of Telerik products.  I recall seeing a couple of years ago articles about Sitefinity not being able to be hosted on a shared app pool because of memory issues, and an article about a Telerik reporting tool that had similar issues.  I am also concerned that the developer may not have utilized 4.0 compatible Telerik tools.
The Dlls being utilized are:
Telerik.QuickStart.dll ver.  1.0.3085.18368
Telerik.Web.UI.dll ver. 2012.1.215.40
Telerik.Web.UI.Skins.dll ver 2012.1.215.40
RadAjaxNet2.dll ver 1.6.2.0

I would like to know are these the proper versions of these dlls to be used in .Net Framework 4.0.30319 and later?
Have there been any reports of excessive memory usage by any of the controls encompassed in these assemblies?
If there are later assemblies that we should be using what are they?

Just want to say in passing, that I would not think that the Telerik.web.ui.dll would be a problem given its version number, but I don't know for sure.

Thanks in advance for your advice and help.


Update:  For some reason the reply text area would not permit me to type in it.  It would allow me to place the cursor there but as soon as I started typing the cursor disappeared and nothing happened.  So I tried to attach a text file with my reply but you are only allowed to upload image files.  So I am typing my reply as an update to the original thread entry.

The dll, RadAjax.Net2.dll, is registered on each page but is not actually used anywhere in the app as far as I could tell.  I will refer your comments about your memory leak and your recommendations to the Management Team so they can pass it on to the developers. 
Martin
Telerik team
 answered on 31 Jul 2013
1 answer
103 views
HI,
I have added a combo box to my page and then i wan to enable load on demand to load big number of records from my WCF service.
I'm getting an error when i click on the combo box: The server method 'MyMethod' failed.

here is my combo box html:

 

<telerik:RadComboBox ID="rcMyCombo" runat="server" CheckBoxes="True" EmptyMessage="Choose ...." Width="300px" DataTextField="Name" DataValueField="Id"                            

 

 

EnableLoadOnDemand="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true" >                       

 

 

<WebServiceSettings Path="http://localhost:8732/MyService.svc" Method="GetDataLoadOnDemand" />

 

</telerik:RadComboBox>


This is the method code in the WCF:

public RadComboBoxData GetTraderGroupsLoadOnDemand(RadComboBoxContext radComboContext)

{
// my implementation as in the documentation.
}

When i tried to debug the issue using IE debugger tool, i found this is the url that is being called from the web application is the following:
http://localhost:8732/MyService.svc/GetDataLoadOnDemand?context=%5B%7B%22Key%22%3A%22Text%22%2C%22Value%22%3A%22%22%7D%2C%7B%22Key%22%3A%22NumberOfItems%22%2C%22Value%22%3A0%7D%5D&callback=Sys._jsonp0

 

I'm using VS 2012 and the service is included in my solution so the wcf if not hosted in IIS but the development web server.

Waiting your help and support.

Appreciate it.


Nencho
Telerik team
 answered on 31 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?