Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
70 views
Hi,

Hi have a raduploadcontrol as below :

<telerik:RadUpload ID="RadUpload1" runat="server" AllowedFileExtensions=".jpeg,.gif,.png,.jpg"
    ControlObjectsVisibility="None" OverwriteExistingFiles="True" AllowedMimeTypes="image/png,image/jpeg,image/gif">
</telerik:RadUpload>

File upload works perfectly fine in Firefox.

However when I try the same thing in IE it seems that there is no instance of the uploaded file available in the collection

Take a look at the firefox/ie images I've uploaded and you'll see what I mean.

For Each f As UploadedFile In RadUpload1.UploadedFiles
strNewMasterFilename = Server.MapPath("~/blogs/" & strActiveBlogName & "/" & strActiveBlogName & "_masterimage") & f.GetExtension

 f.SaveAs(strNewMasterFilename, True)
Next

So Basically the radupload1.uploadedfiles collection is returning null in IE, and the correct value in Firefox (also works fine in Opera)

Does anyone have any ideas ?

Its driving me crazy.


Grey
Top achievements
Rank 1
 answered on 26 Jan 2011
2 answers
217 views

I do have a problem with this tutorial after all.

The steps in the ActiveSkill tutorial ask you to create a SQL db with .sql files provided in the courseware.

This all goes to plan.

I then modified my ActiveSkillUI projects web.config, adding a connection string and a couple of role/membership providers.

Those 3 things look like this.

 
<connectionStrings>
        <add name="ActiveSkillConnectionString" connectionString="Data Source=NETDEV\SqlExpress;Initial Catalog=ActiveSkill;Integrated Security=True;User Id=ActiveSkillUser;Password=a0biozasu1" providerName="System.Data.SqlClient"/>
    </connectionStrings>
    <system.web>
        <roleManager enabled="true">
            <providers>
                <add    connectionStringName="ActiveSkillConnectionString"
                        applicationName="/ActiveSkill"
                        name="RoleProvider"
                        type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
                         
            </providers>
        </roleManager>
        <membership>
            <providers>
                <clear/>
                <add    name="AspNetSqlMembershipProvider"
                        type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
                        connectionStringName="ActiveSkillConnectionString"
                        enablePasswordRetrieval="false"
                        enablePasswordReset="true"
                        requiresQuestionAndAnswer="false"
                        requiresUniqueEmail="false"
                        passwordFormat="Hashed"
                        maxInvalidPasswordAttempts="3"
                        minRequiredPasswordLength="7"
                        minRequiredNonalphanumericCharacters="1"
                        passwordAttemptWindow="10"
                        passwordStrengthRegularExpression=""
                        applicationName="/ActiveSkill"/>
            </providers>
        </membership>
etc etc...


Note I have a user login created for this database. That login is confirmed and working.

My problem is that despite the efforts above, the WSAT ASP.NET Configuration app, keeps creating and using an ASPNETDB.MDF db that it is annoyingly creating in my projects  App_Data directory.

In an attempt to rid myself of this pointless database I tracked a reference to it back in the machine.config file.

In there it looked like this.

<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>

So, as a test I removed this line and put my own connectionsting in there.

However running the WSAT app again, it gets the following error.

An error was encountered. Please return to the previous page and try again.

The following message may help in diagnosing the problem: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty. (C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config line 152) at System.Web. etc etc

As a final check (before posting this thread) is I searched my project for any reference to the connection string LocalSqlServer and found it does not exist.

This it a mystery to me. Anyone have some tips?

Cheers

Brad




Brad
Top achievements
Rank 1
 answered on 26 Jan 2011
3 answers
68 views
Hi
I am using VS 2010 and telerik controls and some how the grids on the page is not displaying the data.
I am using following code.
ASPX
<div style="width: 80%">
                <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
                    <div style="float: left; height: 100%; width: 55px; background: #E3EFFF; text-align: center;
                        border-right: 1px solid #6593CF;">
                        <img src="images/tasks.gif" alt="" /></div>
                    <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True"
                        GridLines="None" Width="585px">
                        <MasterTableView AllowMultiColumnSorting="true" />
                        <SortingSettings SortedBackColor="Azure" EnableSkinSortStyles="false" />
                        <HeaderStyle Width="100px" />
                    </telerik:RadGrid>
                </telerik:RadAjaxPanel>
            </div>


