Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
559 views
Hello Telerik Team,

I m using RADGrid and i have hyperlink column,  and i have requirement that  we have to open the link in new tab when user clicks on the hyperlink column record.

so i cant find any way of opening new page in new tab (not window). I will to provide solution for IE7.  i tried all the values in target attribute. but none of them opens in new tab in IE7.

let me know if you have any workaround or javascript to provide this solution.
Vasil
Telerik team
 answered on 22 Aug 2011
3 answers
123 views
I have a RadMenu in a VB web control that I want to be able to click on a menu item and have it load and unload other controls in a placeholder on the Master Page.

I have instered the RadMenu on the master page.  In the VB code for the button click event I can not get it to find the placeholder on the master page in order to load different content into it.
Kate
Telerik team
 answered on 22 Aug 2011
5 answers
229 views
Hi there,

Whenever I minimize or set my screen to a lower resolution my radgrid starts to display columns as if their contents were squashed. Refer to the screenshot 'grid resize.jpeg' below:

I have my MasterTableView property TableLayout="Fixed"

How do I rectify this problem?

<%@ Page language="C#" Codebehind="Custom_DealUI.aspx.cs" AutoEventWireup="false" Inherits="KF.Crm.Web.Custom_DealUI" %>
 
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 
 
 
<head id="Head1" runat="server">
     
 
    <style type="text/css">
        #mainForm
        {
            height: 600px;
        }
                 
        .button, .disabledButton
        {
            filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#cecfde);
            cursor: hand;
            font-size: 11px;
            
             
        }
         
       .applicationToolBar
        {
             
            height: 26px;
             
        }
     
                
        span.text
        {
            font: 13px 'Segoe UI' , Arial, sans-serif;
            color: #4888a2;
            padding-right: 10px;
            vertical-align: middle;
            display: inline-block; *display:inline;zoom:1;width:90px;}
        .module-row
        {
            margin: 10px 0;
        }
        .module-row .status-text
        {
            margin-left: 103px;
            display: block;
            font: 13px 'Segoe UI' , Arial, sans-serif;
            color: #4888a2;
        }
        html.rfdButton a.rfdSkinnedButton
     {
     vertical-align: middle;
     margin: 0 0 0 5px;
     }
      
     * html div.RadComboBox
     {
         vertical-align: middle;
     }
     
        .style4
        {
            height: 620px;
            border-bottom: 1px solid #319AEA;
            margin-top: 3px;
        }
     
        .style6
        {
            width: 935px;
        }
        .style7
        {
            width: 227px;
        }
        .style8
        {
            margin-left: 48px;
        }
     
        </style>
 
    <telerik:RadScriptBlock ID="RadScriptBlock" runat="server">
   <script type="text/javascript">
 
 
       function AlertMessage(message, width, height, title) {
           var oWnd = radalert(message, width, height, title);
           CenterItem('.rwDialogPopup', '.rwDialogText', '.rwPopupButton');
       }
 
       function CenterItem(parentItem, subparentItem, theItem) {
           var parentWidth = $telerik.$(parentItem).outerWidth();
           var subparentWidth = $telerik.$(subparentItem).outerWidth();
           var itemWidth = $telerik.$(theItem).outerWidth();
 
           var theCenter = parentWidth / 2 - (parentWidth - subparentWidth) - itemWidth / 2;
 
           if (theCenter > 0) $telerik.$(theItem).css('margin-left', theCenter);
           else $telerik.$(theItem).css('margin-left', '0');
       }
 
       function onRequestStart(sender, args)
        {
           if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0)
           {
                
               args.set_enableAjax(false);
           }
            
            
            
       }
        
       function OnClientClicked(sender, eventArgs) {
           sender.set_enabled(false);
           var combo = $find("<%= RadComboBox4.ClientID %>");
           combo.disable();
            
           if (sender.get_text() == "Approve") sender.set_text("Approving...");
           else if (sender.get_text() == "Select") {
               sender.set_text("Retrieving...");
           }
 
           else if (sender.get_text() == "Clear") {
            
           combo.set_text("");
            
       }
            
           else { }
 
       }
 
       function OnClientSelectedIndexChanged(sender, eventArgs) {
 
           var combo = $find("<%= RadComboBox4.ClientID %>");
           combo.set_text("");
           combo.disable();
       }
 
       function OnClientFocus(sender, args) {
           var button = $find("<%= btnSelectDeal.ClientID %>");
           button.set_text("Select");
 
       }
       
 
       function EnableButtons( sender, eventArgs) {
           
           /*if (sender.get_text() == "Submit") {
               var btnStandard = $find("<%=btnStandard.ClientID%>");
               btnStandard.set_text("Submit");
               btnStandard.set_enabled(true);*/
           }
            
 
   </script>
       </telerik:RadScriptBlock>
