Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
287 views
Hi,

I'm having problems creating a master page for site navigation and want to use the Telerik controls.  Can anyone assist on how I can do this?

This is what I have so far but it's getting confusing and need assistance:

<form id="form1" runat="server">
       <asp:ScriptManager ID="ScriptManager1" runat="server" />
       <!-- HEADER -->
       <header>
           <telerik:RadSearchBox ID="OMSearch" runat="server" Width="500" DropDownSettings-Height="200px" Skin="Windows7"></telerik:RadSearchBox>
           <br />
           <telerik:RadMenu ID="RadMenu1" runat="server" Skin="Windows7" Width="100%" Height="60" EnableShadows="true" style="top: 3px; left: 5px">
               <Items>
                   <telerik:RadMenuItem runat="server" NavigateUrl="~/Default.aspx" Text="Home" />
                   <telerik:RadMenuItem runat="server" Text="Wish List" />
                   <telerik:RadMenuItem runat="server" Text="Login" />
                   <telerik:RadMenuItem runat="server" Text="Shopping Cart" />                 
               </Items>
           </telerik:RadMenu>     
       </header>
       <!-- LEFT NAV -->
       <aside>
           <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Windows7" Width="150px">
               <Items>
                   <telerik:RadPanelItem Text="Products" Expanded="True">
                    <Items>
                           <telerik:RadPanelItem Text="Order From History" />
                           <telerik:RadPanelItem Text="Quick Entry" />
                           <telerik:RadPanelItem Text="Formularies" />
                           <telerik:RadPanelItem Text="My Mail" />
                           <telerik:RadPanelItem Text="Product Lookups" />                           
                       </Items>
                   </telerik:RadPanelItem>
                   <telerik:RadPanelItem Text="Specialties" Expanded="false">
                       <Items>
                           <telerik:RadPanelItem Text="Sales & Promotions" />
                           <telerik:RadPanelItem Text="Preferred Brands" />
                           <telerik:RadPanelItem Text="Catalog Request" />                         
                       </Items>
                   </telerik:RadPanelItem>
                   <telerik:RadPanelItem Text="Manufacturers">
                       <Items>
                           <telerik:RadPanelItem Text="My Contacts" />
                           <telerik:RadPanelItem Text="Address Cards" />
                           <telerik:RadPanelItem Text="Phone List" />
                           <telerik:RadPanelItem Text="Shared Contacts" />
                       </Items>
                   </telerik:RadPanelItem>
                   <telerik:RadPanelItem Text="Resource Center">
                       <Items>
                           <telerik:RadPanelItem Text="My Contacts" />
                           <telerik:RadPanelItem Text="Address Cards" />
                           <telerik:RadPanelItem Text="Phone List" />
                           <telerik:RadPanelItem Text="Shared Contacts" />
                       </Items>
                   </telerik:RadPanelItem>
                    <telerik:RadPanelItem Text="Specialty Sites">
                       <Items>
                           <telerik:RadPanelItem Text="My Contacts" />
                           <telerik:RadPanelItem Text="Address Cards" />
                           <telerik:RadPanelItem Text="Phone List" />
                           <telerik:RadPanelItem Text="Shared Contacts" />
                       </Items>
                   </telerik:RadPanelItem>
                    <telerik:RadPanelItem Text="My Account">                       
                   </telerik:RadPanelItem>
               </Items>
           </telerik:RadPanelBar>
       </aside>       
       <!-- CONTENT -->
       <section id="main">
           <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
           </asp:ContentPlaceHolder>
       </section>      
       <!-- FOOTER -->
       <div id="footerWrap">
           WebSite Footer Goes Here
       </div>
   </form>
Kate
Telerik team
 answered on 24 Oct 2013
1 answer
126 views
Hi 

I was trying to achieve the following with no much success

I want to insert one of the templates into the radeditor content from code behind.
I was not able to figure out what properties I have to access to pick the right template and assign it to the RadEditor textbox content ?

Thanks
Ianko
Telerik team
 answered on 24 Oct 2013
6 answers
302 views
Hello everyone,

I will try to explain what i need to do.

I'm using one GridDateTimeColumn inside of him i've the property PickerType="DatePicker".

It's all working fine, but i need to use a custom text. The DatePicker pop-up text is Open the calendar popup, but i need to change this.

There is anyway to change this text?

Thank you.
MARIANO
Top achievements
Rank 1
 answered on 24 Oct 2013
