Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
102 views
I have problem with rewrite with generate new image in ascx file.
OK is
http://www.domain.com/contact.html
generate new image  call Default.aspx

Wrong is
http://www.domain.com/en/contact.html
generate new image call en\Default.aspx

error Ajax is
Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '<!DOCTYPE html PUBLI'.

IS POSIBILITY SET URL TO captcha for link generate new image ????
Marek Svrcina
Top achievements
Rank 1
 answered on 14 Jan 2011
3 answers
53 views
I am using ASP.NET AJAX Q1 2010 and I am having some issues with firefox.

Scenario:
I adopted the sample at http://www.telerik.com/community/code-library/aspnet-ajax/calendar/how-to-use-raddatepicker-with-multimonthview-calendar.aspx and used it with RadTimePicker so the idea is that for selecting date, user can use multiple month calendar and then select time. However, on firefox, if first the user selects date and then selects time, the control renders invalid date (red border with invalid image).

Diagnosis:
So I traced through the code and the problem is in the click handler for the time view..

This is telerik code:

,_onCellClickHandler:function(k){var c=Telerik.Web.UI.Calendar.Utils.FindTarget(k,this.get_id());
if(c!=null){var g=c.cellIndex;
if(navigator.userAgent.match(/Safari/)){var h=c.parentNode;
var a;
for(a=0;
a<h.cells.length;
a++){if(h.cells[a]==c){g=a;
}}}var m=this._findTime(c.parentNode.rowIndex,g);
if(m!=null){this._onCellMouseOutHandler(k);
var j=this.getTime();
if(j!=null){m.setDate(j.getDate());
m.setMonth(j.getMonth());
m.setYear(j.getYear());
}var n=new Telerik.Web.UI.TimeViewSelectingEventArgs(m,j);
var d=this.raise_clientTimeSelecting(n);
if(!d){this.setTime(m.getHours(),m.getMinutes(),m.getSeconds(),m);
......................

The problem is in the bolded line. The getYear api is depreciated and instead getFullYear should be used. as if the date is Jan 5, 2011, on firefox, getYear returns 111 and when you do m.setYear(111), m's date is something wierd. 
Now why does this error no manifest in all demos and normal situation is because, in setTime method we have:

,setTime:function(c,a,e,g){var f=$find(this.get__OwnerDatePickerID());
var d;
if(Object.getType(f).getName()=="Telerik.Web.UI.RadDateTimePicker"&&!f.get_calendar()){d=g;
}else{d=f.get_selectedDate();
}if(!d){d=new Date();
}d.setHours(c);
d.setMinutes(a);
d.setSeconds(e);

in normal scenario, the if condition would be false and hence d=f.get_selectedDate(); is executed. However, since I am using http://www.telerik.com/community/code-library/aspnet-ajax/calendar/how-to-use-raddatepicker-with-multimonthview-calendar.aspx, d = g is evaluated. And future down in the code, _setHiddenValue is called which actually verifies that the selected date is between min and max and this is where it fails. 
Radoslav
Telerik team
 answered on 14 Jan 2011
3 answers
62 views
I seem to be having an issue, I am trying to launch a  tooltip, radalert, or a plain alert in a usercontrol. When the user clicks a button I do some computation and then at the end of the method I try to launch a popup if it was successful. But I've been having some issues since the usercontrol reloads itself every time the button is clicked, and I needed it to reload it self.

I've tried showing the RadTootip/Alert server side but it didn't work then I tried setting the text of a literal to javascript at the end of the method but that didn't work.

Any ideas on how to show a popup at the end of a button click method?
Svetlina Anati
Telerik team
 answered on 14 Jan 2011
1 answer
96 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
175 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
158 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
65 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
788 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
363 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
128 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?