</head>
 
 
<body class="BODY">
    <form runat="server" id="mainForm" method="post"  >
             
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
        </telerik:RadStyleSheetManager>
      
             
        <telerik:RadScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server"/>
         
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
            Behaviors="Default" EnableShadow="true" AutoSize="True" Modal="True"
            Skin="Windows7" CssClass="RadWindow"
            </telerik:RadWindowManager>
 
             
        <table
            border="0" cellpadding="0" cellspacing="0" width="100%" >
            <tr class="applicationToolBar">
                <td class="style7" >
         
            <telerik:RadComboBox ID="RadComboBox4" runat="server" AutoPostBack="true" Width="157px" Height="150px"
                EmptyMessage="Select a Deal" EnableLoadOnDemand="true" ShowMoreResultsBox="true"
                EnableVirtualScrolling="true" OnItemsRequested="RadComboBox4_ItemsRequested"  onclientfocus="OnClientFocus" >
                     
                 
            </telerik:RadComboBox>
            </td>
            <td>
             <telerik:RadButton runat="server" Text="Select" ID="btnSelectDeal"
                 UseSubmitBehavior="False"  Skin="Telerik"
                 OnClick="btnSelectDeal_Click" onclientclicked="OnClientClicked" >
            </telerik:RadButton>
            </td>
           
         <td class="style6">
                       
                        
                        
                        
                           
                        
                        
                           
                        
                         
                         
               
            
            <telerik:RadComboBox ID="RadComboBox1" runat="server" AutoPostBack="true" 
            Width="250px"
             
       DataTextField="DealSelector"
      DataValueField="DealSelector" Culture="English (Australia)"
            EnableAutomaticLoadOnDemand="True" Skin="Windows7"
            OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged" onclientselectedindexchanged="OnClientSelectedIndexChanged"
            EnableTheming="True" CssClass="style8"  >
              <Items>
               
                  <telerik:RadComboBoxItem runat="server" Text="All Deals" Value="All Deals" />
                   
                  <telerik:RadComboBoxItem runat="server" Text="New Deals" Value="New Deals" />
                  <telerik:RadComboBoxItem runat="server" Text="Waiting Manager Approval"
                      Value="Waiting Manager Approval" />
                  <telerik:RadComboBoxItem runat="server" Text="Manager Approved"
                      Value="Manager Approved" />
                  <telerik:RadComboBoxItem runat="server" Text="Income Recognised"
                      Value="Income Recognised" />
                       
                  <telerik:RadComboBoxItem runat="server" Text="Pro-forma Invoice Created"
                      Value="Pro-forma Invoice Created" />
                  <telerik:RadComboBoxItem runat="server" Text="Waiting Accounts Approval"
                      Value="Waiting Accounts Approval" />
                  <telerik:RadComboBoxItem runat="server" Text="Invoiced" Value="Invoiced" />
                  <telerik:RadComboBoxItem runat="server" Text="Receipt Processed"
                      Value="Receipt Processed" />
                  <telerik:RadComboBoxItem runat="server" Text="Credit Processed"
                      Value="Credit Processed" />
                  <telerik:RadComboBoxItem runat="server" Text="Inactive" Value="Inactive" />
              </Items>
    </telerik:RadComboBox>
    </td>
     
    <td>
               
       <asp:Panel ID="btnStandardWrapper" runat="server" Width="127px" >   
      <telerik:RadButton ID="btnStandard" runat="server" Text="Approve" OnClick="btnStandard_Click"
        UseSubmitBehavior="False" OnClientClicked="OnClientClicked"
             Style="clear: both;" Skin="Telerik"  Visible = "false"
               >
    </telerik:RadButton></asp:Panel>
         
         
        </td>
        </tr>
        </table>
 
        <!--<asp:Button ID="btnApprove" runat="server"   Text="Approve" Width="6%"  CssClass="button" Height="2%" />-->
     </br>
        <telerik:RadGrid ID="RadGrid1" AllowSorting="True" AllowPaging="True"
            AllowFilteringByColumn="True" runat="server" CellSpacing="0" GridLines="None"
            PageSize="100" Skin="Windows7" Culture="English (Australia)"  OnNeedDataSource="RadGrid1_NeedDataSource"
            ShowStatusBar="True"
            AutoGenerateColumns="False" OnItemDataBound="RadGrid1_ItemDataBound"
            OnPreRender="RadGrid1_PreRender" AllowMultiRowSelection="True"
                CssClass="style4" CellPadding="0" onitemcommand="RadGrid1_ItemCommand" Height="667px" Width="100%" 
               >
            <exportsettings exportonlydata="True">
            </exportsettings>
            <MasterTableView CommandItemDisplay="Top" CommandItemSettings-ShowExportToExcelButton="true" TableLayout="Fixed" >
 
