Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
68 views
I'm having an issue with using a few telerik comboxes. I have them setup like this:
<telerik:RadComboBox ID="ddlM" runat="server" Skin="Forest" Width="220px" ExpandDelay="10"
    AllowCustomText="true" MarkFirstMatch="true" OnClientSelectedIndexChanged="lookupValue"
    TabIndex="3" />

along with asp required field validators setup like this:
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="ddlM"
    Display="Dynamic" InitialValue="" Type="String" ValidationGroup="g1" ErrorMessage="required."
    Text=" X" />
<asp:RequiredFieldValidator runat="server" ID="CompareValidator2" ControlToValidate="ddlM"
    Display="Dynamic" InitialValue="Select" Type="String" ValidationGroup="g1" ErrorMessage="required."
    Text=" X" />

the problem i am having (and this problem is ONLY happening in IE9, not IE7 or IE8), is that when i enter custom values in the aforementioned combo box(s), the required field validators fire prompting me that input is required. If I choose something from the combox's list, its fine. I thought the validators validated the text property. It would appear that in IE9 this is not the case. Is there any guidance out there on this?
daniel
Top achievements
Rank 1
 answered on 23 Aug 2011
1 answer
276 views
Hi,

Am currently evaluating RAD Controls, and haviong problems with a master/detail grid.

I have two entity data sets. Master=edsExpenseClaim Detail=edsExpenseDetail, the common ID between the two is ExpenseClaimID (a bigint in SQLServer database)

When browsing the grid the master grid is displayed correctly but when I expand to see the detail I get the following error:

Server Error in '/' Application.
--------------------------------------------------------------------------------


WhereParameters cannot be specified unless AutoGenerateWhere==true or Where is specified. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 


Exception Details: System.InvalidOperationException: WhereParameters cannot be specified unless AutoGenerateWhere==true or Where is specified.


Source Error: 


An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  



The page source is:

<%@ Page Title="" Language="C#" MasterPageFile="~/Accounts.Master" AutoEventWireup="true" CodeBehind="myClaims.aspx.cs" Inherits="Accounts.myClaims" %>
<asp:Content ID="Content1" ContentPlaceHolderID="title" runat="server">
    Accounts - My Expense Claims
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" 
        AllowPaging="True" AllowSorting="True" CellSpacing="0" 
        DataSourceID="edsExpenseClaim" GridLines="None">
        <ClientSettings>
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
<MasterTableView AllowAutomaticDeletes="True" AllowAutomaticInserts="True" 
            AllowAutomaticUpdates="True" DataKeyNames="ExpenseClaim_ID" 
            DataSourceID="edsExpenseClaim" AutoGenerateColumns="False">
    <DetailTables>
        <telerik:GridTableView runat="server" DataKeyNames="ExpenseDetail_ID" 
            DataSourceID="edsExpenseDetail" AllowAutomaticDeletes="True" 
            AllowAutomaticInserts="True" AllowAutomaticUpdates="True">
            <ParentTableRelation>
                <telerik:GridRelationFields DetailKeyField="ExpenseClaim_ID" 
                    MasterKeyField="ExpenseClaim_ID" />
            </ParentTableRelation>
            <CommandItemSettings ExportToPdfText="Export to PDF" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </telerik:GridTableView>
    </DetailTables>
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>


<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>


<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" 
        Visible="True">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>


    <Columns>
        <telerik:GridBoundColumn DataField="ExpenseClaim_ID" DataType="System.Int64" 
            FilterControlAltText="Filter ExpenseClaim_ID column" 
            HeaderText="ExpenseClaim_ID" ReadOnly="True" SortExpression="ExpenseClaim_ID" 
            UniqueName="ExpenseClaim_ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Claimant_ID" DataType="System.Int64" 
            FilterControlAltText="Filter Claimant_ID column" HeaderText="Claimant_ID" 
            SortExpression="Claimant_ID" UniqueName="Claimant_ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ClaimCurrency_ID" DataType="System.Int64" 
            FilterControlAltText="Filter ClaimCurrency_ID column" 
            HeaderText="ClaimCurrency_ID" SortExpression="ClaimCurrency_ID" 
            UniqueName="ClaimCurrency_ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ClaimStatus_ID" DataType="System.Int64" 
            FilterControlAltText="Filter ClaimStatus_ID column" HeaderText="ClaimStatus_ID" 
            SortExpression="ClaimStatus_ID" UniqueName="ClaimStatus_ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ClaimDate" DataType="System.DateTime" 
            FilterControlAltText="Filter ClaimDate column" HeaderText="ClaimDate" 
            SortExpression="ClaimDate" UniqueName="ClaimDate">
        </telerik:GridBoundColumn>
    </Columns>


