Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
103 views
I have a client side Radwindow and when the maximize button is clicked, it appears to be in disabled mode. The only way to proceed is if I kill the  browser window. This does not happen with all other client side RadWindows. Please provide any suggestions to fix this.
Venkat
Top achievements
Rank 1
 answered on 04 Aug 2012
2 answers
136 views

hi friends,

i have a radgrid in my page that some script have set for OnGridDestroying event. my script get all controls and their value in page and sent them with Ajax to server side with a httprequest object . consider a button on page too that cause a postback, but i want to process my request object before any post back in page . i tryed window.onbeforeunload , it works fine till i use radajaxpanel or a update panel on page... is there any javascript event that fire before any post back that i can set for my radGrid or its parent that is a div element?

thanks

Reza
Top achievements
Rank 1
 answered on 04 Aug 2012
6 answers
366 views
hi Everyone,

i am having a FORMTEMPLATE inside which i have taken some text boxes which are bound to data corresponding to their colums.
Along with these textboxes are, INSERT AND UPDATE buttons.

Now my issue is that when i click on either of the two buttons, i need to perform client side (java script) validations like checking that mandatory fields should not be empty.
My Questions :-
 1.) Where to register the client side function call.
        For example :- if i have to call abc() then where should i write
                BtnUpdate.Attributes.Add("OnClick","abc()")
 2.) And secondly how to pass the ID's of the text boxes that i have taken inside the form template since these gets renderedto a different client id's.
Is there some client side method exposed by APi through which i could extract these fields.
I am attaching the code snipet


<

telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" GridLines="None"

PageSize="6" AutoGenerateColumns="False" Skin="Default2006">

<ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">

<Selecting AllowRowSelect="True" />

</ClientSettings>

<MasterTableView CommandItemDisplay="Top" ClientDataKeyNames="CURR_SYS_ID" DataKeyNames="CURR_SYS_ID,curr_Appr,curr_mdel" EditMode="PopUp" >

<EditFormSettings>

<PopUpSettings ScrollBars="None" />

</EditFormSettings>

<ExpandCollapseColumn

Resizable="False" Visible="False">

<HeaderStyle Width="20px" />

</ExpandCollapseColumn>

<RowIndicatorColumn

Visible="False">

<HeaderStyle Width="20px" />

</RowIndicatorColumn>

<CommandItemTemplate>

<div style="padding:10px 0px;">

<asp:LinkButton runat="server"

ID="lnkEdit" CommandName="EditSelected">

<img style="border:0px;vertical-align:middle;" alt="" src="Images/icon_edit.gif" />

Edit Selected Record

</asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:LinkButton runat="server" ID="lnkReject"

Text="Reject" CommandName="Reject">

<img style="border:0px;vertical-align:middle;" alt="" src="Images/icon_delete.gif" />

Reject Selected Record

</asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:LinkButton runat="server" ID="LinkApprove" Text="Approve" CommandName="Approve">

<img style="border:0px;vertical-align:middle;" alt="" src="Images/icon_delete.gif" />

Approve Record

</asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:LinkButton runat="server" ID="lnkInsert" CssClass="MyImageButton" Text="UpdateEdited" CommandName="InitInsert">

<img style="border:0px;vertical-align:middle;" alt="" src="Images/icon_add.gif" />Insert New Record

</asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:LinkButton ID="LinkButton2" runat="server" CommandName="DeleteRecord" >

<img style="border:0px;vertical-align:middle;" alt="" src="Images/icon_add.gif" /> Delete this Record

</asp:LinkButton>

</CommandItemTemplate>

<Columns>

<telerik:GridBoundColumn DataField="curr_code" HeaderText="Currency Code" MaxLength="3" UniqueName="Currency Code"></telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="curr_name" HeaderText="Currency Name" MaxLength="25" UniqueName="Currency Name"></telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="curr_sign" HeaderText="Currency Sign" MaxLength="5" UniqueName="Currency Sign"></telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="curr_desc" HeaderText="Currency Description" MaxLength="240" UniqueName="Currency Description"></telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="curr_decimal" HeaderText="Decimal Spaces" MaxLength="1" UniqueName="Currency Decimal"></telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Curr_Sys_Id" ForceExtractValue="Always" HeaderText="Currency Sys Id" ReadOnly="True" UniqueName="curr_sys_id" Visible="False"></telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="curr_Appr" ForceExtractValue="Always" HeaderText="Approval Flag" MaxLength="2" ReadOnly="True" UniqueName="curr_Appr" Visible="False"></telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="curr_mdel" ForceExtractValue="Always" HeaderText="Deletion Flag" ReadOnly="True" UniqueName="curr_mdel" Visible="False"></telerik:GridBoundColumn>