<CommandItemSettings ShowExportToExcelButton="True"
                    showaddnewrecordbutton="True" AddNewRecordText="Clear filters"></CommandItemSettings>
             
 
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
 
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                <Columns>
                 
                <telerik:GridClientSelectColumn UniqueName="CheckboxSelectColumn" Visible = "false" >
  <HeaderStyle Width="30px" HorizontalAlign="Justify" VerticalAlign="Middle" />
                        <ItemStyle Width="30px" />
</telerik:GridClientSelectColumn>
                    
                 <telerik:GridHyperLinkColumn HeaderText= "Deal No"  UniqueName="GridHyperLinkColumn"  DataTextField="DealNo">
                   <HeaderStyle Font-Bold="True" Wrap="False" />
</telerik:GridHyperLinkColumn>
 
 <telerik:GridBoundColumn DataField="DealID" UniqueName = "DealID" HeaderText="DealID"
                AllowFiltering="False" Visible="False" >
              <HeaderStyle Font-Bold="True" Wrap="False" />
                    </telerik:GridBoundColumn>
 
                       
          <telerik:GridBoundColumn DataField="Location" HeaderText="Location"
                AllowFiltering="True" >
              <HeaderStyle Font-Bold="True" Wrap="False" />
                    </telerik:GridBoundColumn>
                     
                      <telerik:GridBoundColumn DataField="Department" HeaderText="Department"
                AllowFiltering="False" >
              <HeaderStyle Font-Bold="True" Wrap="False" />
                    </telerik:GridBoundColumn>
          <telerik:GridBoundColumn DataField="LeadOperative"
                HeaderText="Lead Operative" AllowFiltering="True" >
              <HeaderStyle Font-Bold="True" Wrap="False" />
                    </telerik:GridBoundColumn>
          <telerik:GridBoundColumn DataField="TransactionType"
                HeaderText="Transaction Type" AllowFiltering="False" >
                 
              <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                  Wrap="False" />
                    </telerik:GridBoundColumn>
                     
               <telerik:GridDateTimeColumn UniqueName="Income_Rec_Date"  HeaderText="Income Recognition Date"
                        DataField="Income_Rec_Date" DataFormatString="{0:dd/MM/yyyy}"
                       >
                       
                    <HeaderStyle Font-Bold="True"   Width="160px" Wrap="False" />
                       
                    </telerik:GridDateTimeColumn>        
          
                 
                    <telerik:GridDateTimeColumn DataField="TargetInvoiceDate"
                        DataFormatString="{0:dd/MM/yyyy}"
                        FilterControlAltText="Filter TargetInvoice column"
                        HeaderText="Target Invoice Date" UniqueName="TargetInvoice">
                        <HeaderStyle Font-Bold="True" Width="160px" Wrap="False" />
                    </telerik:GridDateTimeColumn>
          
                 
          <telerik:GridBoundColumn DataField="Address" HeaderText="Address"
                AllowFiltering="False" >
                 
              <HeaderStyle Font-Bold="True" Wrap="False" />
                    </telerik:GridBoundColumn>
                     
                     <telerik:GridBoundColumn DataField="LevelSuite" HeaderText="Level Suite"
                AllowFiltering="False" >
                 <HeaderStyle Font-Bold="True" />
               
                    </telerik:GridBoundColumn>
                     
                     
                 
          <telerik:GridBoundColumn DataField="KF_Amount_Excl_GST"
                HeaderText="Amount Ex GST" AllowFiltering="False" DataType ="System.Decimal" DataFormatString="{0:C2}" >
                 
              <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                  Wrap="False" />
                    </telerik:GridBoundColumn>
                 
          <telerik:GridBoundColumn DataField="DealStatus" HeaderText="Deal Status"
                AllowFiltering="False" >
                 
              <HeaderStyle Font-Bold="True" Wrap="False" />
                    </telerik:GridBoundColumn>
                 
          <telerik:GridBoundColumn DataField="GP_Debtor" UniqueName="GP_Debtor" HeaderText="GP Debtor"
                AllowFiltering="False" >
                <HeaderStyle Font-Bold="True" Wrap="False" />
                    </telerik:GridBoundColumn>
     
                </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
 
