Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
91 views
I have a web form that uses RadMenu and RadToolBar on a form that displays a form view of records from a table (the form fields do not use Telerik controls). As the page is refreshed to show different records, each page loads slower and slower when using IE7. If I take off the Telerik controls, there's no problem. With IE8, also no memory problem (although it's still a lot slower than my own home-grown controls). Each time the page loads, IE7 gobbles up 15-20MB of memory, until I have to kill the browser. Any plans to fix this?
Kamen Bundev
Telerik team
 answered on 14 Jan 2011
2 answers
165 views
I am trying to insert a file (PDF/JPG/XLS) into an image field in my SQL database.  Thus far whatever I do, the file is inserted as a NULL value. The GridViewDataHyperLinkColumn is part of a nested detail table.  All other fields update just fine.  

<asp:SqlDataSource ID="sqlGetDocs" runat="server" OnInserting="SqlGetDocs_Updating"
                   ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
                   SelectCommand="spAspGetEnrollDocs" SelectCommandType="StoredProcedure"
                   InsertCommand="spASPinsertClientDocDatabase"
                   InsertCommandType="StoredProcedure">
                   <SelectParameters>
                       <asp:SessionParameter Name="SSN" SessionField="SSN" Type="String" />
                   </SelectParameters>
                   <InsertParameters>
                       <asp:ControlParameter ControlID="DropDownList1" Name="Client"
                           PropertyName="SelectedValue" Type="String" />
                       <asp:Parameter Name="SSN" Type="String" />
                       <asp:Parameter Name="DocDesc" Type="String" />
                       <asp:Parameter Name="FileType" Type="String" />
                       <asp:Parameter Name="ImageFile" dbType="Binary" />
                       <asp:Parameter Name="Updated" Type="DateTime" />
                       <asp:Parameter Name="Comments" Type="String" />
                       <asp:ControlParameter ControlID="lblUserName" Name="UserID" PropertyName="Text"
                           Type="String" />
                   </InsertParameters>
               </asp:SqlDataSource>

If I add the following code - I receive an error where I declare "imageBytes":  

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Protected Function UpdateImageField(ByVal gridEditableItem As GridEditableItem) As Byte()
    Dim bytes As Byte() = (DirectCast(gridEditableItem.EditManager.GetColumnEditor("ImageFile"), GridBinaryImageColumnEditor)).UploadedFileContent
    If bytes Is Nothing OrElse bytes.Length = 0 Then
        bytes = New Byte() {}
    End If
    Return bytes
End Function
 
Protected Sub SqlGetDocs_Updating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceCommandEventArgs)
    Dim imageBytes As Byte() = UpdateImageField(TryCast(RadGrid.EditItems(0), GridEditableItem))
    e.Command.Parameters("@ImageFile").Value = imageBytes
End Sub

Could someone tell me what I'm doing wrong?
Iana Tsolova
Telerik team
 answered on 14 Jan 2011
1 answer
143 views
Hello In my radgrid one edit form .. i will update some values.. I handle some java script code for validation
Their one textbox UPC .. if UPC code is not valid it will show alert message.. after showing alert message when i tried to click on cancel. It will again and again warn me "Invalide UPC".. it's not handle cancel button click.

Code for UPC textbox

javascript
function validateUPC(txtUPC) {
        debugger;
        var txtboxUPC = document.getElementById(txtUPC);
        if (txtboxUPC.value.length != 12) {
            alert('Invalid UPC Barcode');
            txtboxUPC.focus();
            return false;
        }

        if (!validateUPCCode(txtboxUPC.value)) {
            alert('Invalid UPC Barcode');
            txtboxUPC.focus();
            return false;
        }

code behind cs file  to call javascript on textbox onblur
TextBox txtGameUPC = (TextBox)editForm.FindControl("txtGameUPC");
               txtGameUPC.Visible = true;
               txtGameUPC.Enabled = false;
               //Call Java script function to validate the UPC code
               txtGameUPC.Attributes.Add("onblur", "validateUPC('" + txtGameUPC.ClientID + "');");


On cancel button click
javascript
function RaiseCancel(sender, args) {
        if (args.get_commandName() == "CancelUpdate")//check for the condition
        {
            //your code here
        }
    }

<ClientSettings>
                    <ClientEvents OnCommand="RaiseCancel" />
                </ClientSettings>
It's does not raise event cancel. I don't know why this is happen ...

Help me urgent

plz find attach file u get an idea
Tsvetoslav
Telerik team
 answered on 14 Jan 2011
1 answer
60 views
Problem:  
When I, as a site collection admin, click on the DocumentManager icon, the pop up screen will show NOT FOUND for all the libraries.  See attached screen shot.

Configuration:
I don't have the DocumentsPath tag at all in the config.xml

Attempts:
When I put the DocumentPath tag with root document, it will show up on the pop up screen with just that library.
    <property name="DocumentsPaths">
        <item>/Documents</item>
        <item>whatever</item>
    </property>
and "whatever" will show as NOT FOUND.

Other findings:
Another developer, who I believe has farm admin rights, can see all the libraries instead of NOT FOUND.  
This also works on a few different site collections with a site collection admin but not for others.  
We have this working a few months ago and not sure why it stopped working all of the sudden.
We have to leave it dynamic to go through all libraries


Is it a known bug and got addressed in the newer version?
Stanimir
Telerik team
 answered on 14 Jan 2011
3 answers
715 views
DISCLAIMER:  I am brand new to the Telerik ASP.NET AJAX toolkit.  So my apologies if these are truly "newbie" questions.

Environment: ASP.NET 3.5, Windows 7, IE 8, ASP.NET, Telerik ASP.NET AJAX Q3 2009 SP3


I have a RadGrid with a number of columns.
I have successfully bound the RadGrid to a DataTable in the C# code behind.  When the grid is displayed, the correct values are shown.

Note:  I am using stored procedures to populate my source DataTable.  In order to update the database properly, I have to manually execute multiple stored procedures.  So, it's my understanding that I can't use "Automatic" mode for this RadGrid.  (Am I correct on this?)

When I click the Edit link on one of the grid's row, the row is changed to allow me to enter new values. (FYI, I've used both in-place and EditForm editing.)