</Columns>

<EditFormSettings EditFormType="Template">

<PopUpSettings Width="60%" />

<FormTemplate>

<table id="Table1" class="TableWidth" cellspacing="1" cellpadding="1" width="250" border="0">

<tr>

<td colspan="4" >

</td>

</tr>

<tr class="DataRowColor">

<td> Currency Code </td>

<td><asp:TextBox ID="txtCurrCode" OnBlur="return validateCurrencyCode();" Text='<%# DataBinder.Eval( Container, "DataItem.CURR_CODE") %>' runat="server">

</asp:TextBox></td>

<td>Currency Name </td>

<td>

<asp:TextBox ID="txtCurrName" Text='<%# DataBinder.Eval( Container, "DataItem.CURR_NAME") %>' runat="server">

</asp:TextBox></td>

</tr>

<tr class="DataAlternateRowColor">

<td>Currency Sign</td>

<td>

<asp:TextBox ID="txtCurrSign" OnBlur="return checkMandatory('Currency Sign cannot be blank');" Text='<%# DataBinder.Eval( Container, "DataItem.CURR_SIGN") %>' runat="server">

</asp:TextBox></td>

<td>Currency Description</td>

<td>

<asp:TextBox ID="txtCurrDesc" TextMode="SingleLine" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.CURR_DESC") %>'>

</asp:TextBox></td>

</tr>

<tr>

<td>Decimal Places</td>

<td><asp:TextBox ID="txtCurrDecimal" OnBlur="return checkMandatory('Currency Sign cannot be blank');" OnKeyUp="return validateRange();" TextMode="SingleLine" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.CURR_DECIMAL") %>'>

</asp:TextBox></td>

<td colspan="2"></td>

</tr>

<tr>

<td align="right" colspan="2">

<asp:button id="btnUpdate" text="Update" runat="server" commandName="Update" Visible='<%# Not RadGrid1.MasterTableView.IsItemInserted %>' ></asp:button>

<asp:button id="btnInsert" text="Insert" runat="server" CommandName="PerformInsert" Visible='<%# RadGrid1.MasterTableView.IsItemInserted %>' ></asp:button>

&nbsp;

<asp:button id="btnCancel" text="Cancel" runat="server" causesvalidation="False" commandname="Cancel"></asp:button></td>

</td>

</tr>

</table>

</FormTemplate>

</EditFormSettings>

</MasterTableView>

</telerik:RadGrid>


Chad Johnson
Top achievements
Rank 1
 answered on 03 Aug 2012
2 answers
79 views
  • I am using MS Visual Studio 2010 in a 3.5 environment.
  • I am using Microsoft Vista (32 bit)
  • The database is currently located on an SQL 2005 server.
  • I am using RadGrid & tools, version 2012.1.411.35
  • I am using both Chrome (18.0.1025.168) and Internet Explorer (8.0.7600.16385)
  • I am programming in VB.net

I have a radGrid with a nested details view.  I can edit the top and details hierarchy and I don't need to insert into the top level.  When I try to insert into the details level, it just doesn't do anything.  The screen blinks (reloads) and the record is not inserted.  The edit form stays open and still holds the values.

So I used the ItemCommand event and issue a data source insert command, but I'm not happy with that either.  The subitem is closed after inserting, plus it does not grab the parameter values.  If I hard code the values into the Insert Parameter it will work, but it will not pull the values from the InsertParameters.

I hope that makes sense.  To recap:

  • Edits work
  • Insert reloads page, fails to save.
  • Tried workaround using ItemCommand; Parameters are ignored-- blank record added.
  • Hard coding values in ItemCommand and issuing Insert on datasource works.



