Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
203 views
Hello!

How can we solve the click to activate eolas problem in rad editor. Is there any js i can edit to change the way rad inserts flash?

thanks
Stanimir
Telerik team
 answered on 19 Nov 2008
1 answer
164 views
Q3 2008 asp.net ajax controls

I am 2 menu items. I am setting the width of my radmenu to 800.

the width of my page is 800.

I am setting the webblue skin to 800, but it is too wide. To make it the same width, I have to set it to 740.

If I change the skin, it changes the width, even though I still have two menu items and teh width is 740.

The width is just not consistently the same width even though I'm not changing the code. Just the skin.

How can I get a consistent width and why is it not?

        With menSite
            .DataFieldID = "menuId"
            .DataFieldParentID = "parentMenuId"
            .DataNavigateUrlField = "menuURL"
            .DataTextField = "menuName"
            .DataValueField = "menuId"
            .DataSourceID = "SqlDataSource1"
            .CollapseAnimation.Type = AnimationType.OutQuint
            .CollapseAnimation.Duration = "200"
            .Width = "740"
        End With

thanks.
Alex Gyoshev
Telerik team
 answered on 19 Nov 2008
1 answer
202 views
I've got a RAD ComboBox that is bound to a long list of lookup values. It uses load on demand and MarkFirstMatch.

When the user is typing some text and then quickly presses TAB to go to next control on the page, the RAD combo currently grabs back the focus after a few seconds if it finds a match. Can that be prevented? It would be much nicer if the combo automatically expanded the Text to the first match without grabbing the keyboard focus.

In the case that there is no single match, it should keep the text as entered by the user, and then on the form-submit, we could validate the selection in the combo and inform the user to (re-)select a value. In our application this will not be common because most of the values are short, and the users types them in quickly and fully.

Thanks for any help,
Ries 

 

Yana
Telerik team
 answered on 19 Nov 2008
1 answer
109 views
Can anyone help?
I have the Telerik Ajax functions working on my page however if I try to validate the HTML through the W3 i get an error on the value of the Telerik_stylesheet WebResource.axd. As it has '&' in the value it errors.

Trying to validate to XHTML 1.0 Transitional.
Any help would be great.

Many thanks
T
Sebastian
Telerik team
 answered on 19 Nov 2008
1 answer
144 views
RadAjaxPanel makes trouble for client-side validation - written in javascript.

I have a RadGrid wich looks like this:

 

<telerik:RadAjaxPanel ID="rap" runat="server" >

 

 

<telerik:RadGrid

 

 

Skin="WebBlue"

 

 

ID="RadGrid1"

 

 

runat="server"

 

 

GridLines="None"

 

 

AllowPaging="True"

 

 

AllowSorting="True"

 

 

Width="97%"

 

 

AutoGenerateColumns="False"

 

 

EnableAJAX="true"

 

 

ShowStatusBar="true"

 

 

>

 

 

<MasterTableView GridLines="None" Width="100%" CommandItemDisplay="Top" >

 

 

<Columns>

 

 

<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" />

 

 

<telerik:GridBoundColumn Display="false" HeaderText="Phone" DataField="Phone" />

 

 

<telerik:GridBoundColumn Display="false" HeaderText="MobilePhone %>" DataField="MobilePhone" />

 

 

<telerik:GridBoundColumn Display="false" HeaderText="Email " DataField="Email" />

 

 

<telerik:GridButtonColumn UniqueName="DeleteColumn" CommandName="Delete" Text="Delete" />

 

 

</Columns>

 

 

<EditFormSettings UserControlName="DependentPersonDossiersEditForm.ascx" EditFormType="WebUserControl">

 

 

<EditColumn UniqueName="EditCommandColumn1" />

 

 

</EditFormSettings>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

</telerik:RadAjaxPanel>

I use a usercontrol for edits, inserts:

 

...
<

div>

 

 

 

 

<table frame="void">

 

 

 

 

<tr>

 

 

 

 

<td>

 

 

 

 

<div>

 

 

 

 

<wwui:Field ID="uiPhoneField" runat="server" LabelFor="uiPhone" Label="Phone">

 

 

 

 

<telerik:RadTextBox ID="uiPhone" runat="server" />

 

 

 

 

