Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
171 views

Hi,

I am new to Telerik controls and i'm trying to use a radAjaxLoadingPanel to show activity when using a RadGrid. I have managed to get the radAjaxLoadingPanel to show it's default image but it does not seem to animate it to show the circle spinning, instead just shows a static image. My code for the page is below. Am i missing something here? 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TotalTargets.aspx.cs" Inherits="WorkStreamList"
StylesheetTheme="SkinFile" %>
  
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
  
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
  
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title>Totals for Annual Targets</title>
    <link href="General.css" rel="stylesheet" type="text/css" />
    <!-- custom head section -->
    <style type="text/css">
        .MyImageButton
        {
           cursor: hand;
        }
        .EditFormHeader td
        {
            font-size: 14px;
            padding: 4px !important;
            color: #0066cc;
        }
        </style>
    <!-- end of custom head section -->
  
</head>
<body>
    <form id="form1" runat="server">
  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
               
  
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All"  Skin="Web20"  EnableAjaxSkinRendering="true" EnableRoundedCorners="true"
           EnableEmbeddedSkins="true" EnableEmbeddedScripts="true" EnableEmbeddedBaseStylesheet="true" EnableTheming="true" EnableViewState="true" />
  
        <table border="0" cellpadding="0" cellspacing="0" style="height:30px; width:100%;" >
        <tr><td  style="width:80%">
            <img id="Img1" alt="Savings Plans" src="Pics/SavingsPlansTitle2.gif" runat="server"  />
              <asp:Label ID="lblUserName" runat="server" Font-Bold="True" Font-Size="Small" ForeColor="Black"
                Style="font-size: Small"></asp:Label
        </td><td style="width:20%" align="right">
        <asp:UpdateProgress runat="server" ID="updateprogress1" >
            <ProgressTemplate >
            <div class="progress">
                <img alt="" src="Pics/load.gif"  
                    style="width: 30px; height: 30px; vertical-align:middle" /><b><span style="font-size: small; color: #FF0000">
                Please Wait...</span></b>
            </div
            </ProgressTemplate>
        </asp:UpdateProgress>
        </td></tr>
  
        </table>
          
        <div id="MainSection" runat="server" >
  
        <div style="width: 800px; text-align: center;">
            <asp:UpdatePanel ID="UpdatePanel3" runat="server"  >
                <ContentTemplate>
                    <asp:Label ID="lblError" runat="server" Font-Bold="True" Font-Size="Medium" ForeColor="Red"
                        Style="font-size: small"></asp:Label>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
          
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SavingsPlanDBConnectionString %>"
                SelectCommand="SELECT [id], [BusinessCode], [BusinessUnit], [Directorate], [TotalTarget], [FinancialYear] FROM [OverallTargets]" 
                DeleteCommand="DELETE FROM [OverallTargets] WHERE [id] = @id" 
                InsertCommand="INSERT INTO [OverallTargets] ([BusinessCode], [BusinessUnit], [Directorate], [TotalTarget], [FinancialYear]) VALUES (@BusinessCode, @BusinessUnit, @Directorate, @TotalTarget, @FinancialYear)" 
                UpdateCommand="UPDATE [OverallTargets] SET [BusinessCode] = @BusinessCode, [BusinessUnit] = @BusinessUnit, [Directorate] = @Directorate, [TotalTarget] = @TotalTarget, [FinancialYear] = @FinancialYear WHERE [id] = @id" >
            <DeleteParameters>
                <asp:Parameter Name="id" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="BusinessCode" Type="String" />
                <asp:Parameter Name="BusinessUnit" Type="String" />
                <asp:Parameter Name="Directorate" Type="String" />
                <asp:Parameter Name="FinancialYear" Type="String" />
                <asp:Parameter Name="TotalTarget" Type="Decimal" />
                <asp:Parameter Name="id" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="BusinessCode" Type="String" />
                <asp:Parameter Name="BusinessUnit" Type="String" />
                <asp:Parameter Name="Directorate" Type="String" />
                <asp:Parameter Name="FinancialYear" Type="String" />
                <asp:Parameter Name="TotalTarget" Type="Decimal" />
            </InsertParameters>
        </asp:SqlDataSource>
          
        <asp:SqlDataSource ID="DS_Directorate" runat="server" 
            ConnectionString="<%$ ConnectionStrings:DataAcademy400ConnectionString %>" 
            SelectCommand="SELECT DISTINCT LOWER(DirectorateDescription) AS DirectorateDescription FROM ORACLE_DS_GL_Hierarchy WHERE (DirectorateCode <> 'BS') ORDER BY DirectorateDescription" >
        </asp:SqlDataSource>
          
        <br />
        <asp:Label ID="Label2" runat="server" Text="Total Targets:" ForeColor="Black" Font-Size="Medium"  Font-Bold="True" Font-Names="Monotype Corsiva,Verdana"></asp:Label>
        <br />
          
  
  
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
  
            <script type="text/javascript">
                function RowDblClick(sender, eventArgs) {
                    sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
                }
            </script>
  
        </telerik:RadCodeBlock>
  
  
  
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
  
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" HorizontalAlign="Center" Visible="true" Skin="Web20" 
            RegisterWithScriptManager="true"/>
          
  
        <telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True"
            AllowAutomaticInserts="True" PageSize="10" AllowAutomaticUpdates="True" AllowPaging="True"
            AutoGenerateColumns="False" DataSourceID="SqlDataSource1" Skin="Web20" >
            <PagerStyle Mode="NextPrevAndNumeric" />
            <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataKeyNames="Id"
                DataSourceID="SqlDataSource1" HorizontalAlign="NotSet" AutoGenerateColumns="False">
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                        <ItemStyle CssClass="MyImageButton" />
                    </telerik:GridEditCommandColumn>
                    <telerik:GridBoundColumn DataField="Id" HeaderText="Id" SortExpression="Id"
                        UniqueName="Id" ColumnEditorID="GridTextBoxColumnEditor1">
                    </telerik:GridBoundColumn>
                    <telerik:GridDropDownColumn DataField="BusinessCode" DataSourceID="SqlDataSource1"
                        HeaderText="BusinessCode" ListTextField="BusinessCode" ListValueField="BusinessCode"
                        UniqueName="BusinessCode" ColumnEditorID="GridDropDownColumnEditor1">
                    </telerik:GridDropDownColumn>
                    <telerik:GridDropDownColumn DataField="BusinessUnit" DataSourceID="SqlDataSource1"
                        HeaderText="BusinessUnit" ListTextField="BusinessUnit" ListValueField="BusinessUnit"
                        UniqueName="BusinessUnit" ColumnEditorID="GridDropDownColumnEditor2">
                    </telerik:GridDropDownColumn>
                    <telerik:GridBoundColumn DataField="Directorate" HeaderText="Directorate"
                        SortExpression="Directorate" UniqueName="Directorate" Visible="True"
                        EditFormColumnIndex="1" ColumnEditorID="GridTextBoxColumnEditor2">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="FinancialYear" HeaderText="FinancialYear"
                        SortExpression="FinancialYear" UniqueName="FinancialYear" Visible="True"
                        EditFormColumnIndex="1" ColumnEditorID="GridTextBoxColumnEditor3">
                    </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn HeaderText="TotalTarget" SortExpression="TotalTarget" UniqueName="TemplateColumn"
                                                EditFormColumnIndex="1">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lblTotalTarget" Text='<%# Eval("TotalTarget", "{0:C}") %>'></asp:Label>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <span><telerik:RadNumericTextBox runat="server" ID="tbTotalTarget" Width="40px" DbValue='<%# Bind("TotalTarget") %>'></telerik:RadNumericTextBox><span
                        style="color: Red"><asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="tbTotalTarget"
                        ErrorMessage="*" runat="server">
                                </asp:RequiredFieldValidator></span>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
  
                    <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                        UniqueName="DeleteColumn">
                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                    </telerik:GridButtonColumn>
                </Columns>
                <EditFormSettings ColumnNumber="2" CaptionDataField="Id" CaptionFormatString="Edit properties of Product {0}" InsertCaption="New Product">
                   <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                    <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                    <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White"
                        Width="100%" />
                    <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" />
                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                    <EditColumn ButtonType="ImageButton" InsertText="Insert Order" UpdateText="Update record"
                        UniqueName="EditCommandColumn1" CancelText="Cancel edit">
                    </EditColumn>
                    <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                </EditFormSettings>
            </MasterTableView>
            <ClientSettings>
                <ClientEvents OnRowDblClick="RowDblClick" />
            </ClientSettings>
  
        </telerik:RadGrid>
        <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="200px" />
        <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor2" runat="server" TextBoxStyle-Width="150px" />
        <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor3" runat="server" TextBoxStyle-Width="150px" />
        <telerik:GridDropDownListColumnEditor ID="GridDropDownColumnEditor1" runat="server" DropDownStyle-Width="110px" />
        <telerik:GridDropDownListColumnEditor ID="GridDropDownColumnEditor2" runat="server" DropDownStyle-Width="110px" />
        <telerik:GridNumericColumnEditor ID="GridNumericColumnEditor1" runat="server" NumericTextBox-Width="40px" />
          
  
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SavingsPlanDBConnectionString %>" 
            SelectCommand="SELECT [id], [BusinessCode], [BusinessUnit], [Directorate], [TotalTarget], [SortOrder] FROM [OverallTargets]"
            FilterExpression="id='{0}'" 
                DeleteCommand="DELETE FROM [OverallTargets] WHERE [id] = @id" 
                InsertCommand="INSERT INTO [OverallTargets] ([BusinessCode], [BusinessUnit], [Directorate], [TotalTarget], [SortOrder]) VALUES (@BusinessCode, @BusinessUnit, @Directorate, @TotalTarget, @SortOrder)" 
                UpdateCommand="UPDATE [OverallTargets] SET [BusinessCode] = @BusinessCode, [BusinessUnit] = @BusinessUnit, [Directorate] = @Directorate, [TotalTarget] = @TotalTarget, [SortOrder] = @SortOrder WHERE [id] = @id">
            <DeleteParameters>
                <asp:Parameter Name="id" Type="Int32" />
            </DeleteParameters>
  
            <UpdateParameters>
                <asp:Parameter Name="BusinessCode" Type="String" />
                <asp:Parameter Name="BusinessUnit" Type="String" />
                <asp:Parameter Name="Directorate" Type="String" />
                <asp:Parameter Name="TotalTarget" Type="Decimal" />
                <asp:Parameter Name="SortOrder" Type="Int32" />
                <asp:Parameter Name="id" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="BusinessCode" Type="String" />
                <asp:Parameter Name="BusinessUnit" Type="String" />
                <asp:Parameter Name="Directorate" Type="String" />
                <asp:Parameter Name="TotalTarget" Type="Decimal" />
                <asp:Parameter Name="SortOrder" Type="Int32" />
            </InsertParameters>
        </asp:SqlDataSource>
                  
        <br /><br /> 
          
        <asp:LinkButton ID="btnHome" OnClick="btnHome_Click" 
        runat="server" CausesValidation="False" 
        Text="<img style='v-align:bottom; margin-top:3px;Border-style:none;' src='Pics/home2.gif' alt='Back To Home Page'>"></asp:LinkButton>
         Back To Home Page
          
        <br /><br />
        <asp:LinkButton ID="btnBack" OnClick="btnBack_Click" 
        runat="server" CausesValidation="False" 
        Text="<img style='v-align:bottom; margin-top:3px;Border-style:none;' src='Pics/back.png' alt='Back To Home Page'>"></asp:LinkButton>
         Back To Reference Tables Page        
          
    </div
    </form>