<body>
    <form id="form1" runat="server">
    <div>
        <asp:Label ID="Label1" runat="server" Text="Don Beaty's Foreign Currency Tracker" Font-Bold="False" Font-Names="Calibri" Font-Size="XX-Large"></asp:Label>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0"
            Width="1080px"
            DataSourceID="SqlDataSource1"
            GridLines="None"
            AllowAutomaticInserts="True"
            AllowAutomaticUpdates="True"
            AllowAutomaticDeletes="True"
            BorderColor="Gray"
            BorderStyle="Inset" Skin="Office2010Silver" >
             
            <MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
                commanditemdisplay="None"
                allowpaging="True" 
                EditMode="InPlace"
                PageSize="30"
                Name="Currency"
                showgroupfooter="True" BorderColor="#E0E0E0" BorderStyle="Solid"
                BorderWidth="1px" GridLines="Vertical" DataKeyNames="Currency_CountryCode">
 
                <DetailTables>
                    <telerik:GridTableView runat="server"  DataKeyNames="Currency_ID"
                        EditMode="InPlace" CommandItemDisplay="Bottom" Width="100%"
                        DataSourceID="SqlDataSource2" AutoGenerateColumns="False"
                        ShowGroupFooter="True" AllowAutomaticUpdates="False">
                         
                        <ParentTableRelation>
                            <telerik:GridRelationFields DetailKeyField="Currency_CountryCode" MasterKeyField="Currency_CountryCode" />
                        </ParentTableRelation>
 
                        <CommandItemSettings ExportToPdfText="Export to PDF" />
                        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
                        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
 
                        <Columns>
                            <telerik:GridTemplateColumn
                                FilterControlAltText="Filter EditCommandColumn column"
                                Groupable="False"
                                UniqueName="EditCommandColumn">
 
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbuEdit" runat="server" CausesValidation="false" CommandName="Edit" Text="Edit"></asp:LinkButton>
                                </ItemTemplate>
 
                                <EditItemTemplate>
                                    <asp:LinkButton ID="lbuUpdate" runat="server" CommandName="Update" Text="Update"></asp:LinkButton
                                    <asp:LinkButton ID="lbuCancelUpdate" runat="server" CausesValidation="false" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
                                </EditItemTemplate>
 
                                <InsertItemTemplate>
                                    <asp:LinkButton ID="lbuSaveInsert" runat="server" CommandName="Insert" Text="Save"></asp:LinkButton>
                                    <asp:LinkButton ID="lbuCancelInsert" runat="server" CausesValidation="false" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
                                </InsertItemTemplate>
 
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn DataField="CurrencyTarget_ForeignDenomination"
                                DataType="System.Int32"
                                FilterControlAltText="Filter CurrencyTarget_ForeignDenomination column"
                                HeaderText="Foreign<br/>Currency<br/>Denomination"
                                SortExpression="CurrencyTarget_ForeignDenomination"
                                UniqueName="CurrencyTarget_ForeignDenomination">
                                <InsertItemTemplate>
                                    <asp:TextBox ID="CurrencyTarget_ForeignDenomination" runat="server"
                                        Text='<%# Bind("CurrencyTarget_ForeignDenomination") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="CurrencyTarget_ForeignDenominationLabel" runat="server"
                                        Text='<%# Eval("CurrencyTarget_ForeignDenomination") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:Label ID="CurrencyTarget_ForeignDenominationLabel2" runat="server"
                                        Text='<%# Eval("CurrencyTarget_ForeignDenomination") %>'></asp:Label>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="USDEquivalent"
                                HeaderText="US<br/>Dollar<br/>Equivalent" SortExpression="USDEquivalent" UniqueName="USDEquivalent" FilterControlAltText="Filter USDEquivalent column"
                                DataType="System.Decimal" DataFormatString="${0:#}"
                                ReadOnly="True" >
                                <ItemStyle HorizontalAlign="Right" BorderColor="Black"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn
                                DataField="CurrencyTarget_FCNeeded"
                                HeaderText="Quantity<br/>Needed For<br/>1 '500' Envelope" SortExpression="CurrencyTarget_FCNeeded" UniqueName="CurrencyTarget_FCNeeded" FilterControlAltText="Filter CurrencyTarget_FCNeeded column"
                                DataType="System.Int32" DataFormatString="{0:#}" Aggregate="Sum">
                                <ItemStyle HorizontalAlign="Center" BackColor="#CCFFCC" BorderColor="Green" CssClass="maximize"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="TotalForeignCurrency"
                                HeaderText="Total<br/>Foreign<br/>Currency" SortExpression="TotalForeignCurrency" UniqueName="TotalForeignCurrency" FilterControlAltText="Filter TotalForeignCurrency column"
                                DataType="System.Int32" DataFormatString="{0:#}"
                                ReadOnly="True" >
                                <ItemStyle HorizontalAlign="Right" BackColor="#CCFFCC" BorderColor="Green"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="USDValue"
                                HeaderText="US<br/>Dollar<br/>Value" SortExpression="USDValue" UniqueName="USDValue" FilterControlAltText="Filter USDValue column"
                                DataType="System.Decimal" DataFormatString="${0:###,##0.00}" Aggregate="Sum"
                                ReadOnly="True" >
                                <ItemStyle HorizontalAlign="Right" BackColor="#CCFFCC" BorderColor="Green"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="TotalFor500Envelopes"
                                HeaderText="Total<br/>For '500'<br/>Envelopes" SortExpression="TotalFor500Envelopes" UniqueName="TotalFor500Envelopes" FilterControlAltText="Filter TotalFor500Envelopes column"
                                DataType="System.Int32" DataFormatString="{0:#}" Aggregate="Sum"
                                ReadOnly="True" >
                                <ItemStyle HorizontalAlign="Center" BackColor="#CCFFCC" BorderColor="Green"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CurrencyTarget_FCNeeded_100"
                                HeaderText="Quantity<br/>Needed For<br/>1 '100' Envelope" SortExpression="CurrencyTarget_FCNeeded_100" UniqueName="CurrencyTarget_FCNeeded_100" FilterControlAltText="Filter CurrencyTarget_FCNeeded_100 column"
                                DataType="System.Int32" DataFormatString="{0:#}" Aggregate="Sum">
                                <ItemStyle HorizontalAlign="Center" BackColor="#CCCCFF" BorderColor="#6666FF" CssClass="maximize"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="USDValue_100"
                                HeaderText="US<br/>Dollar<br/>Value" SortExpression="USDValue_100" UniqueName="USDValue_100" FilterControlAltText="Filter USDValue_100 column"
                                DataType="System.Decimal" DataFormatString="${0:###,##0.00}" Aggregate="Sum"
                                ReadOnly="True">
                                <ItemStyle HorizontalAlign="Center" BackColor="#CCCCFF" BorderColor="#6666FF"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="TotalFor100Envelopes"
                                HeaderText="Total<br/>For '100'<br/>Envelopes" SortExpression="TotalFor100Envelopes" UniqueName="TotalFor100Envelopes" FilterControlAltText="Filter TotalFor100Envelopes column"
                                DataType="System.Int32" DataFormatString="{0:#}" Aggregate="Sum"
                                ReadOnly="True" >
                                <ItemStyle HorizontalAlign="Center" BackColor="#CCCCFF" BorderColor="#6666FF"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="TotalForAllEnvelopes"
                                HeaderText="Total<br/>All<br/>Envelopes" SortExpression="TotalForAllEnvelopes" UniqueName="TotalForAllEnvelopes" FilterControlAltText="Filter TotalForAllEnvelopes column"
                                DataType="System.Int32" DataFormatString="{0:#}" Aggregate="Sum"
                                ReadOnly="True" >
                                <ItemStyle HorizontalAlign="Center" BackColor="#FFCCCC" BorderColor="#FF6666"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CurrencyTarget_NativeCurrent"
                                HeaderText="Total<br/>On<br/>Hand" SortExpression="CurrencyTarget_NativeCurrent" UniqueName="CurrencyTarget_NativeCurrent" FilterControlAltText="Filter CurrencyTarget_NativeCurrent column"
                                DataType="System.Int32" DataFormatString="{0:#}" Aggregate="Sum">
                                <ItemStyle HorizontalAlign="Center" BackColor="#FFCCCC" BorderColor="#FF6666" CssClass="maximize"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ExcessCurrency"
                                HeaderText="Excess" SortExpression="ExcessCurrency" UniqueName="ExcessCurrency" FilterControlAltText="Filter ExcessCurrency column"
                                DataType="System.Int32" DataFormatString="{0:#}" Aggregate="Sum"
                                ReadOnly="True" >
                                <HeaderStyle VerticalAlign="Bottom"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center" BackColor="#FFCCCC" BorderColor="#FF6666"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="OrderQuantity"
                                HeaderText="Quantity<br/>To<br/>Order" SortExpression="OrderQuantity" UniqueName="OrderQuantity" FilterControlAltText="Filter OrderQuantity column"
                                DataType="System.Int32" DataFormatString="{0:#}" Aggregate="Sum"
                                ReadOnly="True" >
                                <ItemStyle HorizontalAlign="Center" BackColor="#FFCCCC" BorderColor="#FF6666" ForeColor="Crimson" Font-Bold="true"></ItemStyle>
                            </telerik:GridBoundColumn>
                        </Columns>
 
                        <GroupByExpressions>
                            <telerik:GridGroupByExpression>
                                <SelectFields>
                                    <telerik:GridGroupByField FieldAlias="CountryCode"  FieldName="Currency_CountryCode" HeaderText="Country Code"  />
                                </SelectFields>
                                <GroupByFields>
                                    <telerik:GridGroupByField FieldAlias="Currency_CountryCode"  FieldName="Currency_CountryCode" />
                                </GroupByFields>
                         
                            </telerik:GridGroupByExpression>
                        </GroupByExpressions>
                         <FooterStyle Font-Bold="true" />
                        <EditFormSettings>
                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                            </EditColumn>
                        </EditFormSettings>
                    </telerik:GridTableView>
                </DetailTables>
 
                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
 
                <Columns>
                            <telerik:GridTemplateColumn
                                FilterControlAltText="Filter EditCommandColumn column"
                                Groupable="False"
                                UniqueName="EditCommandColumn">
 
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbuEditP" runat="server" CausesValidation="false" CommandName="Edit" Text="Edit"></asp:LinkButton>
                                </ItemTemplate>
 
                                <EditItemTemplate>
                                    <asp:LinkButton ID="lbuUpdateP" runat="server" CommandName="Update" Text="Update"></asp:LinkButton
                                    <asp:LinkButton ID="lbuCancelUpdateP" runat="server" CausesValidation="false" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
                                </EditItemTemplate>
 
                                <InsertItemTemplate>
                                    <asp:LinkButton ID="lbuSaveInsertP" runat="server" CommandName="Insert" Text="Save"></asp:LinkButton>
                                    <asp:LinkButton ID="lbuCancelInsertP" runat="server" CausesValidation="false" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
                                </InsertItemTemplate>
 
                            </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="Currency_CountryDesc"
                        FilterControlAltText="Filter Currency_CountryDesc column"
                        HeaderText="Currency" SortExpression="Currency_CountryDesc"
                        UniqueName="Currency_CountryDesc"
                        ReadOnly="True">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ExchangeRate"
                        DataType="System.Decimal"
                        FilterControlAltText="Filter Currency_Conversion column"
                        HeaderText="Exchange Rate" SortExpression="ExchangeRate"
                        ItemStyle-HorizontalAlign="Right"  HeaderStyle-HorizontalAlign="Center"
                        UniqueName="ExchangeRate"
                        ReadOnly="True">
                        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                        <ItemStyle HorizontalAlign="Right"></ItemStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Currency_EnvelopeCount500"
                        DataType="System.Int16"
                        FilterControlAltText="Filter Currency_EnvelopeCount500 column"
                        HeaderText="500 Env. Count"
                        SortExpression="Currency_EnvelopeCount500"
                        UniqueName="Currency_EnvelopeCount500">
                        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                        <ItemStyle HorizontalAlign="Center" CssClass="maximize"></ItemStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Currency_EnvelopeCount100"
                        DataType="System.Int16"
                        FilterControlAltText="Filter Currency_EnvelopeCount100 column"
                        HeaderText="100 Env. Count"
                        SortExpression="Currency_EnvelopeCount100"
                        UniqueName="Currency_EnvelopeCount100">
                        <HeaderStyle HorizontalAlign="Center" CssClass="maximize"></HeaderStyle>
                        <ItemStyle HorizontalAlign="Center" CssClass="maximize"></ItemStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridCheckBoxColumn DataField="Currency_BriefcaseUsed"
                        DataType="System.Boolean"
                        FilterControlAltText="Filter Currency_BriefcaseUsed column"
                        HeaderText="Flag Briefcase" SortExpression="Currency_BriefcaseUsed"
                        UniqueName="Currency_BriefcaseUsed">
                        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    </telerik:GridCheckBoxColumn>
                    <telerik:GridCheckBoxColumn DataField="Currency_HomeOfficeUsed"
                        DataType="System.Boolean"
                        FilterControlAltText="Filter Currency_HomeOfficeUsed column"
                        HeaderText="Flag Home" SortExpression="Currency_HomeOfficeUsed"
                        UniqueName="Currency_HomeOfficeUsed">
                        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    </telerik:GridCheckBoxColumn>
                    <telerik:GridCheckBoxColumn DataField="Currency_OneHundUsed"
                        DataType="System.Boolean"
                        FilterControlAltText="Filter Currency_OneHundUsed column"
                        HeaderText="Flag 100" SortExpression="Currency_OneHundUsed"
                        UniqueName="Currency_OneHundUsed">
                        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                        <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    </telerik:GridCheckBoxColumn>
                </Columns>
 
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
                </EditFormSettings>
                <PagerStyle AlwaysVisible="True"  />
                <HeaderStyle Font-Bold="True" />
            </MasterTableView>
 
            <FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>
     
    </div>
 
 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:DonPlannerCS %>"
        SelectCommand="SELECT Currency_CountryCode, Currency_CountryDesc, Currency_EnvelopeCount500, Currency_EnvelopeCount100, 1 / Currency_Conversion AS ExchangeRate, Currency_LastUpdated, Currency_BriefcaseUsed, Currency_HomeOfficeUsed, Currency_OneHundUsed, CASE LEN(CurrencyTarget_CountryCode) WHEN 3 THEN 0 ELSE 1 END AS Existing, CurrencyTarget_CountryCode
                        FROM Currency_LatestConversions_TBL LEFT OUTER JOIN Currency_CurrentlyTracked ON Currency_LatestConversions_TBL.Currency_CountryCode = Currency_CurrentlyTracked.CurrencyTarget_CountryCode
                        ORDER BY Existing, Currency_LatestConversions_TBL.Currency_CountryDesc"
        UpdateCommand="UPDATE [Currency_LatestConversions_TBL]
                        SET [Currency_EnvelopeCount500] = @Currency_EnvelopeCount500, [Currency_EnvelopeCount100] = @Currency_EnvelopeCount100, [Currency_BriefcaseUsed] = @Currency_BriefcaseUsed, [Currency_HomeOfficeUsed] = @Currency_HomeOfficeUsed, [Currency_OneHundUsed] = @Currency_OneHundUsed
                        WHERE [Currency_CountryCode]=@Currency_CountryCode">
 
        <UpdateParameters>
            <asp:Parameter Name="Currency_CountryCode" />
        </UpdateParameters>
 
    </asp:SqlDataSource>
 
 
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
        ConnectionString="<%$ ConnectionStrings:DonPlannerCS %>"
        SelectCommand="SELECT Currency_ID, Currency_CountryCode, Currency_CountryDesc, CurrencyTarget_ForeignDenomination, USDEquivalent, CurrencyTarget_FCNeeded, TotalForeignCurrency, ExchangeRate, USDValue, TotalFor500Envelopes, CurrencyTarget_FCNeeded_100, TotalFor100Envelopes, USDValue_100, TotalForAllEnvelopes, CurrencyTarget_NativeCurrent, CASE sign(QtyToOrder) WHEN - 1 THEN 0 ELSE QtyToOrder END AS OrderQuantity, CASE sign(Excess) WHEN - 1 THEN 0 ELSE Excess END AS ExcessCurrency
                        FROM Currency_Grid WHERE([Currency_CountryCode]=@Currency_CountryCode)
                        ORDER BY CurrencyTarget_ForeignDenomination"
        UpdateCommand="UPDATE [Currency_TargetAmounts_TBL]
                        SET [CurrencyTarget_FCNeeded] = @CurrencyTarget_FCNeeded, [CurrencyTarget_FCNeeded_100] = @CurrencyTarget_FCNeeded_100, [CurrencyTarget_NativeCurrent] = @CurrencyTarget_NativeCurrent
                        WHERE [Currency_ID] = @Currency_ID"
         
        InsertCommand="INSERT INTO Currency_TargetAmounts_TBL(Currency_Location, CurrencyTarget_CountryCode, CurrencyTarget_ForeignDenomination, CurrencyTarget_FCNeeded, CurrencyTarget_FCNeeded_100, CurrencyTarget_NativeCurrent) SELECT 'AccounTEST' AS Expr1, 'CAD' AS Expr2, @CurrencyTarget_ForeignDenomination AS Expr3, @CurrencyTarget_FCNeeded AS Expr4, @CurrencyTarget_FCNeeded_100 AS Expr5, @CurrencyTarget_NativeCurrent AS Expr6" >
        <SelectParameters>
            <asp:SessionParameter DefaultValue="XXX" Name="Currency_CountryCode" SessionField="@Currency_CountryCode" Type="String" />
        </SelectParameters>
 
        <UpdateParameters>
            <asp:Parameter Name="CurrencyTarget_FCNeeded" />
            <asp:Parameter Name="CurrencyTarget_FCNeeded_100" />
            <asp:Parameter Name="CurrencyTarget_NativeCurrent" />
            <asp:Parameter Name="Currency_ID" />
        </UpdateParameters>
 
        <InsertParameters>
            <asp:Parameter Type="Int32" Name="CurrencyTarget_ForeignDenomination" DefaultValue="0" />
            <asp:Parameter Type="Int32" Name="CurrencyTarget_FCNeeded"  DefaultValue="0" />
            <asp:Parameter Type="Int32" Name="CurrencyTarget_FCNeeded_100" DefaultValue="0" />
            <asp:Parameter Type="Int32" Name="CurrencyTarget_NativeCurrent" DefaultValue="0" />
        </InsertParameters>
 
    </asp:SqlDataSource>
 
    </form>