<asp:CustomValidator

 

 

 

 

ID="uiPhone_cv"

 

 

 

 

runat="server"

 

 

 

 

ErrorMessage="*"

 

 

 

 

Text="*"

 

 

 

 

ControlToValidate="uiPhone"

 

 

 

 

Display="Static"

 

 

OnServerValidate="uiPhone_cv_ServerValidate"

 

 

 

 

/>

 

 

 

 

</wwui:Field>

 

 

 

 

<wwui:Field ID="uiMobilePhoneField" runat="server" LabelFor="uiMobilePhone" Label="MobilePhone">

 

 

 

 

<telerik:RadTextBox ID="uiMobilePhone" runat="server" />

 

 

 

 

<asp:CustomValidator

 

 

 

 

ID="uiMobilePhone_cv"

 

 

 

 

runat="server"

 

 

 

 

ErrorMessage="*"

 

 

 

 

Text="*"

 

 

 

 

ControlToValidate="uiMobilePhone"

 

 

 

 

Display="Static"

 

 

 

 

/>

 

 

 

 

</wwui:Field>

 

 

 

 

<wwui:Field ID="uiEmailField" runat="server" LabelFor="uiEmail" Label="Email">

 

 

 

 

<telerik:RadTextBox ID="uiEmail" runat="server" />

 

 

 

 

<asp:CustomValidator

 

 

 

 

ID="uiEmail_cv"

 

 

 

 

runat="server"

 

 

 

 

ErrorMessage="*"

 

 

 

 

ControlToValidate="uiEmail"

 

 

 

 

Display="Static"

 

 

 

 

/>

 

 

 

 

</wwui:Field>

 

 

 

 

</div>

 

 

 

 

</td>

 

 

 

 

</tr>

 

 

 

 

<tr>

 

 

 

 

<td>

 

 

 

 

<asp:Button ID="btnUpdate" ValidationGroup="DependentPersonDossiersGrid" BackColor="Red" text="Confirm Edit" runat="server" CommandName="Update" Visible="true"></asp:Button>

 

 

 

 

<asp:Button ID="btnInsert" ValidationGroup="Grid" text="Perform Insert" runat="server" CommandName="PerformInsert" Visible="false"></asp:Button>

 

 

 

 

&nbsp;

 

 

 

 

<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="false" CommandName="Cancel"></asp:Button>

 

 

 

 

</td>

 

 

 

 

</tr>

 

 

 

 

</table>

 

 

 

 

</div>
...

In the usercontrols codebehind I register javascripts like this:

 

 

ClientScriptManager csm = Page.ClientScript;

 

 

if ( !csm.IsClientScriptBlockRegistered ( "PhoneFormatValidate" ) )

 

{

 

StringBuilder sbphone = new StringBuilder ( 512 );

 

sbphone.Append (

" <script type='text/javascript' language='javascript'>" );

 

sbphone.Append (

" function PhoneFormatValidate(source, clientside_args) " );

 

sbphone.Append (

" { " );

 

sbphone.Append (

" var phoneStr; " );

 

sbphone.Append (

" phoneStr = clientside_args.Value;" );

 

sbphone.Append (

" phoneStr = phoneStr.replace(/\\s+/g, '');" );

 

sbphone.Append (

" clientside_args.IsValid = true; " );

 

sbphone.Append (

" if (phoneStr.length > 0) " );

 

sbphone.Append (

" { " );

 

sbphone.Append (

" if (!phoneStr.match(/^((\\+(([0-9]){2})\\(([0-9]){2}\\)([0-9]){6})|(([0-9]){8}))$/)) " );

 

sbphone.Append (

" clientside_args.IsValid = false; " );

 

sbphone.Append (

" } " );

 

sbphone.Append (

" } " );

 

sbphone.Append (

" </script>" );

 

 

 

 

csm.RegisterClientScriptBlock (

typeof ( CommunicationType ), "PhoneFormatValidate", sbphone.ToString ( ) );

 

}

 

if ( !csm.IsClientScriptBlockRegistered ( uiEmail.ClientID ) )

 