<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>


<FilterMenu EnableImageSprites="False"></FilterMenu>


<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>
    <asp:EntityDataSource ID="edsExpenseClaim" runat="server" 
        ConnectionString="name=AccountsEntities" 
        DefaultContainerName="AccountsEntities" EnableDelete="True" 
        EnableFlattening="False" EnableInsert="True" EnableUpdate="True" 
        EntitySetName="ExpenseClaims">
    </asp:EntityDataSource>
    <asp:EntityDataSource ID="edsExpenseDetail" runat="server" 
        ConnectionString="name=AccountsEntities" 
        DefaultContainerName="AccountsEntities" EnableDelete="True" 
        EnableFlattening="False" EnableInsert="True" EnableUpdate="True" 
        EntitySetName="ExpenseDetails"
        Where="it.ExpenseDetail.ExpenseClaim_ID = @ExpenseClaim_ID">
        <WhereParameters>
            <asp:SessionParameter name="ExpenseClaim_ID" Type="Int64" />
        </WhereParameters>
    </asp:EntityDataSource>
</asp:Content>


Any pointers to a solution would be most appreciated!!!

Cheers,

Charles
Charles
Top achievements
Rank 1
 answered on 23 Aug 2011
1 answer
93 views
I have a RADTEXT box under MasterTableView EditFormTemplate. When i am trying to set any value using GetRegisteredServerElement from Client side its does not appear.

Please suggest me what to do..

Andrey
Telerik team
 answered on 23 Aug 2011
4 answers
142 views
Hi,

i have radgrid with many gridtempletecolumns. It is always in editmode="inline". I can select row by clicking anywhere on this row except its items like radcombobox, radtextbox, checkbox etc. How can i select this row by clicking on this items? It would be best to do it on client side.
Wojciech
Top achievements
Rank 1
 answered on 23 Aug 2011
4 answers
1.4K+ views
I have inherited a project. It has six entries under AjaxSettings (detailed below) The page just doesn't work consistently. Can someone explain the relationship between AjaxSetting and AjaxUpdatedControl (or point to a link that does)?

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnRefreshTree">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadTreeView1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadTreeView1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="DescriptionText" />
                <telerik:AjaxUpdatedControl ControlID="RadTreeView1" />
                <telerik:AjaxUpdatedControl ControlID="RadSlider1" />
                <telerik:AjaxUpdatedControl ControlID="lblTotalAssets" />
                <telerik:AjaxUpdatedControl ControlID="RadDataPager1" />
                <telerik:AjaxUpdatedControl ControlID="RadListView1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnSelectAll">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadListView1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnUnSelectAll">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadListView1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnRefresh">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadSlider1" />
                <telerik:AjaxUpdatedControl ControlID="lblTotalAssets" />
                <telerik:AjaxUpdatedControl ControlID="RadDataPager1" />
                <telerik:AjaxUpdatedControl ControlID="RadListView1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadListView1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadDataPager1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
Tonyz289
Top achievements
Rank 1
 answered on 23 Aug 2011
8 answers
350 views
Hi

I am using Radwindow as a modal popup for inline form editing.  I have created a wizard, using standard 'asp:panels', inside the ContentTemplate of the Radwindow to break up the form in to smaller chunks. In each asp:panel there is a 'next' and 'back' button which is used to navigate between them. These buttons control server side functions to show/hide the various panels during navigation, and perform some form validation etc. in the background.  I need this server side functionality.

I posted a message before to prevent flickering between navigation steps and the solution provided was to use a RadAjaxpanel.  This worked fine until I try to close the Radwindow using a button with server side code.  The server side code is again necessary, as this button saves the content of the form in the Radwindow before closing the Radwindow.