</body>


Rick
Top achievements
Rank 1
 answered on 03 Aug 2012
1 answer
116 views
hi guys 

My be i am missing something , is there a Telerik Wizard Control on the asp.net ajax side ?  Similar to the one we use in SL.

thanks 
reguapo
Top achievements
Rank 1
 answered on 03 Aug 2012
1 answer
77 views
Hi,

How can I customize text for my combobox with EnableCheckAllItemsCheckBox ="true". I want to display No Selection when user unchecks check All checkbox.

Thanks in advance,
RJ 
RJ
Top achievements
Rank 1
 answered on 03 Aug 2012
6 answers
413 views
I have a radgrid and in the edit template form I have a table which contains textboxes,dropdowns, raddatepickers
Textboxes are binding data fine, but the raddate pickers , dropdowns are not binding data properly,
Can you look at the below code and let me know what am I doing wrong?
DBselectedDate is not binding date at all

<td align="left">
<telerik:RadDatePicker ID="txtEditEndDate" runat="server" DbSelectedDate='<%# Bind("EndDate") %>'>
<Calendar ID="Calendar4" runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x">
<SpecialDays>
<telerik:RadCalendarDay Repeatable="Today">
<ItemStyle BackColor="Pink" />
</telerik:RadCalendarDay>
</SpecialDays>
</Calendar>
</telerik:RadDatePicker>