{

 

StringBuilder sb = new StringBuilder ( 512 );

 

sb.Append (

" <script type='text/javascript' language='javascript'>" );

 

sb.Append (

" function " + uiEmail.ClientID + "_EmailFormatValidate(source, clientside_args) " );

 

sb.Append (

" { " );

 

sb.Append (

" var emailStr; " );

 

sb.Append (

" emailStr = (document.getElementById('" + uiEmail.ClientID + "')).value;" ); //clientside_args.Value;" );

 

 

 

 

sb.Append (

" clientside_args.IsValid = true; " );

 

sb.Append (

" emailStr = emailStr.replace(' ','');" );

 

sb.Append (

" if (emailStr.replace(/\\s+/g, '').length > 0) " );

 

sb.Append (

" { " );

 

sb.Append (

" if (!emailStr.match(/^((mailto:)?([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+)$/)) " );

 

sb.Append (

" clientside_args.IsValid = false; " );

 

sb.Append (

" } " );

 

sb.Append (

" } " );

 

sb.Append (

" </script>" );

 

 

 

 

csm.RegisterClientScriptBlock (

typeof ( EMailType ), uiEmail.ClientID, sb.ToString ( ) );

 

}

uiPhone_cv.ClientValidationFunction =

"PhoneFormatValidate";

 

uiMobilePhone_cv.ClientValidationFunction =

"PhoneFormatValidate";

 

uiEmail_cv.ClientValidationFunction = uiEmail.ClientID +

"_EmailFormatValidate";

This works fine without the ajaxpanel.
But when I wrap the grid in an ajaxpanel I get a javascript-error (Error: Object expected) when the validation is supposed to fire.
What is the right way to register javascript wich depends on known the clientid?
In context of ajax enabled.

Mvh.

Arve

 

Maria Ilieva
Telerik team
 answered on 19 Nov 2008
3 answers
414 views
Hello everyone,

I have to put a asynchrone trigger on 2 RadToolbar that are located within 2 RadDock.