</body>
</html>

 

Tsvetina
Telerik team
 answered on 19 Jan 2011
3 answers
84 views
Hi,

I have a RADGRID1 with 2 columns: 1.) Dropdownlist 2.) Textbox

The Dropdownlist columns has a dropdownlist with two values a.) Button and b.) Picklist
In the EDIT mode, when the user select "Button" from the dropdownlist, I generate a button and place it next to the TextBox.

Here is what I want:
When the user clicks on this 'Button', I want to open another RADGRID2 as a modal popup(like a lookup) which is bound to some data using SqlDataSource. RADGRID2 will have a Select button and when the user Selects a particular row, I want the entire row contents to be placed into the Textbox of RADGRID1 or atleast get the row values for each column so that I can make use of them in RADGRID1.

Can someone please let me know how to go about this. I am fairly new to all this and I feel utterly helpless.

Thanks,
Srihari.



Iana Tsolova
Telerik team
 answered on 19 Jan 2011
4 answers
197 views
I'm binding this RadGrid client side that has a RadMenu in one of the column. RadMenu's root item shows up fine in the grid but when expanded, child items are hidden under other cells of the grid. I tried playing around with z-index of both RadGrid and RadMenu but no luck.

When the same grid is bound server side, RadMenu within the grid works just fine. It's only when the grid is bound client-side.