Also here is my dropdownlist code
<asp:DropDownList ID="ddlEditMember" runat="server" CssClass="genericControl"  SelectedValue='<%# Bind("Member") %>'  />

If I add selectedvalue to the dropdownlist and click on edit button on the rad grid the edit form is not even showing up. when I delete selectedValue then only I can see the edit form and the text boxes with proper data.

What Am I doing wrong? (All the data for the dropdowns and raddatepickers are binding from database)


Sima
Top achievements
Rank 1
 answered on 03 Aug 2012
2 answers
112 views
Radformdecorator seems does not work well in my newly updated Chrome 21.0.1180.60 m. My Telerik.Web.UI version is 2012.2.703.40

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="Demo.test" %>
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <telerik:RadScriptManager runat="Server" ID="RadScriptManager1" />
    <telerik:radformdecorator id="FormDecorator1" runat="server" DecoratedControls="all" Skin="Web20"></telerik:radformdecorator>
 
 
    <input type="button" value="Cancel"/>
    <br />
        <asp:DropDownList ID="DropDownList2" runat="server" style="width:250px">
                                                    <asp:ListItem>AAA</asp:ListItem>
                                                    <asp:ListItem>BBB</asp:ListItem>
                                                    <asp:ListItem>CCCC</asp:ListItem>
                                                    <asp:ListItem>DDDD</asp:ListItem>
                                                    <asp:ListItem>EEEE</asp:ListItem>
                                                    </asp:DropDownList>
     
    </div>
    </form>