1 answer
155 views
Unless I'm missing something, TileRows seems pretty inflexible.  There is no way ahead of time to know a users screen size so I have to set the number of rows for what fits on a low resolution screen.  This leaves a huge amount of unused screen space for users running higher resolutions.

Is there a way to set the number of rows on the client-side?

Also, is it possible to hack a different number of rows between groups?  I am using a custom (70 x 70) tile for some items and I'd like more rows in the groups that have them.

Overall, I'd say specifying a number of rows was a bad idea and it should be whatever fits in the height of the TileListView.  Especially since scrolling is horizontal only.
Marin Bratanov
Telerik team
 answered on 24 Oct 2013
1 answer
110 views
Hi

During upload operation a blinking icon and a stable green icon is displayed on the left of the file name. How can I have the same on the right side of the filename? Is there any possible tweak?

Thankyou
Dona
Shinu
Top achievements
Rank 2
 answered on 24 Oct 2013
3 answers
129 views
Hi,
Please note that I am using an older version of Telerik (v: 2009.02.0701.35). 

I am creating a simple RadGrid, each record in the grid has 2 values (city and name). For one of those values (city - type string) I want to use a combobox for editing where the user can also type in a custom value. This all works great. I then added AJAX using the AJAX controls and now when I go to edit mode and either click cancel or update the AJAX loading panel stays on the screen. The values have updated but you can only see that if you refresh the page (F5) or if I disable Ajax then everything works as expected. The culprit is the Combo box (if I remove it then everything works) but I am not sure why. What am I missing?

See my attached screen shot of what happens when clicking either Cancel or Update.

Here is my ASPX code (using .NET 4.0 and Visual Studio 2010).

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="radG" %>
  
<radG:RadGrid id="grdParkingLocations"  runat="server" Width="600px" enableajax="True" GridLines="None"
    PageSize="999" AllowMultiRowSelection="False" ShowStatusBar="true"
    AllowPaging="False" AllowSorting="False" AutoGenerateColumns="False"
    AllowAutomaticDeletes="False" AllowAutomaticInserts="False" AllowAutomaticUpdates="False"
    OnNeedDataSource="grdParkingLocations_NeedDataSource"
    OnItemDataBound="grdParkingLocations_OnItemDataBound"
    OnUpdateCommand="grdParkingLocations_UpdateCommand"
    OnInsertCommand="grdParkingLocations_InsertCommand"
    OnDeleteCommand="grdParkingLocations_DeleteCommand">
    <MasterTableView DataKeyNames="ParkingLocationId" AutoGenerateColumns="False" CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage">
        <CommandItemSettings AddNewRecordText="New location"/>
        <Columns>
            <radG:GridEditCommandColumn ButtonType="ImageButton" HeaderText="Edit"/>
            <radG:GridButtonColumn ConfirmText="Delete this parking location?" HeaderText="Delete" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete"/>
            <radg:GridBoundColumn UniqueName="Name" DataField="Name" HeaderText="Name" ItemStyle-Width="300px"/>
            <radG:GridTemplateColumn UniqueName="City" DataField="City" HeaderText="City" ItemStyle-Width="300px">
                              <FooterTemplate>Template footer</FooterTemplate>
                              <FooterStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                              <ItemTemplate>
                                   <%#DataBinder.Eval(Container.DataItem, "City")%>
                              </ItemTemplate>
                              <EditItemTemplate>
                                  <radG:RadComboBox runat="server" ID="radComboCity"
                                        AllowCustomText="True"
                                        Height="140px" Width="220px"
                                        DropDownWidth="420px"
                                        OnLoad="radComboCity_OnLoad"
                                        SelectedValue='<%#Bind("City") %>'/>
                              </EditItemTemplate>
                         </radG:GridTemplateColumn>
        </Columns>
    </MasterTableView>
</radG:RadGrid>
<radG:RadAjaxLoadingPanel ID="LoadingPanelParkingLocations" runat="server"/>
<radG:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="True">
    <AjaxSettings>
        <radG:AjaxSetting AjaxControlID="grdParkingLocations">
            <UpdatedControls>
                <radG:AjaxUpdatedControl ControlID="grdParkingLocations" LoadingPanelID="LoadingPanelParkingLocations"/>
            </UpdatedControls>
        </radG:AjaxSetting>
    </AjaxSettings>
</radG:RadAjaxManager>

The radComboCity_OnLoad method loads the list into the RadComboBox. If you want to see the code behind let me know and I will paste it but I am not doing anything important there.