protected void PRate_Load(object sender, EventArgs e)
        {
            LoadData();
        }
        protected void LoadData()
        {
            var Person = TypeCreator.TypeGenerator(new[]{
                new {ID=1, PackageName="1 Week", Duration="1 Week",   Rate=29, Price=100},
                new {ID=2, PackageName="1 Month(s)", Duration="1 Week",   Rate=29, Price=100},
                new {ID=3, PackageName="3 Month(s)", Duration="1 Week" , Rate=29, Price=100},
                new {ID=4, PackageName="6 Month(s)", Duration="1 Week",  Rate=29, Price=100},
                new {ID=5, PackageName="9 Month(s)", Duration="1 Week",   Rate=29, Price=100},
                new {ID=6, PackageName="12 Month(s)", Duration="1 Week", Rate=29, Price=100}
            });
            //none of the method is working,
 
            var dt = new System.Data.DataTable();
            dt.Columns.Add(new System.Data.DataColumn("ID", typeof(System.Int16)));
            dt.Columns.Add(new System.Data.DataColumn("PackageName", typeof(System.String)));
            dt.Columns.Add(new System.Data.DataColumn("Duration", typeof(System.String)));
            System.Data.DataRow dr;
            for (int i = 0; i < 100; i++)
            {
                dr = dt.NewRow();
                dr[0] = i;
                dr[1] = "Package" + i;
                dr[2] = i * 10;
                dt.Rows.Add(dr);
            }
 
 
            RadGrid1.DataSource = dt;
            RadGrid1.DataBind();
        }
 
 
   static class TypeCreator
    {
        public static List<T> TypeGenerator<T>(this T[] t)
        {
            return new List<T>(t);
        }
    }
Pavlina
Telerik team
 answered on 26 Jan 2011
1 answer
60 views
Hi,

    i am using rad splitter in my application.i have master page in side that i put splitter control
splitter has two region, menu region and content region. in menu region i am using rad panel bar control for vertical
menu. i am populating the menu items dynamically.after these functionalities done screen is getting too much time to
load.please tell me the solution to improve the performance.

i have attached my sample menu screen shot please refer that 
Dobromir
Telerik team
 answered on 26 Jan 2011
8 answers
277 views
Hi,

I'm trying to put together a line chart showing transactions per day over a period of time, separated out by store.  I noticed that the dates on the X-axis are not correct when compared to the actual data.  The dates on the bottom of the page don't scale, (instead it just uses each date point, so a hash mark can be one day, then jump to a week) and rather than place the datapoint at the right date, it just places it on the next one over.

When I set the DataXColumn setting for some hardcoded series, it worked fine.  So, is there a way to set the DataXColumn for each series and have the chart display the correct dates?  My code is below.

<telerik:RadChart runat="server" ID = "chartTransactions" AutoLayout="true" DataSourceID="datTransactions" DefaultType="Line" DataGroupColumn = "Store" Width="800" >
        <ChartTitle><TextBlock Text = "Transactions - Store"></TextBlock></ChartTitle>      
        <PlotArea>
            <XAxis DataLabelsColumn = "AppRejDate" >
                <Appearance ValueFormat="ShortDate">
                    <LabelAppearance RotationAngle="270">
                    </LabelAppearance>
                </Appearance>
            </XAxis>
        </PlotArea>
    </telerik:RadChart>
<asp:SqlDataSource ID = "datTransactions" runat="server" ConnectionString="<%$ ConnectionStrings:DBString %>" SelectCommand = "Select tblStore_Ref.Description, CAST(DATEADD(Day, DATEDIFF(Day, 0, AppRejDateTime), 0) AS Float) + 2 AS AppRejDate, Count(*) as Transactions From tblTransactionHistory INNER JOIN tblTransactionItems ON tblTransactionHistory.TransactionID = tblTransactionItems.TransactionID INNER JOIN tblStore_Ref ON tblTransactionItems.Store = tblStore_Ref.Store Where Status = 'A' AND AppRejDateTime Between @dateBegin AND @dateEnd Group By DATEADD(Day, DATEDIFF(Day, 0, AppRejDateTime), 0), tblStore_Ref.Description Order By AppRejDate, tblStore_Ref.Description">
        <SelectParameters>
            <asp:ControlParameter ControlID = "dateBegin" Name = "dateBegin" PropertyName="SelectedDate" />
            <asp:ControlParameter ControlID = "dateEnd" Name = "dateEnd" PropertyName="SelectedDate" />
        </SelectParameters>
    </asp:SqlDataSource>