Please advice what else I can look into or change? Thanks.
Maria Ilieva
Telerik team
 answered on 19 Jan 2011
5 answers
78 views
Hi

I added following code in Radgrid

<ClientSettings>
                   <ClientEvents OnRowCreated="RowCreated" />
</ClientSettings>


Then

<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
 
    <script type="text/javascript">
        function RowCreated(sender, eventArgs) {
            var dataItem = eventArgs.get_gridDataItem();
        }
        
    </script>
 
</telerik:RadCodeBlock>

Its giving me error "Stack Overflow at line.."  on var dataitem Line
Mark Perry
Top achievements
Rank 1
 answered on 19 Jan 2011
1 answer
120 views
Hi,

I have a rad grid bind to a datasource with all the SQL operations(select,insert,update,delete). Everything works fine. Now I had add on the Grid Insert_Command event (for new record insertion) a check where it compares the new insert value with the existing values of the grid. If the new value entered already exists, I exit the function and display a message on the screen. My problem is that the grid continues and execute the insert command which is declare on the datasource. How can I prevent the automatic insert operation to be executed on demand

Thanks
George
Top achievements
Rank 1
 answered on 19 Jan 2011
6 answers
159 views
I have created a web page in which I placed a rad editor and when I uploaded an image from the image manager then in rad editor it uploaded the image but when I save it and send an outlook email then it donot show the image in the email. The code which I wrote in aspx page is 

 