Thanks in advance for any help you can provide (with the exception of updating my version because I don't make those decisions in the company).

-Igor


Konstantin Dikov
Telerik team
 answered on 24 Oct 2013
7 answers
1.0K+ views
Hi,
 I need to validate a control inside the radgrid (If empty show message). Here is what i have comeup with. But this doesn't seem to be working.
Thanks in advance


<%@ Page Title="" Language="VB" MasterPageFile="~/master/default.master" AutoEventWireup="false" CodeFile="SubProductOrSrvcAdminstration.aspx.vb" Inherits="EncoreBMF_SubProductOrSrvcAdminstration" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" namespace="System.Web.UI.WebControls" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeaderContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
  
<style type="text/css">
div.ex
{
width:480px;
padding:10px;
border:2px solid gray;
margin:0px;
}
</style>
       <asp:ValidationSummary ID="ValidationSummary1" runat="server"  Enabled="true" ForeColor="Red" HeaderText="Errors:" 
        ShowSummary="true" DisplayMode="List" /> 
  
                <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all">
                </telerik:RadFormDecorator>
                 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
                    <AjaxSettings
                        <telerik:AjaxSetting AjaxControlID="ValidationSummary1"
                            <UpdatedControls
                                <telerik:AjaxUpdatedControl ControlID="ValidationSummary1" /> 
                            </UpdatedControls
                        </telerik:AjaxSetting
                        <telerik:AjaxSetting AjaxControlID="rgSubProdOrSvc"
                            <UpdatedControls
                                <telerik:AjaxUpdatedControl ControlID="rgSubProdOrSvc" /> 
                            </UpdatedControls
                        </telerik:AjaxSetting
                    </AjaxSettings
                 </telerik:RadAjaxManager
                   
               <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
                        <script type="text/javascript"
                                function clientSubsvcValidation(source, arguments) { 
                                    var currentCell = source.parentNode; 
                                    var currentRow = currentCell.parentNode 
                        
                                    //get a reference to the calling validator control 
                                    var CustomValidator1 = source.id; 
                                    
                                    //get the value of the GridBoundColumn 'salesperson'
                                    var SubSvcID;
                                    var SubSvcName;
                                    SubSvcID = $telerik.findElement(currentRow, CustomValidator1.replace('CustomValidator1', 'EncoreProductSubServiceId')).value
                                    SubSvcID = $telerik.findElement(currentRow, CustomValidator1.replace('CustomValidator1', 'SubServiceName')).value
                                
                        </script
    
               </telerik:RadCodeBlock
      
                            
                <div class="ex"> Sub-Products / Services Administration 
  
                        <hr runat="server" id="Hr1" style="border-color: #659EC7" />
                                                     
                                <br />
                                  
  
                                  
                                  <telerik:RadGrid ID="rgSubProdOrSvc" runat="server" GridLines="None" 
                                    DataSourceID="edsProductSubService"
                                    AutoGenerateColumns="False"
                                  >
                          
                                    <MasterTableView
                                        DataSourceID="edsProductSubService"
                                        DataKeyNames="EncoreProductSubServiceId"
                                        EditMode ="InPlace"
                                        AllowAutomaticInserts="false"
                                        AllowAutomaticUpdates="false"
                                        AllowAutomaticDeletes="false"
                                        CommandItemDisplay= "TopAndBottom"
                                    >
                                        <NoRecordsTemplate><div>Click on the plus(+)sign above to add a Sub-Product to the grid.</div></NoRecordsTemplate>
                                 
                                        <EditItemTemplate>
                                           
                                                 
                                            <asp:CheckBox ID="chkIsActive" runat="server"  Checked = '<%# Eval("IsActiveFlag") %>' />
                                                          
                                                    
                                             <asp:TextBox ID="txtsubSvcName" runat="server" Text='<%# Eval("SubServiceName") %>'></asp:TextBox>
                                             <asp:CustomValidator ID="CustomValidator1" ControlToValidate="txtsubSvcName" 
                                             ClientValidationFunction="clientSubsvcValidation" 
                                              Display="Dynamic" ErrorMessage="Not an even number!" 
                                             Text="Please enter a valid Sub-product name" Font-Name="verdana" Font-Size="10pt" 
                                             runat="server" />
                                        <%--  <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtsubSvcName" ErrorMessage="Please enter a valid Sub-product name" Display="Dynamic" runat="server">*
                        </asp:RequiredFieldValidator>   OnServerValidate="ServerUnitPriceValidation" --%>
                                             <asp:TextBox ID="txtSvcShortName" runat="server" Text='<%# Eval("SubServiceShortName") %>'></asp:TextBox>
                                        </EditItemTemplate>
                                    <%-- <ItemTemplate>
                                         <asp:CheckBox  ID="chkIsActiveIT" runat="server" Checked='<%# Eval("IsActiveFlag") %>'></asp:CheckBox>
                                                        
                                                    
                                           <asp:Label ID="lblsubSvcName" runat="server" Text='<%# Eval("SubServiceName") %>'></asp:Label>
                                                             
                                            <asp:Label ID="lblsubSvcShortName" runat="server" Text='<%# Eval("SubServiceShortName") %>'></asp:Label>
                                     </ItemTemplate>--%>
                                       
  
                                          
                                        <CommandItemSettings ExportToPdfText="Export to Pdf" />
                                      <Columns>
                                                                        
                                         <telerik:GridEditCommandColumn >
                                         </telerik:GridEditCommandColumn>
                                         <telerik:GridCheckBoxColumn DataField="IsActiveFlag" HeaderText="Inactive" 
                                                UniqueName="Inactive">
                                                </telerik:GridCheckBoxColumn>
                                                <telerik:GridBoundColumn DataField="SubServiceName" 
                                                HeaderText="Sub-prod/svc Name" UniqueName="SubServiceName">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="SubServiceShortName" 
                                                HeaderText="Short Name" UniqueName="SubServiceShortName">
                                            </telerik:GridBoundColumn>
                                           
                                        </Columns>
                                        <EditFormSettings>
                                          <EditColumn UniqueName="EditCommandColumn1">
                                            </EditColumn>
                                            
                                              
                                        </EditFormSettings>
                                    </MasterTableView>
                                </telerik:RadGrid>
                                <asp:EntityDataSource ID="edsProductSubService" runat="server" 
                                    ConnectionString="name=Entities" DefaultContainerName="Entities" 
                                    EntitySetName="EncoreProductSubService" 
                                     Select="it.[EncoreProductSubServiceId], it.[IsActiveFlag], it.[SubServiceName], it.[SubServiceShortName] ">
                                      
                                </asp:EntityDataSource>
                                
                                <br />
                       <%-- </div>--%>
                                                                        
                                                         
                        <asp:LinkButton ID="lnkAddBundl" runat="server">Add Sub-prod / svc</asp:LinkButton>
                            
                        <br />
                    <br />
                    <br />
                    <br />
                        <br />
                        <br />
                </div>
Princy
Top achievements
Rank 2
 answered on 24 Oct 2013
1 answer
161 views
I see that I can customize the hyperlink manager by removing fields, but is it possible to add an extra field?  I'd like for the user to be able to add a "data-" attribute to the resulting anchor tag.  Is this possible?

Ianko
Telerik team
 answered on 24 Oct 2013
6 answers
376 views
Hi,

I tried to export RadGrid to Excel into Biff format. I have a Template Column format like this :

<telerik:GridTemplateColumn UniqueName="Projection3" DataField="Projection3" HeaderText="Projection 3" HeaderStyle-Width="130px" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right"
    Aggregate="Sum" DataType="System.Decimal" FooterStyle-HorizontalAlign="Right" FooterText=" " FooterAggregateFormatString="{0:### ### ### ##0}">
    <ItemTemplate>
        <%# String.Format("{0:### ### ### ##0;(### ### ### ##0);0}", Eval("Projection3"))%>
    </ItemTemplate>
    <EditItemTemplate>
        <telerik:RadNumericTextBox ID="rntbProjection3" runat="server" Width="100%" Text='<%# Bind("Projection3")%>' MaxValue="999999999" MinValue="-999999999" CssClass="NumberAlignRight">
            <NumberFormat DecimalDigits="0" />
            <IncrementSettings InterceptArrowKeys="false" />
        </telerik:RadNumericTextBox>
    </EditItemTemplate>
</telerik:GridTemplateColumn>

The SuppressColumnDataFormatStrings=True don't work with template column.

Settings of export grid are :
.ExportSettings.IgnorePaging = True
.ExportSettings.ExportOnlyData = True
.ExportSettings.OpenInNewWindow = True
.ExportSettings.SuppressColumnDataFormatStrings = True
.ExportSettings.HideStructureColumns = False


How can change the export format of this column to {0:0} when i export my RadGrid.

ty




Kostadin
Telerik team
 answered on 24 Oct 2013
1 answer
146 views
Does combobox support item grouping? I want a tree like structure to be created inside the combobox without using the item template.
A sample
Smartphone
  Apple
  Motorola
Laptop
  MacBook
  HP

like this.
 
Shinu
Top achievements
Rank 2
 answered on 24 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?