</body>
</html>
envy kok
Top achievements
Rank 1
 answered on 03 Aug 2012
2 answers
159 views
Hello,
I've a strange beahaviour with the RadGrid when I set UseStaticHeaders to True. I set this parameter to True because I want that the header remain fix when I scroll the rows with the vertical scrollbar..
I need to resize the columns too, so when I resize a column the horizontal scroll bar can be shown. When I scroll the Grid with the horizonal scrollbar I have a strange issue only with Chrome Browser. Internet Explorer and Firefox works fine.

As you can see in the attachments, in Chrome the header remain fix and when I scroll horizonally the content of the grid, the header doesn't scroll. In Firefox and Internet Explorer all works fine.

How can I fix the problem? I've try to see if I can override some CSS class, but I think that the header scrolling is made by javascript when UseStaticHeaders  is set to true. Is it correct?

Thanks for the help!
Pavlina
Telerik team
 answered on 03 Aug 2012
0 answers
83 views
I have seen the tutorials that allow for this to happen.  Mine is a slightly different request.

I have a grid and I need to open a radwindow on double click of a row.  This I have working.  The problem I am having is populating the form with data.
This is my grid
<telerik:RadGrid ID="gvHelpdesk" runat="server" OnNeedDataSource="gvHelpdesk_NeedDataSource"
                AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellSpacing="0"
                GridLines="None">
                <MasterTableView DataKeyNames="HelpdeskId">
                    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                    <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="TicketNumber" FilterControlAltText="Filter ticketnumber column"
                            HeaderText="Ticket No" UniqueName="ticketnumber">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="AssetType" FilterControlAltText="Filter assetnumber column"
                            HeaderText="Asset No" UniqueName="assetnumber">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="DateLogged" FilterControlAltText="Filter datelogged column"
                            HeaderText="Date Logged" UniqueName="datelogged">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="AssignedEmployee" FilterControlAltText="Filter AssignedEmployee column"
                            HeaderText="Assigned" UniqueName="AssignedEmployee">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
               <ClientSettings>
                <Selecting AllowRowSelect="true" />
                <ClientEvents OnRowDblClick="RowDblClick" />
                <ClientEvents OnRowClick="RowClick" />
            </ClientSettings>
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
            </telerik:RadGrid>