<PagerStyle AlwaysVisible="True"></PagerStyle>
            </MasterTableView>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
 
            
            <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" >
         
                             
                <selecting allowrowselect="True" />
         
                             
                <Scrolling AllowScroll="True" UseStaticHeaders="True" scrollheight="500px" />
                <Resizing AllowColumnResize="True" AllowResizeToFit="True" />
 
            </ClientSettings>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>
       <br /><br />
     
             <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
            Transparency="20" BackColor="#E0E0E0" Height="16px" >
            <table style="width:100%;height:100%;">
                <tr style="height:100%"><td align="center" valign="middle" style="width:100%">
                    <asp:Image ID="Image1" runat="server" AlternateText="Loading..."
        BorderWidth="0px"  ImageUrl="~/DealTracking/loading.gif">
       </asp:Image>
                 
            </telerik:RadAjaxLoadingPanel>
            
 
 
        <!-- content end -->
        
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" ClientEvents-OnResponseEnd="EnableButtons"   >
        <ClientEvents OnRequestStart="onRequestStart" />
             
            <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="btnStandard" EventName="Click">
                <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="btnStandardWrapper" UpdatePanelRenderMode="Block" />
                      
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1"
                            LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
             
                <telerik:AjaxSetting AjaxControlID="RadComboBox1">
                    <updatedcontrols>
                         
                        <telerik:AjaxUpdatedControl ControlID="btnStandardWrapper" UpdatePanelRenderMode="Block" />
                         <telerik:AjaxUpdatedControl ControlID="RadComboBox4" />
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1"
                            LoadingPanelID="RadAjaxLoadingPanel1" />
                    </updatedcontrols>
                </telerik:AjaxSetting>
                 
                <telerik:AjaxSetting AjaxControlID="btnSelectDeal" EventName="Click">
                    <updatedcontrols>
                        <telerik:AjaxUpdatedControl ControlID="btnSelectDeal"/>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1"  LoadingPanelID="RadAjaxLoadingPanel1"/>
                        <telerik:AjaxUpdatedControl ControlID="RadComboBox4" />    
                    </updatedcontrols>
                </telerik:AjaxSetting
                 
                 <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
             
            </AjaxSettings>
        </telerik:RadAjaxManager>
        
    </form>
</body>
</html>

Pavlina
Telerik team
 answered on 22 Aug 2011
7 answers
100 views
Hi,

Kindly let me know is it possible to remove the "NOT AND " and "NOT OR" from the RAD filter menu.
If yes, the give me broad idea how is it possible. as i do not have nay clue from where to start of.
Any immediate reply is highly appreciated.

Thanks and Regards,
Govind.
Pavlina
Telerik team
 answered on 22 Aug 2011
1 answer
252 views
I'm using the form decorator and various controls and am using the skin windows7. I would like to globalize this in case I ever want to change it. I know I could just use VS find and replace, but it would be nice to set it in the web.config so I could change it really easily if I want. I was trying to use an app setting but it was giving me an error. Here's what I was trying to do

<telerik:RadFormDecorator ID="decorator" Skin="<%=ConfigurationManager.AppSettings("siteSkin")%>" DecoratedControls="All" runat="server" />

I know that my app setting is good because I just output it and I get Windows7. However, when I put it in that tag, I get an error. Am I doing something wrong or do you have a way to set the default to Windows7 in the web.config?
Niko
Telerik team
 answered on 22 Aug 2011
3 answers
68 views
Hi,