The problem is that when the 'save' button is clicked the Radwindow does not disappear - it will only do this if the RadAjaxpanel is removed from the code - but I need the RadAjaxpanel to prevent the flickering! My sample code is below.  Any ideas?

Thanks in advance.

Kevin

PS This code is in a dynamically loaded usercontrol in a page with a master page - a standard 'asp:ScriptManager' is in this master page.


<asp:Button ID="ButtonAddNew" Text="Open RadWindow" runat="server" CausesValidation="false" OnClick="ButtonAddNew_Click" />
    
   
<telerik:RadWindowManager ID="RadWindowManager01" Modal="true" runat="server">
        <Windows>
   
         </Windows>
</telerik:RadWindowManager>
   
    
   
 <telerik:RadWindow ID="RadWindowImageEdit"
            InitialBehaviors="Pin"
            Skin="Sitefinity"
            Width="920"
            AutoSize="true"
            AutoSizeBehaviors="Height"
            EnableEmbeddedSkins="false"
            EnableEmbeddedBasestylesheet="false"
            Behaviors= "Close"
            VisibleTitlebar="true"
            VisibleStatusbar="false"
            KeepInScreenBounds="true"     
            EnableShadow="false"
            VisibleOnPageLoad = "False"
            Modal="true"
            runat="server">
  
    <ContentTemplate>
  
 <div style="width: 867px; padding: 10px;">
  
    <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server">
       
     
            <asp:Panel ID="panel01" runat="server">
                <!--Form part 1 content here -->
                <asp:Button ID="ButtonNext01" Text="Button1" ValidationGroup="vgText" CausesValidation="True" runat="server"
                    OnClick="OnClick_ButtonNext01" />
            </asp:Panel>
  
            <asp:Panel ID="panel02" runat="server">
                <!--Form part 2 content here -->
                <asp:Button ID="Buttonback02" ValidationGroup="vgText" Text="Button2" CausesValidation="True" runat="server"
                    OnClick="OnClick_Buttonback02" />
 <asp:Button ID="ButtonSave" ValidationGroup="vgText" Text="Save and close window" CausesValidation="True" runat="server"
                    OnClick="Save_form_content" />
            </asp:Panel>
  
      
          
        </telerik:RadAjaxPanel>
  </div>
    </ContentTemplate>
</telerik:RadWindow>
 
 
 
 
Code behind for Save and open window button:
 
 
 
 Protected Sub ButtonAddNew_Click(sender As Object, e As EventArgs)
 
            'open window
            RadWindowImageEdit.VisibleOnPageLoad = True
 
 End Sub
 
 
 
 Protected Sub Save_form_content(sender As Object, e As EventArgs)
 
            'code to insert form items in database
 
            'close window
            RadWindowImageEdit.VisibleOnPageLoad = False
 
 End Sub
Kevin
Top achievements
Rank 1
 answered on 23 Aug 2011
8 answers
158 views
Hello, I'm having the common "postback eats a buttonclick event" problem as discussed here and here.
I have a RadButton:
<rad:RadButton ID="btnApplyFilters" runat="server"
Text="Apply Filters" UseSubmitBehavior="false" />

Conflicting with a RadComboBox:
<rad:RadComboBox runat="server"
 ID="rcbSearchLastName"
 EnableLoadOnDemand="true"
 OnItemsRequested="rcbSearchLastName_ItemsRequested"
 AutoPostBack="true"
 ShowWhileLoading="false"
 ShowToggleImage="false" />


When I type in the textbox I am getting suggest style choices in the dropdown. If I select from the dropdown choices the rcbSearchLastName.SelectedIndexChanged event fires in the code behind. While I am typing the rcbSearchLastName_ItemsRequested event is fired.

If I type in the TextBox portion of the RadCombBox, then click a RadButton, the button click event is not fired.

Is it possible to use the components differently so that this conflict doesn't occur? Or is there a way to queue the events with the AjaxManager?

Thanks,
Dan
Dan Lehmann
Top achievements
Rank 1
 answered on 23 Aug 2011
1 answer
118 views
Dear Support Team,

I'm facing a problem with ComboBox control in a scenarion using LoadOnDemand.

When registering an Navigate Event in the ScriptManager on the page :

