Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
248 views
I am using Telerik captcha control without textbox and now i want to validate this with my own textbox value.

my code is this

    <telerik:RadCaptcha ID="RadCaptcha" runat="server" EnableRefreshImage="true" CaptchaTextBoxCssClass="text"
                                                                    ProtectionMode="Captcha" Display="Dynamic" ErrorMessage="Invaid Code" CaptchaImage-TextColor="Black"
                                                                    CaptchaImage-RenderImageOnly="true" CaptchaImage-Width="219" CaptchaImage-TextChars="CustomCharSet"
                                                                    CaptchaImage-CharSet="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
                                                                    CaptchaImage-ImageCssClass="captchIMG" CaptchaImage-Height="36" CaptchaImage-BackgroundNoise="None"
                                                                    CaptchaImage-LineNoise="High" />

and a single seperate text box for validate its value

    <asp:TextBox ID="txtCaptcha" runat="server" CssClass="text" />

Now on button click event i want to validate this captcha text but how???
Slav
Telerik team
 answered on 18 Aug 2011
5 answers
167 views
I saw a similar thread under RADControls, but didn't see any answer so I thought I'd post here.  I have a RADUpload control placed on a page with AllowedFileExtensions set to allow ".doc,.docx,.xls,.xlsx,.zip,.txt,.csv,.pdf" and a MaxFileSize set to 15MB.  I'm using client-side validation and have tested to ensure that invalid file types are being caught prior to form submission.  My problem is that in uploading two, both valid, .xlsx files, one completes successfully and the other ends up in the InvalidFiles collection.  I'm at a loss as to why one would work and the other not.  Is there any way to access how a file fails to pass server-side validation?
Peter Filipov
Telerik team
 answered on 18 Aug 2011
3 answers
181 views
hi

I have a Radgrid and a Radwindow. The radwindows is suppose to popup whenever one click view detail link in the radgrid. Well, it worked, but the funny part was that whenever i click the page in the radgrid, the windows popup itself.  Why is that happening. Thanks and sorry if any inconvenience caused.

Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
        Dim windowManager As New RadWindowManager()
        Dim window1 As New RadWindow()

        If e.CommandName = "Select" Then
            Dim selectedRow As GridDataItem = DirectCast(e.Item, GridDataItem)
            Session("custid") = selectedRow.GetDataKeyValue("custid")
            window1.Width = "800"
            window1.Height = "520"
            window1.VisibleTitlebar = "false"
            window1.VisibleStatusbar = "false"
            window1.NavigateUrl = "~/custinfo.aspx?custid=" & Session("custid").ToString
            window1.ID = "RadWindow1"
            window1.VisibleOnPageLoad = True
            window1.ReloadOnShow = "true"
            ' Set this property to True for showing window from code   
            RadWindowManager1.Windows.Add(window1)
            'Page.Form.Controls.Add(widnow1)
End Sub

L
Top achievements
Rank 1
 answered on 18 Aug 2011
3 answers
175 views
Can you provide a sample how to use Async upload control in Iframe.
Peter Filipov
Telerik team
 answered on 18 Aug 2011
1 answer
145 views
I have three master /detail RadGrids like:

--1
----2
------3

I am trying to ensure two scenarios:

How can I make sure the appropriate rows are selected and the correct child data loaded for when the page loads and the user clicks a row in any grid?

I tried accessing the SelectedItems during Page_PreRender but only succeeded in selecting the first rows on page load, not when the user clicks a row. I tried the solution found on this site to always select a row but the code did not work for me.

Richard

Here is some source:

aspx
        <telerik:RadGrid 
            AllowAutomaticDeletes="true" 
            AllowAutomaticInserts="true" 
            AllowAutomaticUpdates="true" 
            AutoGenerateEditColumn="true" 
            DataSourceID="FirstDataSource" 
            Height="380" 
            ID="FirstGrid" 
            OnDeleteCommand="Grid_OnCommand" 
            OnInsertCommand="Grid_OnCommand" 
            OnItemDeleted="Grid_OnItemDeleted" 
            OnItemInserted="Grid_OnItemInserted" 
            OnItemUpdated="Grid_OnItemUpdated" 
            OnUpdateCommand="Grid_OnCommand" 
            runat="server">
            <MasterTableView 
                DataKeyNames="Id">
                <Columns>
                    <telerik:GridBoundColumn 
                        DataField="Id" 
                        DataType="System.Int32" 
                        HeaderText="System Id" 
                        ReadOnly="True" 
                        UniqueName="FirstId">
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn 
                        ButtonType="LinkButton" 
                        CommandName="Delete" 
                        ConfirmText="Delete this record?\n\nThis action cannot be undone." 
                        Text="Delete" 
                        UniqueName="DeleteFirst">
                    </telerik:GridButtonColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings 
                AllowKeyboardNavigation="true" 
                EnablePostBackOnRowClick="true">
                <Selecting AllowRowSelect="true" />
                <Scrolling 
                    AllowScroll="true" 
                    SaveScrollPosition="true" 
                    UseStaticHeaders="true" />
            </ClientSettings>
        </telerik:RadGrid>
  
        <telerik:RadGrid 
            AllowAutomaticDeletes="true" 
            AllowAutomaticInserts="true" 
            AllowAutomaticUpdates="true" 
            AutoGenerateEditColumn="true" 
            DataSourceID="SecondDataSource" 
            Height="380" 
            ID="SecondGrid" 
            OnDeleteCommand="Grid_OnCommand" 
            OnInsertCommand="Grid_OnCommand" 
            OnItemDeleted="Grid_OnItemDeleted" 
            OnItemInserted="Grid_OnItemInserted" 
            OnItemUpdated="Grid_OnItemUpdated" 
            OnUpdateCommand="Grid_OnCommand" 
            runat="server">
            <MasterTableView 
                DataKeyNames="Id">
                <Columns>
                    <telerik:GridBoundColumn 
                        DataField="Id" 
                        DataType="System.Int32" 
                        HeaderText="System Id" 
                        ReadOnly="True" 
                        UniqueName="SecondId">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn 
                        DataField="FirstId" 
                        DataType="System.Int32" 
                        ForceExtractValue="Always" 
                        ReadOnly="True" 
                        UniqueName="FirstId" 
                        Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn 
                        ButtonType="LinkButton" 
                        CommandName="Delete" 
                        ConfirmText="Delete this record?\n\nThis action cannot be undone." 
                        Text="Delete" 
                        UniqueName="DeleteSecond">
                    </telerik:GridButtonColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings 
                AllowKeyboardNavigation="true" 
                EnablePostBackOnRowClick="true">
                <Selecting AllowRowSelect="true" />
                <Scrolling 
                    AllowScroll="true" 
                    SaveScrollPosition="true" 
                    UseStaticHeaders="true" />
            </ClientSettings>
        </telerik:RadGrid>
  
        <telerik:RadGrid 
            AllowAutomaticDeletes="true" 
            AllowAutomaticInserts="true" 
            AllowAutomaticUpdates="true" 
            AutoGenerateEditColumn="true" 
            DataSourceID="ThirdDataSource" 
            Height="380" 
            ID="ThirdGrid" 
            OnDeleteCommand="Grid_OnCommand" 
            OnInsertCommand="Grid_OnCommand" 
            OnItemDeleted="Grid_OnItemDeleted" 
            OnItemInserted="Grid_OnItemInserted" 
            OnItemUpdated="Grid_OnItemUpdated" 
            OnUpdateCommand="Grid_OnCommand" 
            runat="server">
            <MasterTableView 
                DataKeyNames="Id">
                <Columns>
                    <telerik:GridBoundColumn 
                        DataField="Id" 
                        DataType="System.Int32" 
                        HeaderText="System Id" 
                        ReadOnly="True" 
                        UniqueName="ThirdId">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn 
                        DataField="SecondId" 
                        DataType="System.Int32" 
                        ForceExtractValue="Always" 
                        ReadOnly="True" 
                        UniqueName="SecondId" 
                        Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn 
                        ButtonType="LinkButton" 
                        CommandName="Delete" 
                        ConfirmText="Delete this record?\n\nThis action cannot be undone." 
                        Text="Delete" 
                        UniqueName="DeleteThird">
                    </telerik:GridButtonColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings>
                <Scrolling 
                    AllowScroll="true" 
                    SaveScrollPosition="true" 
                    UseStaticHeaders="true" />
            </ClientSettings>
        </telerik:RadGrid>
  
    </telerik:RadPane>
</telerik:RadSplitter>
  