if (rcPieBudgetItems.Series[0].Type == ChartSeriesType.Bar)
        {
            isPieChart = false;
            for (int i = 0; i < rcPieBudgetItems.Series[0].Items.Count; i++)
            {
                rcPieBudgetItems.Series[0].Items[i].Appearance.FillStyle.MainColor = rcPieBudgetItems.CustomPalettes[0].Items[i].MainColor;
                rcPieBudgetItems.Series[0].Items[i].Appearance.FillStyle.SecondColor = rcPieBudgetItems.CustomPalettes[0].Items[i].SecondColor;
            }
            (rgLegend.MasterTableView.GetColumn("gncValueColumn") as GridNumericColumn).DataFormatString = "{0:C}";
        }
        else
        {
            isPieChart = true;
           
            if (rcPieBudgetItems.CustomPalettes.Count == 0 && rcPieBudgetItems.Series[0].Items.Count > 0)
            {
                rcPieBudgetItems.CustomPalettes.Add(MyColorPalette.CustomPalettesHelper(rcPieBudgetItems.Series[0].Items.Count));
                rcPieBudgetItems.SeriesPalette = rcPieBudgetItems.CustomPalettes[0].Name;
            }
           
            (rgLegend.MasterTableView.GetColumn("gncValueColumn") as GridNumericColumn).DataFormatString = "{0:0.00}%";
        }

MyColorPalette.CustomPalettesHelper will return a Palette based on a number. When I click on the image it will change the chart type from pie to chart or chart to pie and call the code above. The problem is the colors in pie chart is fine, but in bar chart they always have the same color as the first color in the CustomPalette even though I set the color values manually. By the way, if I set filltype in the code above then it will pick up the new fill type but not the color.
Will really appreciate if anyone can give me some suggestions based on that. I'll wait online.

Thanks a mill.
Evgenia
Telerik team
 answered on 22 Aug 2011
3 answers
55 views
Hello,

I have a grid which shows orders. If the order is archived then it it appends "<<Archived>>" at the start of order name.
E.g. if Order name is ABC it will be shown as <<Archived>> ABC.
Programmatically I append "&lt;&lt;Archived&gt;&gt;" at the start of it when it is archived and save it in db.
Now in my application after archiving I have to show this title at three places
1. In Grid : Which works fine. It shows it as "<<Archived>> ABC".
2. When I open my order in detailed view its title is shown in textbox; For showing it properly I use HttpUtility.HtmlDecode function.
3. I have a grid filter for each column. This column shows all the archived orders as "&lt;&lt;Archived&gt;&gt;OrderName".

What should I do to properly display it?

Radoslav
Telerik team
 answered on 22 Aug 2011
2 answers
108 views
Hello,

I have the following radcalendar,

<

 

telerik:RadCalendar ID="RadCalendar1" runat="server" AutoPostBack="true" MultiViewColumns="1"

 

 

MultiViewRows="1" EnableMultiSelect="false">

 

 

</telerik:RadCalendar>

 


is there anyway to disable all the previous days to today?

Thanks a lot
Mike
Mike_T
Top achievements
Rank 1
 answered on 22 Aug 2011
1 answer
70 views
Hi All.

I've hidden the filter icon for each column in the filter row in a RadGrid, and have configured some of the columns to use the "Contains" filter and to postback when I press the Return/Enter key when the filter textbox has focus. This is working really well.

Hide filter icon...
<style type="text/css">  
    .RadGrid .rgFilter,  
    .GridFilterRow_Gray img  
    {  
        display: none;  
    }  
</style>

Configure columns to filter using "Contains" when user presses Return/Enter key...
AutoPostBackOnFilter="true" 
CurrentFilterFunction="Contains"


However, when I want to clear the filter for a given column, I should to be able to simply clear the text in the textbox in the filter row and press the Return/Enter key again, but this doesn't work so well.

For instance, if I leave the focus in the filter textbox after I have applied a filter, delete the text and pess Return/Enter again, it's all a matter of luck if the filter clears and the grid displays all the data or not. Sometimes it does, sometimes it just sits there and doesn't do anything. This is also the case if I change the filter text (if I want to change the filter or make a mistake).

The only way I can guarantee (by guarantee, I mean it's worked everytime so far) to make the filter clear or change, is to move the focus to a different filter textbox and back again and make my changes.

Has anyone else experienced this or does anyone know why this is happening?
Pavlina
Telerik team
 answered on 22 Aug 2011
3 answers
66 views
I have a large menu which is populated on demand via a webservice as its the most efficient way of populating items (the tree is too large to load fully). However, there is a branch which has 'User Favourites', which are added to through a different interface elsewhere on the page. Ideally, I'd like to 'Add to Favourites' with an XMLHttPRequest to avoid posting back or redirecting, and then on the client side, 'un-cache' the user favourites branch, if it had been previously shown, and therefore cached in the browser.

I don't really want to manually add items to the Favourites menu if I can help it. The other option is to be able to set a single branch to 'do not cache', but I don't think this is possible is it?
Kate
Telerik team
 answered on 22 Aug 2011
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?