<telerik:RadDockLayout ID="RadDockLayout1" runat="server"
            <div class="main"
                <table border="1" cellpadding="1" cellspacing="1"
                    <tr> 
                        <td> 
                        </td> 
                        <td> 
                            <telerik:RadToolBar runat="server" ID="tbValidation" Skin="Office2007"
                                <Items> 
                                    <telerik:RadToolBarButton ImageUrl="Images/submit.gif" ToolTip="OK" CommandName="ok" /> 
                                    <telerik:RadToolBarButton ImageUrl="Images/close.gif" ToolTip="Annuler" CommandName="cancel" /> 
                                </Items> 
                            </telerik:RadToolBar> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td colspan="2"
                            <div style="position:relative;"
                              
                                <div style="position:absolute; z-index:1;"
                                    <asp:UpdatePanel ID="UpdatePanel1" runat="server"
                                        <ContentTemplate> 
                                            <cc1:Map ID="Map1" runat="server" Height="600px" Width="800px"
                                            </cc1:Map> 
                                        </ContentTemplate> 
                                        <Triggers> 
                                            <asp:AsyncPostBackTrigger ControlID="tbInfo" /> 
                                            <asp:AsyncPostBackTrigger ControlID="tbEdition" /> 
                                        </Triggers> 
                                    </asp:UpdatePanel> 
                                </div> 
                                  
                                <div id="toolbar" style="position:absolute; left:75px; z-index:2; filter:Alpha(opacity=20); opacity: .20;" onmouseover="javascript:this.style.filter = 'Alpha(opacity=100)'; this.style.opacity = '1';" onmouseout="javascript:this.style.filter = 'Alpha(opacity=20)'; this.style.opacity = '.20';"
                                    <telerik:RadDockZone   
                                        ID="dockTop"   
                                        runat="server"   
                                        CssClass="zone"   
                                        Height="65px" 
                                        Orientation="Horizontal"   
                                        Width="425px"
                                    </telerik:RadDockZone>                                  
                                </div> 
                            </div> 
                              
                        </td> 
                    </tr> 
                    <tr> 
                        <td colspan="2"
                            <asp:Button ID="buttonEditShape" runat="server" Text="edit" ToolTip="Edit Shape" 
                                OnClick="buttonEditShape_Click" /> 
                        </td> 
                    </tr> 
                </table> 
            </div> 
              
            <telerik:RadDock Left="450" Top="150" ID="RadDock1" runat="server" Height="63px" 
                width="201px" OnClientDockPositionChanged="dockInfo" 
                CssClass="dock" DefaultCommands="ExpandCollapse" Title="Information" 
                Skin="Office2007" style="z-index:10;"
                <ContentTemplate> 
                    <telerik:RadToolBar runat="server" ID="tbInfo" Skin="Office2007" OnButtonClick="test" OnClientButtonClicked="click_handler"
                        <Items> 
                            <telerik:RadToolBarButton ImageUrl="Images/select.png" CheckOnClick="true" AllowSelfUnCheck="true" 
                                ToolTip="Selection" CommandName="select" /> 
                            <telerik:RadToolBarButton ImageUrl="Images/overview_replacement.gif" CheckOnClick="true" 
                                AllowSelfUnCheck="true" ToolTip="Zoom sur selection" CommandName="zoom" /> 
                            <telerik:RadToolBarButton ImageUrl="Images/measuring_stick_on.gif" CheckOnClick="true" 
                                AllowSelfUnCheck="true" ToolTip="Mesure de distance" CommandName="measure" /> 
                            <telerik:RadToolBarButton ImageUrl="Images/surfaceMeasurement.png" CheckOnClick="true" 
                                AllowSelfUnCheck="true" ToolTip="Mesure de surface" CommandName="surfaceMeasure" /> 
                            <telerik:RadToolBarButton ImageUrl="Images/btn_map_label.gif" CheckOnClick="true" 
                                AllowSelfUnCheck="true" ToolTip="Informations" CommandName="info" /> 
                        </Items> 
                    </telerik:RadToolBar> 
                </ContentTemplate> 
            </telerik:RadDock> 
              
            <telerik:RadDock Left="500" Top="250" ID="RadDock2" runat="server" Height="63px" 
                width="201px" OnClientDockPositionChanged="dockEdit" 
                CssClass="dock" DefaultCommands="ExpandCollapse" Title="Edition" 
                Skin="Office2007" style="z-index:10;"
                <ContentTemplate> 
                    <telerik:RadToolBar runat="server" ID="tbEdition" Skin="Office2007" OnButtonClick="test" OnClientButtonClicked="click_handler"
                        <Items> 
                            <telerik:RadToolBarButton ImageUrl="Images/btn_map_edit.gif" CheckOnClick="true" 
                                AllowSelfUnCheck="true" ToolTip="Tracer un nouvel objet" CommandName="draw" /> 
                            <telerik:RadToolBarButton ImageUrl="Images/modifynode.png" CheckOnClick="true" AllowSelfUnCheck="true" 
                                ToolTip="Sommets" CommandName="node" /> 
                            <telerik:RadToolBarButton ImageUrl="Images/Delete.gif" CheckOnClick="true" AllowSelfUnCheck="true" 
                                ToolTip="Suppression" CommandName="del" /> 
                            <telerik:RadToolBarButton ImageUrl="Images/cut.png" CheckOnClick="true" AllowSelfUnCheck="true" 
                                ToolTip="Découper" CommandName="cut" /> 
                            <telerik:RadToolBarButton ImageUrl="Images/fusionner.png" CheckOnClick="true" AllowSelfUnCheck="true" 
                                ToolTip="Fusionner" CommandName="fuze" /> 
                        </Items> 
                    </telerik:RadToolBar> 
                </ContentTemplate> 
            </telerik:RadDock> 
        </telerik:RadDockLayout>  

But when I launch the project, I've got an error on the triggers. The toolbars aren't find in the page.
I try with an other control (a button) but it's the same. The triggers can't find controls in the dock content template.

How I can put these triggers on controls ?

Thanks.

PS : Apologize me for my English, I'm a french guy.
Pierre-Antoine
Top achievements
Rank 1
 answered on 19 Nov 2008
1 answer
102 views
Hi All,

I am using grid, I have set grid edit mode in pop up,when I open pop up in insert mode my pop up goes behind grid but when I open pop up in edit mode it displays perfectly.This problem comes only when I make useStaticHeader property to true.In IE I don't have issue but in Mozila it does not work



Regards,

Sam T.
Yavor
Telerik team
 answered on 19 Nov 2008