this is my JS
function UpdateHelpdesk(helpdeskid) {
            var oWnd = $find("<%=UpdateHelpdesk.ClientID%>");
            oWnd.setUrl(oWnd.get_navigateUrl());
            oWnd.show();
        };
 
        function RowDblClick(sender, eventArgs) {
 
            UpdateHelpdesk(eventArgs.getDataKeyValue("HelpdeskId"));
        }
This is the code behind that calls in a Helpdesk ticket object filled with a sproc
protected void UpdateHelpdesk_Load(object sender, EventArgs e)
        {
            UpdateHelpdesk.DataBind();
        }
 
        protected void UpdateHelpdesk_DataBinding(object sender, EventArgs e)
        {
            if (Request.QueryString["HelpdeskId"] != null)
            {
                HelpdeskTicket ticket = PageAccess.GetHelpdeskTicketByHelpdeskId(Request.QueryString["HelpdeskId"]);
                txtUpdateEngineerNotes.Text = ticket.HelpdeskNotes;
            }
        }

I would be most grateful if someone could point me in the right direction.  I don't really want to have an external window based on another page.  Ideally I would like to to get the ID from the row double clicked then open the window that also resides on the same page then populate the window on load.

Is this possible

Many thanks
Simon
Top achievements
Rank 1
 asked on 03 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?