<asp:ScriptManagerProxy ID="proxyScriptManager" OnNavigate="proxyScriptManager_Navigated" runat="server">
</asp:ScriptManagerProxy>

The ComboBox's Event "OnItemRequested" is not firing (or maybe firing and handled in the proxyScriptManager_Navigated
event handler).

When removing the event handler :

<asp:ScriptManagerProxy ID="proxyScriptManager"  runat="server">
</asp:ScriptManagerProxy>

The "OnItemRequested" returns to work just fine.

Any ideas how to solve this issue ?

Regards,

Itamar
Dimitar Terziev
Telerik team
 answered on 23 Aug 2011
1 answer
338 views

Hi

I use this code for submit my form to our bank gateway:

<%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">

    protected void submit(object sender, EventArgs e)

    {

        ClientScript.RegisterStartupScript(typeof(Page),

            "ClientScript",

            "<script language='javascript' type='text/javascript'> postRefId();</"+"script> ",

            false);

    }

</script>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title>test</title>

    <script language="javascript" type="text/javascript">

        function postRefId() {

            var form = document.createElement("form");

            form.setAttribute("method", "POST");

            form.setAttribute("action", "http://bmi.ir");

            form.setAttribute("target", "_self");

            document.body.appendChild(form);

            form.submit();

            document.body.removeChild(form);

        }

    </script>

</head>

<body>

    <form id="form1" runat="server">

        <div>

             <asp:Button ID="Button1" runat="server"

             Text="Button"

             OnClick="submit" />

        </div>

    </form>

</body>

</html>

But when I use RadAjaxPanel like this, I can’t submit my form:

<%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">

    protected void submit(object sender, EventArgs e)

    {

        ClientScript.RegisterStartupScript(typeof(Page),

            "ClientScript",

            "<script language='javascript' type='text/javascript'> postRefId();</"+"script> ",

            false);

    }

</script>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title>test</title>

    <script language="javascript" type="text/javascript">

        function postRefId() {

            var form = document.createElement("form");

            form.setAttribute("method", "POST");

            form.setAttribute("action", "http://bmi.ir");

            form.setAttribute("target", "_self");

            document.body.appendChild(form);

            form.submit();

            document.body.removeChild(form);

        }

    </script>

</head>

<body>

    <form id="form1" runat="server">

        <div>

            <tlk:RadScriptManager ID="RadScriptManager1" runat="server" />

            <tlk:RadAjaxPanel ID="RadAjaxPanel1" runat="server">

                    <asp:Button ID="Button1" runat="server"

                    Text="Button"

                    OnClick="submit" />

            </tlk:RadAjaxPanel>

        </div>

    </form>

</body>

</html>

How can I fix it?

Maria Ilieva
Telerik team
 answered on 23 Aug 2011
3 answers
176 views
I have an asp repeater within a rad ajax panel. I get the loading image, but I do not get the text to output test. Here is my code.

<telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
    <asp:Label ID="output" runat="server"></asp:Label>
    <br />
    <asp:Repeater ID="headRepeat" runat="server">
        <ItemTemplate>
            <div class="headerImageRepeat">
                <table cellpadding="0" cellspacing="0" style="height: 70px;">
                    <tr>
                        <td style="padding-left: 10px; padding-top: 10px; padding-right: 10px;" valign="top">
                            <asp:Image ID="headerImage" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "headerImageUrl") %>' />
                        </td>
                        <td style="padding-bottom: 5px;" valign="bottom">               
                            <asp:Label ID="headerLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "headerOutput") %>'></asp:Label>
                            <asp:Button ID="updateHours" runat="server" Text="Save" CommandName="updateHours" />
                        </td>
                    </tr>
                </table>
            </div>
        </ItemTemplate>
    </asp:Repeater>
</telerik:RadAjaxPanel>


Private Sub headRepeat_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles headRepeat.ItemCommand
 
    '<asp:ImageButton ID="updateHours" runat="server" ImageUrl="../images/save.png" CommandName="updateHours" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>' />
 
    output.Text = "test"
 
    'if they clicked the save in the repeater
    If (e.CommandName.ToString = "updateHours") Then
 
        Response.Write("test")
 
    End If 'if e.commandname
End Sub
Maria Ilieva
Telerik team
 answered on 23 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?