0 answers
194 views
Hi

   I have a question. I am using Tab strip on my view control in the dnn module. There a re a few set of tabs and clicking on them will display the corresponding panels. Noe some panels have grids and editing functionality so that when clicked on edit it will redirect to another control and on update it should navigate back to the view control with that specific tab selected. How can i do it because the default url is as follows
http://localhost/dnn4.8.4/LISTS/tabid/56/Default.aspx and on every click will return as # to the same thing and corresponding panels are displayed based on tab.selecteditems value. But when redirecting from other control though i pass parameters like

http://localhost/dnn4.8.4/LISTS/tabid/56/Default.aspx?Categorid=Category

 from that and get them in my view control and based on that display the panels it still shows nothing AND DISPLAYS THE DEfault thing rather than displaying the previousle selected tab. How can i solve it. please let me know if there is any other way and its really urgent

Thanks,
Sandeep.M.


sandeep
Top achievements
Rank 1
 asked on 19 Nov 2008
2 answers
138 views
Hi,
How do I bind a dataTable to a Grid when the Grid row contains an asp:checkbox control within GridTemplateColumn? The initial state of the checkbox "Enabled" is set from the dataTable. 

How do I maintain the state of these checkboxes during postbacks?

<

 

Columns>

 

 

 

 

<telerik:GridTemplateColumn UniqueName="TemplateColumn" >

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:Panel ID="Panel1" runat="server">

 

 

 

 

<asp:CheckBox ID="Enabled" runat="server" AutoPostBack="true" OnCheckedChanged="CheckedChanged" />

 

 

 

 

</asp:Panel>

 

 

 

 

</ItemTemplate>

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

<

 

telerik:GridDropDownColumn UniqueName="System" ListTextField="rSystemName" ListValueField="System" ListDataMember="rSystems" DataField="System" HeaderText="r system"  DropDownControlType="RadComboBox" />

 

 

 

 

<telerik:GridBoundColumn UniqueName="Value" DataField="Value" HeaderText="Value"  />

 

 

 

 

<telerik:GridTemplateColumn UniqueName="TemplateColumn" >

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:Panel ID="Panel5" runat="server">

 

 

 

 

<asp:CheckBox ID="Switch" runat="server" AutoPostBack="true" OnCheckedChanged="CheckedChanged" />

 

 

 

 

</asp:Panel>

 

 

 

 

</ItemTemplate>

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

<telerik:GridBoundColumn UniqueName="Alpha" DataField="Alpha" HeaderText="α"  />

 

 

 

 

<telerik:GridBoundColumn UniqueName="Beta" DataField="Beta" HeaderText="β" HeaderStyle-HorizontalAlign="Center" />

 

 

 

 

</Columns>

 

 

 

<

 

EditFormSettings CaptionFormatString="Edit details for route with Id {0}" CaptionDataField="Id">

 

 

 

 

<FormTableItemStyle Width="100%" Height="29px"></FormTableItemStyle>

 

 

 

 

<FormTableStyle GridLines="None" CellSpacing="0" CellPadding="2"></FormTableStyle>

 

 

 

 

<FormStyle Width="100%" BackColor="#eef2ea"></FormStyle>

 

 

 

 

<EditColumn ButtonType="ImageButton" />

 

 

 

 

</EditFormSettings>

 

 

 

 

</MasterTableView>

 

 

 


The dataTable comes from a dataSet

protected

 

void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)

 

{

 

 

 

if (Session["Routes"] == null)

 

{

RadGrid1.DataSource = Routes;

 

 

 

}

 

 

 

 

else

 

 

 

{

RadGrid1.DataSource = Session[

"Routes"];

 

 

 

 

}

 

}

 

 



Any help much appreciated?
 
Steve
Top achievements
Rank 1
 answered on 19 Nov 2008
3 answers
219 views
Hi There,
I am facing a problem in setting a ToopTip for the Image Buttons(Close,Minimize,Maxmize) on the RadWindows. I want set  a help image in the Radwindows and want to set the ToolTip text on Mouse over  is "Help".
How can I do this.
Please, sugggest some solution.

Thanks in Advance,
Raj

 
Raj
Top achievements
Rank 1
 answered on 19 Nov 2008
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?