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

I have defined a custom template for alert and confirm dialogs. But am not able to move the dialogs even after setting Behavior property to "Move" for RadWindowManager.

 

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableEmbeddedSkins="False" Skin="SendToENv2" Behavior="Default" InitialBehavior="None" Behaviors="Maximize,Minimize,Move,Resize">
<AlertTemplate >
    <div class="rwDialogPopup radalert"> 
    <div class="rwDialogText"> {1} </div>
    <div>
    <a id="send2Alert" onclick="$find('{0}').close();" onkeypress="$find('{0}').close();" class="rwPopupButton" href="javascript:void(0);">
    <span class="rwOuterSpan">
    <span class="rwInnerSpan">##LOC[OK]##</span>
    </span>
    </a>
</div>
</div>
</AlertTemplate>
</telerik:RadWindowManager>

 

I have even tried with the code present in the below link posted by one of the telerik member . There also i am facing the same issue. No customized styles have been explcitily defined by me. Code file is being attached. - Code.jpg
http://www.telerik.com/community/forums/aspnet-ajax/window/templates-for-confirm-dialog.aspx

1 more point i noticed here is that the issue doesn't happens with Tereik RadControls for ASP.NET AJAX Q2 2010. Am currently using Tereik  RadControls for ASP.NET AJAX Q2 2009. The issue occurs in the 2009 version. Please let know whether this is the limitation for the 2009 version or should i need to explicitly provide any customizations in order to make the confirm/alert dialogs move( along with the movement of cursor)

Thanks,
Divya
Divya
Top achievements
Rank 1
 answered on 14 Jan 2011
1 answer
91 views
Found this strange behavior after reordering of the column was done: if someone swap column 1 and 4 and enters a filter expression into column 4, column 1 will have the same filter query and radgrid will have two parts in the filterexpression: one from column 1 and one from column 4. Anyone discovered that?
Maria Ilieva
Telerik team
 answered on 14 Jan 2011
2 answers
105 views
Good day!
I have got such a question: I have got  grid and I can change page size - I can set it to 10, 20 and 50.
For example: I have 47 items in the grid. When I set page size to 50 the grid's paging becomes invisible and I can not change page size any more =((
Can I make paging always visible?

Thank you
Lina
lina fetisova
Top achievements
Rank 1
 answered on 14 Jan 2011
4 answers
392 views
Hi,
I am using FormDecorator in my page.

how can i enable/disable button using javascript ?
Georgi Tunev
Telerik team
 answered on 14 Jan 2011
6 answers
190 views
I have a grid that's using a separate Edit form that has a RadInputManager to validate control values (Note: The RIM and controls are part of a user control that makes up a portion of the edit form). Most of these are standard (ASP) textboxes and the RIM is properly showing the entry cues (i.e. "Please enter text here."). However, when the form is submitted, the RIM validators (?) are not firing to show the missing/incorrect fields and are also not preventing the form from being submitted (form is being posted back with bad data).

On the server side, if I check Page.IsValid, the result is true. Previously, I had a similar issue where the RIM validation was flagging the fields as bad (i.e. showing a red outline in the offending field(s)), but was still submitting the form immediately instead of forcing the user to correct the bad data.

Here's a snippet of the RadInputManager properties that are set:

<telerik:RadInputManager id="RadInputManager1" runat="server">
    <telerik:TextBoxSetting ErrorMessage="Required field." Validation-IsRequired="True"
        EmptyMessage="Please type here." Validation-ValidateOnEvent="Submit" >
        <TargetControls>
            <telerik:TargetInput ControlID="txtFirstName" Enabled="true" />
            <telerik:TargetInput ControlID="txtLastName" Enabled="true" />
            <telerik:TargetInput ControlID="txtEmail" Enabled="true" />
        </TargetControls>
        <Validation IsRequired="True" ValidationGroup="AccountValidationGroup">
        </Validation>
    </telerik:TextBoxSetting>
    <telerik:RegExpTextBoxSetting ErrorMessage="Please enter a valid email address."
        ValidationExpression="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$" Validation-ValidateOnEvent="Submit">
        <TargetControls>
            <telerik:TargetInput ControlID="txtEmail" Enabled="true" />
        </TargetControls>
    <Validation IsRequired="True" ValidationGroup="AccountValidationGroup"></Validation>
    </telerik:RegExpTextBoxSetting>
</telerik:RadInputManager>


And here is the markup for the fields themselves:

<div style="float: left; width: 50%;">
    <table cellspacing="0" border="0" summary="Edit Table">
        <tr>
            <td align="right">
                <asp:Label ID="lblFirstName" runat="server" Text="First Name" /> 
            </td>
            <td>
                <asp:TextBox ID="txtFirstName" runat="server" AutoCompleteType="FirstName" 
                    TabIndex="3" />
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="lblLastName" runat="server" Text="Last Name" /> 
            </td>
            <td>
                <asp:TextBox ID="txtLastName" runat="server" AutoCompleteType="LastName" 
                    TabIndex="4" />
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="lblEmail" runat="server" Text="Email" /> 
            </td>
            <td>
                <telerik:RadTextBox ID="txtEmail" runat="server" AutoCompleteType="None" 
                    TabIndex="9"></telerik:RadTextBox>
            </td>
        </tr>
    </table>
</div>

Has anyone seen this issue before and/or know of a solution?

Thanks,

Jon
Pavlina
Telerik team
 answered on 14 Jan 2011
2 answers
120 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
74 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
86 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
136 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
209 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?