<asp:EntityDataSource 
    ConnectionString="name=Entities" 
    DefaultContainerName="Entities" 
    EnableDelete="True" 
    EnableFlattening="False" 
    EnableInsert="True" 
    EnableUpdate="True"  
    EntitySetName="Firsts" 
    EntityTypeFilter="First" 
    ID="FirstDataSource" 
    runat="server">
</asp:EntityDataSource>
  
<asp:EntityDataSource 
    ConnectionString="name=Entities" 
    DefaultContainerName="Entities" 
    EnableDelete="True" 
    EnableFlattening="False" 
    EnableInsert="True" 
    EnableUpdate="True"  
    EntitySetName="Seconds" 
    EntityTypeFilter="Second" 
    ID="SecondDataSource" 
    runat="server" 
    Where="it.[FirstId] = @FirstId">
    <WhereParameters>  
        <asp:ControlParameter ControlID="FirstGrid" DefaultValue="0" Name="FirstId" PropertyName="SelectedValue" Type="Int32" />  
    </WhereParameters>  
</asp:EntityDataSource>
  
<asp:EntityDataSource 
    ConnectionString="name=Entities" 
    DefaultContainerName="Entities" 
    EnableDelete="True" 
    EnableFlattening="False" 
    EnableInsert="True" 
    EnableUpdate="True"  
    EntitySetName="Thirds" 
    EntityTypeFilter="Third" 
    ID="ThirdDataSource" 
    runat="server"
    Where="it.[SecondId] = @SecondId">
    <WhereParameters>  
        <asp:ControlParameter ControlID="SecondGrid" DefaultValue="0" Name="SecondId" PropertyName="SelectedValue" Type="Int32" />  
    </WhereParameters
</asp:EntityDataSource>
Mira
Telerik team
 answered on 18 Aug 2011
2 answers
99 views
I saw this article: http://www.telerik.com/help/aspnet-ajax/grid-align-columns-in-hierarchy.html

but can't make it work to align the columns; have you got any code samples with Visa skin?

Thanks,
Pooya
Top achievements
Rank 1
 answered on 18 Aug 2011
7 answers
137 views
Hi all,

I am using RadGrid with NestedViewTemplate is another RadGrid for showing Master - Detail data. As the default, when you click on the icon in the first column to show the detail view.

Could I change this by clicking on another column (I don't want to use the first column and of course its icon).
Thank you,
Phuc PHAM
Phuc
Top achievements
Rank 1
 answered on 18 Aug 2011
1 answer
74 views
Dear Telerik Team,

I would like to maintain parent grid row selected colour after double click parent grid and appears popup window.

Thanks in advance,
Phyu Sin.
Princy
Top achievements
Rank 2
 answered on 18 Aug 2011
7 answers
283 views
hello

i am currently replacing some buttons with the radbutton.
for buttons and linkbuttons i was setting the "onclick" attribute to call a JS-function which opens a popup after checking if it isn't already open which should be avoided when using radbutton.
so i adapted the code to use the radbuttons OnClientClicking property to

"function(sender,args){" + javaScriptCall + "}";

where javaScriptCall calls the JS-function which returns a window:

top.Popup1 = OpenWindowWithCheck(top.Popup1, 'url', 'errormessage','Popup1')

and here is the function:

function OpenWindowWithCheck(Window, PagePath, ErrorMessage, WindowName)
{
    if (Window == null || Window.closed) {
        Window = window.open(PagePath, WindowName);
    }
    else {
        if (confirm(ErrorMessage))
        {
            Window.close();
            Window = window.open(PagePath, WindowName);
        }
        else
        {
            Window.focus();
        }
    }
    return Window;
}

This works well except that i get a popup-blocker message by IE9 now.
How can i avoid this popup-message or is there another way to call my JS-function with radbutton?


Slav
Telerik team
 answered on 18 Aug 2011
6 answers
153 views
Hi all,

I am using a combobox with its items are checkboxes. When a item is checked/unchecked another combobox will be filtered data. So what is the EventName of this Action for declaring UpdatedControls as below

<telerik:AjaxSetting AjaxControlID="cmbCheckBox" EventName="?">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="cmbFiltered" />
                </UpdatedControls>                
            </telerik:AjaxSetting>

Thanks for your support.
Phuc
Top achievements
Rank 1
 answered on 18 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?