The problem is that once I click the Update link, the new values I typed in are not saved.  (My plan is to get the new values typed in, and then manually update the database via the various stored procs.)

I added an UpdateCommand event handler, but when I look at e.Item, it gives me the the old value, not the new value.

Please advise...

Thanks,

Mitch

 

protected void RadGridNextSteps_UpdateCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
    GridDataItem editItem = e.Item as GridDataItem; // found the row
    TableCell cell = editItem["sDisplayText"]; // found the cell
    TextBox txt = cell.Controls[0] as TextBox; // found the control
    string itemValue = txt.Text; // found the control’s value
    // Problem: itemValue is old value, not new value.
}

 

Tsvetoslav
Telerik team
 answered on 14 Jan 2011
8 answers
335 views

Hello Telerik Team,

I have a requirement where i need to bind the Radscheduler to two datasources.Meaning
I have developed a usercontrol which is wrapped in  a Sharepoint webpart which consists of a
rad scheduler.As of now my rad scheduler pulls the information from a specific list.
But now i need to pull the information  for the appointments not only from a specific list but also from a sql database table.

what is the method i need to follow.
Do i need to use this

http://www.telerik.com/help/aspnet-ajax/schedule_databindingimplementingaproviderthatsupportsmultivaluedresources.html

Any sample for this is greatly appreciated.

Thank you,
Smith

roshani
Top achievements
Rank 1
 answered on 14 Jan 2011
2 answers
117 views
Hi.

Is it possible to export the content of a webpage to PDF or Word or does the content have to be within a RadGrid, Telerik Report of RadEditor?

At a push I could get the content appearing in a RadEditor and use that components built in export functions but it's not ideal. And I can only Export to PDF or RTF. And the RTF format does not render html tables or images which means that's a non-starter.

Thanks
Chris
Daniel
Telerik team
 answered on 13 Jan 2011
3 answers
106 views

Hi Team ,

I have created webpart where i have included RadScript manager as below . Webpart is displaying correctly where as when I take mouse over any item on left navigation bar i get error as "A runtime error has occured .Do you wish to Debug?" and when I debug the error control takes me over to "onmouseover="Menu_HoverStatic(this)" ,Can you suggest as how to go about the issue .

ScriptManager

 

_scriptManagerTree = ScriptManager.GetCurrent(this.Page);

 

 

if (_scriptManagerTree == null)

 

{

_scriptManagerTree =

new RadScriptManager();

 

 

this.Controls.AddAt(0, _scriptManagerTree);

 

}
Regards
Srujan.N

Simon
Telerik team
 answered on 13 Jan 2011
5 answers
60 views
Hi,

I have hierarchical rad grid with filtering.
My scenario of Issue as  follows:
  • 1st detail table has been expanded and 2nd one has been collapsed.
  • I am typing some thing (eg: "A" ) inside the filter text box in 1st grid (eg: " FirstName" Column) and apply filter (eg: stars with...)
  • Then I expand the 2nd grid
  • The letter "A" which I have typed in 1st grid's filter text box is being displayed in 2nd grid " FirstName" column's filter text box also.
  • Filter value is only being displayed NOT FILTERED the 2nd grid.
  • What I want is to stop displaying filter value of one grid inside another grid's same column filter text box.
Can you please give me a solution to overcome this issue.

Regards,
Madu
Daniel
Telerik team
 answered on 13 Jan 2011
2 answers
44 views
Hello,

I'm not sure if this is the intended results of RadRating or its just in my case, but I have created a Yes/No rating similar to the demo and the problem I encountered was when I set the RadRatingItem to Value="0", then on the initial page_load, the SelectedImageUrl is used as the default image vs ImageUrl.  I'm using the RadRating in a grid and all the grid results produce the same results.

Here is the RadRating source:
<telerik:RadRating ID="ratingBinary" runat="server" ItemHeight="20px" ItemWidth="20px"
   Orientation="Horizontal" SelectionMode="Single" AutoPostBack="true" OnRate="ratingBinary_Rate">
      <Items>
         <telerik:RadRatingItem Value="0"
            HoveredImageUrl="Assets/Collection/Images/Rating/Binary/downh.png"
            HoveredSelectedImageUrl="Assets/Collection/Images/Rating/Binary/downh.png"
            SelectedImageUrl="Assets/Collection/Images/Rating/Binary/downh.png"
            ImageUrl="Assets/Collection/Images/Rating/Binary/down.png"
            ToolTip="No" />
         <telerik:RadRatingItem Value="1"
            HoveredImageUrl="Assets/Collection/Images/Rating/Binary/uph.png"
            HoveredSelectedImageUrl="Assets/Collection/Images/Rating/Binary/uph.png"
            SelectedImageUrl="Assets/Collection/Images/Rating/Binary/uph.png"
            ImageUrl="Assets/Collection/Images/Rating/Binary/up.png"
            ToolTip="Yes" />
      </Items>
</telerik:RadRating>

The goal was to use 0 & 1 for the rateBinary.Values and convert to bool in the OnRate event.

Any suggestions are appreciated,
Thank you,
Ronnie
Ronnie
Top achievements
Rank 1
 answered on 13 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?