<script type="text/javascript">

 

 

function OnClientLoad(editor) {

 

 

var body = editor.get_document().body;

 

body.setAttribute(

"unselectable", "off");

 

}

 

 

</script>

 

<

 

telerik:RadEditor ID="reMessage" runat="server" OnClientLoad="OnClientLoad" NewLineBr="false" >

 

 

<Content></Content>

 

 

<ImageManager UploadPaths="~/Images" DeletePaths="~/Images" ViewPaths="~/Images" />

 

 

<TemplateManager UploadPaths="~/Templates" DeletePaths="~/Templates" ViewPaths="~/Templates" />

 

 

</telerik:RadEditor>

 

 And The code on aspx.cs page for sending email is

 

SmtpClient Client = new SmtpClient();

 

 

MailMessage mail = new MailMessage();

 

mail.Body =reMessage.Content;
Client.Send(mail);

I am attaching screenshot for this so that it will be more clear what is the problem I am facing.Can you please tell me some solution to fix this problem.

 

Rumen
Telerik team
 answered on 19 Jan 2011
2 answers
190 views
I have a jquery control that requires the width of the image to be outputted.  Currently - radbinaryimage displays the height/width in a style like so:
style="height:33px;width:50px;".  Is there anyway to have it output the width like a normal control
<img id="Photos1_lvPhotoSliderList_rbiPhotosList_9" src="Telerik.Web.UI.WebResource.axd?imgid=2003722f26874665b53a5b8d4f150506&amp;type=rbi" alt="6"  height="33px" width="50px" />
WebGeek
Top achievements
Rank 1
 answered on 19 Jan 2011
2 answers
157 views
I am working with the nopCommerce 1.90 build and am doing significant modification to include new functionality.  One item I am trying to accomplish is the use of Telerik controls within the nopCommerce framework and I am running into issues with multiple ScriptManager's on the same page (nopCommerce has one on some pages along with a RadScriptManager that I have put on the related Master page.

Before I get into a lot of trial and error changes, I would like to ask:

(1) Do you have direct experience with using Telerik controls in the nopCommerce system?
(2) If I have Telerik controls on the Master Page, and the nopCommerce content page has an ajaxToolkit:ToolkitScriptManager in conjunction with an ajaxToolkit:TabContainer and ajaxToolkit:TabPanel contained on it, how do I reconcile this?  Will the presence of the RadScriptManager be sufficient for the ajaxToolkit components?
(3) Would the ajaxToolkit:ToolkitScriptManager work in place of the Telerik RadScriptManager?
(4) Or do I need to (through significant re-coding) modify the nopCommerce application code to eliminate the use of the ajaxToolkit controls altogether?  Obviously, this would be the least attractive option.

Your thoughts, direction, and/or suggestions would be most appreciated!

Thanks in advance!

Lynn
Lynn
Top achievements
Rank 2
 answered on 19 Jan 2011
1 answer
152 views
I got a problem with the following situation.

I have 2 raddockzones and 1 raddock in the first zone. 
I can not drag this to the other zone on my ipad or iphone because it will look around on the page.

Are there any solutions for this issue. Because i want to create an application that will also work on the ipad.

Regards,
Sander
Pero
Telerik team
 answered on 19 Jan 2011
1 answer
156 views
Hi all,

I am trying to get my head around this problem and was hoping to be given some guidance on where to start. The easiest way to envision my desired end result is this: An entire specified area is a dock zone. Splitters can be placed onto that dock zone to subdivide it. The user is able to drag-and-drop a dock onto the dock zone and have the dock autofill the area until it hits a splitter. So, for instance, if there was one splitter dividing the upper and lower halves of the dock zone, and then two vertical splitters dividing the upper and lower halves. In this way we would have 4 quadrants and a dock would be able to dock in any of these quadrants.

Now, I believe this is not possible with one dock zone (correct me if I'm wrong!). So, I believe I need to be dynamically adding a dock zone with every splitter. When the first splitter is added (to divide upper/lower), the original dock zone would shrink to half its original height, the splitter would be added to the middle, and the new dock zone would fill the lower half. 

Is this about right? Do I just drop a Rad Splitter onto a page, then add a Rad Pane with a Rad Dock Zone on it to the splitter, and resize accordingly?

Sean
Dobromir
Telerik team
 answered on 19 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?