Some sample data:

40513   S-2   1
40518   S-2   2
40519   S-2   1
40549   S-2   4
40553   S-2   3

Thanks.
Michael
Top achievements
Rank 1
 answered on 26 Jan 2011
1 answer
188 views
Is it possible to retrieve the underlying datarow when in any of the RadGrid Events, e.g. ItemDatabound? If this can be done can someone post an example.

From reading various posts it would seem that one would need to access the grid itself to get any data, though it seems rather an overhead to add a hidden column to the grid to have the data bound to it and then retrieve values from the grid. In my case I simply want to retrieve values from the datasource and build a tooltip for each row and I could do without the clutter of numerous hidden grid columns.

Thanks for any help.

Regards
Alan


Pavlina
Telerik team
 answered on 26 Jan 2011
2 answers
207 views
I have been trying to get this to work forever now.. is there something that I am just not seeing.

I am trying to set the max date from the code behind and it's just not cooperating... yet everything else is.

Here's the code behind in the item_created method:
if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
            {               
                GridEditFormItem dataItem = e.Item as GridEditFormItem;
                TableCell cell = dataItem["InspectionDate"];
                RadDatePicker rdp = cell.Controls[0] as RadDatePicker;
                rdp.Calendar.UseColumnHeadersAsSelectors = false;
                rdp.Calendar.UseRowHeadersAsSelectors = false;              
                rdp.MaxDate = DateTime.Now;
           }
 
any ideas would be great... basically it can figure out that the date is too large if you pick past the date, but when the calendar pops up, the dates past today are not grayed out... If I set the max date manually in the markup, it works fine.

please let me know if you need any more info.

Thanks,

Dustin
Marin
Telerik team
 answered on 26 Jan 2011
1 answer
264 views
Hi

I'm working on a Sharepoint 2010 installation, and have had a bit of trouble using the ASyncUpload in a custom Visual WebPart.

I can add files to the RadUploadTemp folder fine, and in fact any folder on the 80 hive, but as far as I can tell there is no way to upload into the 14 hive. Is this correct?

In the past, I have used the standard ASP FileUploader, with an IO Stream to upload directly to the url of my Sharepoint Library, but this does not seem to work with the RAD Async Upload, I just get this error:

'http://local-sharepoint/TestLibrary' is not a valid virtual path.

If I browse to that URL normally it works fine, and works fine with a standard uplader.

Any ideas what's going on here?

Thanks for any help
Steve
Top achievements
Rank 1
 answered on 26 Jan 2011
1 answer
71 views
Hey i am using rad editor. but it is giving me problem in case if i clear the editor. in that case all the button on the page stop working.
only solution i am using is i am not completely clearing the control . i store some blank spaces and blank rows to work and in that case it does not give any problem .
kindly help me is there any thing i can do with this editor. mean do i need to change any property of the editor so that it start working in empty case also.
please reply me soon i m waiting.
Rumen
Telerik team
 answered on 26 Jan 2011
11 answers
171 views
When clicking on a link in my RadGrid I am getting very slow performance.  I've done some performance profiling in VS 2010 and with Fiddler and I've found the following. 

First, there is a large amount of data being sent to the client (about 250kb) for an AJAX enable grid that can be paged, filtered and sorted.  Bandwidth however isn't the problem because this is all running locally in my debug environment. 

Since bandwidth wasn't the issue I decided to profile the code.  When running VS Profiler and looking at the slow operations it tells me that the following functions are mostly responsible for the slow results:

gridItem.onBubbleEvent
system.text.regularexpressions.matchenumerator.movenext
system.text.regularexpressions.regex.match

Where onBubbleEvent is calling the functions beneath it and those function are responsible for 70% of the time it takes to render the page.  Can anybody suggest ideas for improving the performance?  If I had to guess I'd say that given the large amount of data that RadGrid is just having a tough time slogging through it all and rendering html.
Pavlina
Telerik team
 answered on 26 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?