Telerik Forums
UI for ASP.NET AJAX Forum
11 answers
273 views
Hi,

  I am highlighting first menu item from codebehind by: RadMenu1.Items(0).HighlightPath(). That works as expected.

However, when i am trying to do the same from Javascript i struggle.

I tried:

  function RadMenu1_OnClientItemClicking(sender, eventArgs) {     

          var item = eventArgs.get_item();      
          item.set_selected(true)

This results in both menu items highlighted. Additional problem that when i click outside menu, second item of menu looses it highlight state, but first item stays highlighted.

Another way i tried

         var menu = $find("<%= RadMenu1.ClientID %>");
          var firstItem = menu.get_items().getItem(0).set_selected(true);
          var secondItem = menu.get_items().getItem(1).set_selected(false);
          menu.commitChanges();

Kinda same issues.

Please advice
Boyan Dimitrov
Telerik team
 answered on 07 Oct 2014
2 answers
136 views
Hello all,

I have:

in .aspx
 <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
          </telerik:RadWindowManager>
  <script type="text/javascript">
    function confirmCallbackFn(arg) {
      if (arg) { //the user clicked OK
      __doPostBack("<%=HiddenButton.UniqueID %>", "");
      }
    }

    </script>
 
<div id="divMain" style="position: relative; top: 0px;">
<asp:Button ID="HiddenButton" Text="" OnClick="HiddenButton_Click"
  runat="server" Visible="False" />

....



in the code (inside a delete event of a radgrid)
RadWindowManager1.RadConfirm("Delete this Tender?", "confirmCallBackFn", 330, 180, Nothing, "Confirm")

...and

Protected Sub HiddenButton_Click(sender As Object, e As System.EventArgs) Handles HiddenButton.Click
...the actual code which deletes the Tender from the database
End Sub


While the RadConfirm does get executed, the radconfirm window is not appearing on the page.

Could you please point out my mistake?

Thanks






    


Dimitrios
Top achievements
Rank 1
 answered on 07 Oct 2014
2 answers
127 views
Hi all,
Please help me.
When i use RadCombobox control in filter the column, I get an error:
Selection out of range
Parameter name: value
Exception Details: System.ArgumentOutOfRangeException: Selection out of range
Parameter name: value

1. .aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="sm" runat="server"></asp:ScriptManager>
            <telerik:RadGrid ID="RadGrid1" ShowGroupPanel="false" runat="server" AutoGenerateColumns="False" AllowFilteringByColumn="true" PageSize="3" EnableLinqExpressions="true">
                <ClientSettings>
                    <Resizing AllowColumnResize="true" EnableRealTimeResize="true" />
                    <Scrolling AllowScroll="true" />
                </ClientSettings>
                <MasterTableView>
                    <ColumnGroups>
                        <telerik:GridColumnGroup Name="Left" HeaderText="LEFT" HeaderStyle-HorizontalAlign="Center">
                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                        </telerik:GridColumnGroup>
                        <telerik:GridColumnGroup Name="Center" HeaderText="CENTER" ParentGroupName="Left"></telerik:GridColumnGroup>
                        <telerik:GridColumnGroup Name="Right" HeaderText="RIGHT" ParentGroupName="Left"></telerik:GridColumnGroup>
                    </ColumnGroups>
                    <Columns>
                        <telerik:GridBoundColumn DataField="A" HeaderText="AAA" HeaderStyle-HorizontalAlign="Center" ColumnGroupName="Left">
                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                            <FilterTemplate>
                                <telerik:RadComboBox ID="cbFilterUserSPIMI" AppendDataBoundItems="true" runat="server"
                                    Height="150px" Width="110px" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("A").CurrentFilterValue %>'
                                    OnClientSelectedIndexChanged="IndexChangedUserSPIMI" OnInit="cbFilterUserSPIMI_Init">
                                    <Items>
                                        <telerik:RadComboBoxItem Text="All" />
                                    </Items>
                                </telerik:RadComboBox>
                                <telerik:RadScriptBlock ID="RDFilterScriptBlockUserSPIMI" runat="server">
                                    <script type="text/javascript">
                                        function IndexChangedUserSPIMI(sender, args) {
                                            var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID%>");
                                            tableView.filter("A", args.get_item().get_value(), "EqualTo");
                                        }
                                    </script>
                                </telerik:RadScriptBlock>
                            </FilterTemplate>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="B" HeaderText="BBB" HeaderStyle-HorizontalAlign="Center" ColumnGroupName="Left">
                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                            <FilterTemplate>
                                <telerik:RadComboBox ID="cbFilterB" AppendDataBoundItems="true" runat="server" Height="150px" Width="110px"
                                    SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("B").CurrentFilterValue %>' OnClientSelectedIndexChanged="IndexChangeBBB"
                                    OnInit="cbFilterB_Init">
                                    <Items>
                                        <telerik:RadComboBoxItem Text="All" />
                                    </Items>
                                </telerik:RadComboBox>
                                <telerik:RadScriptBlock ID="RDBlockforB" runat="server">
                                    <script type="text/javascript">
                                        function IndexChangeBBB(sender, args) {
                                            var tableView = $find("<%#((GridItem)Container).OwnerTableView.ClientID%>");
                                            tableView.filter("B", args.get_item().get_value(), "EqualTo");
                                        }
                                    </script>
                                </telerik:RadScriptBlock>
                            </FilterTemplate>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="C" HeaderText="CCC" HeaderStyle-HorizontalAlign="Center" ColumnGroupName="Center">
                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="D" HeaderText="DDD" HeaderStyle-HorizontalAlign="Center" ColumnGroupName="Right">
                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="E" HeaderText="EEE" HeaderStyle-HorizontalAlign="Center" ColumnGroupName="Right">
                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
        </div>
    </form>
</body>
</html>

2. codebehind

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

namespace WebApplication1
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            RadGrid1.DataSource = GetDB();
            RadGrid1.DataBind();
        }

        protected DataTable GetDB()
        {
            DataTable dtb = new DataTable();

            dtb.Columns.Add("A", typeof(string));
            dtb.Columns.Add("B", typeof(string));
            dtb.Columns.Add("C", typeof(string));
            dtb.Columns.Add("D", typeof(string));
            dtb.Columns.Add("E", typeof(string));

            DataRow dr;

            for (int i = 0; i < 3; i++)
            {
                dr = dtb.NewRow();

                if (i < 1)
                {
                    dr[0] = @"Demo-A\abc";
                    dr[1] = "BBB Demo";
                    dr[2] = "Demo CCC";
                    dr[3] = "DDD Demo";
                    dr[4] = "Demo EEE";
                }
                else if (i == 1)
                {
                    dr[0] = "A/u1010";
                    dr[1] = "BBB*/u2020";
                    dr[2] = "Admid/CCC";
                    dr[3] = "DDD/&^u8080";
                    dr[4] = @"U5050\EEE";
                }
                else if (i == 2)
                {
                    dr[0] = "*&^%\u1011010";
                    dr[1] = "BBB/&^%$#@";
                    dr[2] = "$$$$$/CCC";
                    dr[3] = @"DDD\U56565656%";
                    dr[4] = "EEE/***(((";
                }

                dtb.Rows.Add(dr);
            }

                return dtb;
        }

        string temp = string.Empty;

        protected void cbFilterUserSPIMI_Init(object sender, EventArgs e)
        {

            RadComboBox combo = sender as RadComboBox;
            combo.DataSource = this.GetDB().AsEnumerable().Select(row => row.Field<string>("A")).Where(s => !string.IsNullOrEmpty(s)).Distinct().OrderBy(s => s);
        }

        protected void cbFilterB_Init(object sender, EventArgs e)
        {
            RadComboBox combo = sender as RadComboBox;
            combo.DataSource = this.GetDB().AsEnumerable().Select(row => row.Field<string>("B")).Where(s => !string.IsNullOrEmpty(s)).Distinct().OrderBy(s => s);
        }

    }
}

Thank you very much
Hung
Top achievements
Rank 1
 answered on 07 Oct 2014
1 answer
84 views
I have a RibbonBarSplitButton containing three RibbonBarButton items. If I set the SplitButton to enabled and the child Buttons to disabled, the SplitButton uses the disabled image, even though the control itself is enabled.

If I dynamically set the first button to enabled, the SplitButton image is not updated and still shows as disabled. After enabling the child button, I have to disable the SplitButton and then re-enable it for its image to change.

Is this a bug or am I missing something in how the controls are supposed to interact?

I am on Q2 2014 SP1

<telerik:RibbonBarSplitButton ID="testSplit" Text="Split Button" Size="Large" ImageUrlLarge="Enabled.png"
    DisabledImageUrlLarge="Disabled.png" ImageRenderingMode="Dual" Enabled="true" >
    <Buttons>
        <telerik:RibbonBarButton ID="testSub1" Text="Option 1" ImageUrl="MyIcon.png"
            DisabledImageUrl="MyIconDis.png" Enabled="false" Value="alert('Option 1 clicked')" />
        <telerik:RibbonBarButton ID="testSub2" Text="Option 2" ImageUrl="MyIcon.png"
            DisabledImageUrl="MyIconDis.png" Enabled="false" Value="alert('Option 2 clicked')" />
    </Buttons>
</telerik:RibbonBarSplitButton>
.
Derek
Top achievements
Rank 1
 answered on 06 Oct 2014
2 answers
171 views
Hello, I recently upgraded my Telerik project from .NET 4.0 to 4.5.1.
I' m having a lot of issues with jQuery.
Basically the following piece of markup 

    <telerik:RadScriptManager ID="_scriptManager" runat="server">
        <Scripts>
            <asp:ScriptReference Name="jquery" />
        </Scripts>
    </telerik:RadScriptManager>

in .NET 4.0 renders the jquery include, but in .NET 4.5 renders nothing, no jquery.

The only workaround I fond is to use the embedded Telerik jQuery.

    <telerik:RadScriptManager ID="_scriptManager" runat="server">
    </telerik:RadScriptManager>
    <script type="text/javascript">
        window.jQuery = window.$ = $telerik.$;
    </script>

Slav
Telerik team
 answered on 06 Oct 2014
2 answers
155 views
I recently implemented the SQL UDF/CLR solution found in this thread to help me with recurrence parsing:

http://blogs.telerik.com/aspnet-ajax/posts/08-08-04/working-with-radscheduler-recurring-appointments-on-sql-server.aspx

I am now getting the following error when running the store procedure that uses the UDF:

"Failed to open malformed assembly 'mscorlib' with HRESULT 0x80070008."

The error is directly related to the SP attempting to call the UDF.

I've included a copy of the stored procedure that is throwing the error.

Any ideas on what might be causing the issue?

CREATE PROCEDURE [dbo].[sp_Events_GetNext10EventsIncludeRecurring]
 
AS
BEGIN
    SET NOCOUNT ON;
 
    DECLARE @StartDate  DATETIME;
    DECLARE @EndDate    DATETIME;
 
    SET @StartDate = CAST(CONVERT(VARCHAR,GETDATE(),21) AS DATETIME);
    SET @EndDate = CAST(CONVERT(VARCHAR,GETDATE()+365,21) AS DATETIME);
     
-- List all appointments (recurring or not) in the given range
SELECT TOP 10 a.[EventID] as [EventID], a.[EventName] as [EventName], a.[Description] as [Description], a.[Location], ISNULL(o.StartDate, a.[StartDateTime]) as [StartDateTime], ISNULL(o.EndDate, a.[EndDateTime]) as [EndDateTime], a.[RecurrenceRule] as [RecurrenceRule], a.[RecurrenceParentID] as [RecurrenceParentID], a.[EventTypeID] as [EventTypeID], a.[EventType] as [EventType], a.[EventCategoryID] as [EventCategoryID], a.[EventCategory] as [EventCategory], a.[VenueID] as [VenueID], a.[VenueName] as [VenueName], a.[IsCityVenue] as [IsCityVenue], a.[RSVP] as [RSVP], a.[MinAttendees] as [MinAttendees], a.[MaxAttendees] as [MaxAttendees], a.[Notes] as [Notes], a.[AddedBy] as [AddedBy], a.[EditedBy] as [EditedBy], a.[DateAdded] as [DateAdded], a.[LastEdited] as [LastEdited], a.[Status] as [Status]
FROM    [vw_Details_Events_Active] a
    OUTER APPLY [dbo].[ExpandRecurrence](a.[RecurrenceRule], @Startdate, @EndDate) AS o
WHERE  
        -- Include non-recurring appointments in the range
        (a.[RecurrenceRule] IS NULL AND a.[StartDateTime] < @EndDate AND a.[EndDateTime] > @StartDate) OR
        -- And recurring appointments in range.
        (a.[RecurrenceRule] IS NOT NULL AND o.[StartDate] < @EndDate AND o.[EndDate] > @StartDate)
ORDER BY [StartDateTime]
 
 
END


Randy
Top achievements
Rank 1
 answered on 06 Oct 2014
2 answers
185 views
Hello,

I am working on a project with a RadMenu.
The RadMenuItem opens on mouse-click. It closes on any of the following: mouse-click on itself,
mouse-click on the screen, mouse-click on a different RadMenuItem inside the same RadMenu.

However, I have found a problem in this functionality:
First mouse-click - RadMenuItem opens.
Second mouse-click - RadMenuItem closes.
Third mouse-click - does nothing (should open again).
Fourth mouse-click - RadMenuItem opens again...

The problem is: why is it not responding to the third mouse-click?!
[Attached Video]

ASP.NET Code: 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
  
                function ExternalitemOpened(s, e) {
                    if ($telerik.isIE8) {
                        // Fix an IE 8 bug that causes the list bullets to disappear (standards mode only)
                        $telerik.$("li", e.get_item().get_element())
                            .each(function () { this.style.cssText = this.style.cssText; });
                    }
                }
  
  
  
  
                function External_MouseOver(sender, args) {
                    if (args.get_item().get_parent() == sender) {
                        sender.set_clicked(false);
                    }
                }
  
  
                function ExternalOnClientItemClicking(sender, args) {
                    if (args.get_item().get_isOpen() == true) {
                        args.set_cancel(true);
                        args.get_item().close();
                    }
                }
  
  
  
  
            </script>
        </telerik:RadCodeBlock>
 
<telerik:RadMenu ID="RadMenu_SpecialReport" runat="server" ClickToOpen="True" EnableShadows="True" OnClientItemOpened="ExternalitemOpened" OnClientItemClicking="ExternalOnClientItemClicking" OnClientMouseOut="External_MouseOver" Style="top: 0px; left: -2px; z-index: 100; height: 35px;" Skin="ExternalGridButtons" EnableEmbeddedSkins="false">
                <Items>
                    <telerik:RadMenuItem PostBack="true" Text="Special Reports" Value="Special_Reports" CssClass="btn  btn-primary btn-menu-grid-size">
                        <ContentTemplate>
                            <div id="Special_panel" class="Special_panel" style="width:300px; height:500px; background-color:white;">
  
                                <telerik:RadAjaxPanel ID="RadAjaxPanel_SpecialReport" runat="server"  Width="80%"></telerik:RadAjaxPanel>
                                <telerik:RadButton ID="btn_ShowSpecialReport" runat="server" Text="Show Special Report" Skin="Web20" CssClass="btn_Sort" OnClick="btn_ShowSpecialReport_Click"></telerik:RadButton>
                            </div>
                        </ContentTemplate>
                    </telerik:RadMenuItem>
                     <telerik:RadMenuItem PostBack="true" Text="zzzz" Value="zzzzz" CssClass="btn  btn-primary btn-menu-grid-size">
                        <ContentTemplate>
                            <div id="Div1" class="Special_panel" style="width:300px; height:500px; background-color:white;">
  
                                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"  Width="80%"></telerik:RadAjaxPanel>
                                <telerik:RadButton ID="RadButton2" runat="server" Text="Show Special Report" Skin="Web20" CssClass="btn_Sort" OnClick="btn_ShowSpecialReport_Click"></telerik:RadButton>
                            </div>
                        </ContentTemplate>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem IsSeparator="true"></telerik:RadMenuItem>
                </Items>
            </telerik:RadMenu>



How to solve this?

Thank you,
Daniel.
Daniel
Top achievements
Rank 1
 answered on 06 Oct 2014
4 answers
570 views
I am receiving the the following error on the  rad combobox.  The combobox is contained within a tooltip.  The actual tooltip is a user control.  I am also using a master page.  The tooltip works fine without the combobox.

When ever I click the combo box, in the tooltip, you see the combo box expand behind the tooltip and the following error pops up.

Attached is the error message screenshot.

I can't seem to get any rad control to work in the tooltips without showing behind the tooltips.  The combo box is the only one that has caused an error.  The other rad controls just show behind the tooltip without errors.

I have the same rad combobox on a child page and it works fine....  except that as soon as the dropdown is shown, the textbox looses focus.

Below is the user control code that I have in the tooltip.

Please let me know what I'm doing wrong and I thank you in advance for any help.

Thanks,

-eric

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="mw_ora_prnt_acct_info.ascx.cs" Inherits="Telerik.Web.Examples.ToolTip.ToolTipVersusToolTipManager.InfoCustomers" %>
 
<asp:Panel ID="cust_info_pnl" runat="server">
     
    <asp:Table ID="cust_info_tbl" runat="server" Width="500px">
        <asp:TableRow>
            <asp:TableCell ColumnSpan="2" style="font:20px Yanone Kaffeesatz;color:Black;border-bottom:1px solid Black;text-align:left;">Company Information</asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right">Company Name:</asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"><asp:TextBox ID="prnt_acct_name_txt" Width="300px" runat="server" CssClass="txtbox"></asp:TextBox></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right">Account Type:</asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"><asp:DropDownList ID="acct_type_drp" runat="server" CssClass="txtbox">
                                                              <asp:ListItem Value="EMPLOYER">EMPLOYER</asp:ListItem>
                                                              <asp:ListItem Value="NONE">NONE</asp:ListItem>
                                                              <asp:ListItem Value="PHYSICIAN NETWORK">PHYSICIAN NETWORK</asp:ListItem>
                                                              </asp:DropDownList> </asp:TableCell>
        </asp:TableRow>       
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right">WW Contract Date:</asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"><asp:TextBox ID="acct_cntrct_date_txt" Width="75px" runat="server" ReadOnly="true" BackColor="LightSlateGray" CssClass="txtbox"></asp:TextBox></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right">ES Follow-Up Date:</asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"><asp:TextBox ID="fu_date_txt" Width="75px" runat="server" CssClass="txtbox"></asp:TextBox></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right">ES Priority:</asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"><asp:DropDownList ID="es_priority_drp" runat="server" CssClass="txtbox">
                                                              <asp:ListItem Value="6TH">6TH</asp:ListItem>
                                                              <asp:ListItem Value="5TH">5TH</asp:ListItem>
                                                              <asp:ListItem Value="4TH">4TH</asp:ListItem>
                                                              <asp:ListItem Value="3RD">3RD</asp:ListItem>
                                                              <asp:ListItem Value="2ND">2ND</asp:ListItem>
                                                              <asp:ListItem Value="1ST">1ST</asp:ListItem>
                                                              </asp:DropDownList></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell ColumnSpan="2" style="font:20px Yanone Kaffeesatz;color:Black;border-bottom:1px solid Black;text-align:left;">Carrier Information</asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right"></asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"> </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right">Insurance Carrier:</asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"><asp:TextBox ID="ins_carrier_txt" Width="300px" runat="server" CssClass="txtbox"></asp:TextBox>
                                                                
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell> </asp:TableCell>
            <asp:TableCell><telerik:RadComboBox ID="ins_carrier_combo" runat="server" Height="200" Width="640"
                                                            DropDownWidth="720" EmptyMessage="Choose a Carrier" HighlightTemplatedItems="true"
                                                            EnableLoadOnDemand="true" Filter="StartsWith" OnItemsRequested="ins_carrier_combo_ItemsRequested"
                                                             OnAjaxUpdate="OnAjaxUpdate">
                                                            <HeaderTemplate>
                                                                <table style="width: 670px" cellspacing="0" cellpadding="0">
                                                                    <tr>
                                                                        <td style="width: 550px;">
                                                                            Carrier Name
                                                                        </td>
                                                                        <td style="width: 120px; text-align: left;">
                                                                            Account Number
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <table style="width: 670px" cellspacing="0" cellpadding="0">
                                                                    <tr>                                                                                                                                       
                                                                        <td style="width: 550px;">
                                                                            <%# DataBinder.Eval(Container, "Attributes['ACCOUNT_NAME']")%>
                                                                        </td>
                                                                        <td style="width: 120px; text-align: left;">
                                                                            <%# DataBinder.Eval(Container, "Attributes['ACCOUNT_NUMBER']")%>
                                                                        </td>
                                                                    </tr>      
                                                                </table>
                                                            </ItemTemplate>
                                                        </telerik:RadComboBox></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right">Carrier Renewal Date:</asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"><asp:TextBox ID="renewal_date_txt" Width="75px" runat="server" CssClass="txtbox"></asp:TextBox></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right">Broker Code:</asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"><asp:TextBox ID="broker_code_txt" Width="35px" runat="server" CssClass="txtbox"></asp:TextBox></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right"></asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"> </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell ColumnSpan="2" style="font:20px Yanone Kaffeesatz;color:Black;border-bottom:1px solid Black;text-align:left;">Misc Information</asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right">Ancillary Services:</asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"><asp:DropDownList ID="ancil_svcs_drp" runat="server" CssClass="txtbox">
                                                              <asp:ListItem Value="Y">YES</asp:ListItem>
                                                              <asp:ListItem Value="N">NO</asp:ListItem>
                                                              </asp:DropDownList></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right">Alternate PT:</asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"><asp:DropDownList ID="alt_pt_drp" runat="server" CssClass="txtbox">
                                                              <asp:ListItem Value="Y">YES</asp:ListItem>
                                                              <asp:ListItem Value="N">NO</asp:ListItem>
                                                              </asp:DropDownList></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right">Alternate RX:</asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"><asp:DropDownList ID="alt_rx_drp" runat="server" CssClass="txtbox">
                                                              <asp:ListItem Value="Y">YES</asp:ListItem>
                                                              <asp:ListItem Value="N">NO</asp:ListItem>
                                                              </asp:DropDownList></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right">Alternate DX:</asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"><asp:DropDownList ID="alt_dx_drp" runat="server" CssClass="txtbox">
                                                              <asp:ListItem Value="Y">YES</asp:ListItem>
                                                              <asp:ListItem Value="N">NO</asp:ListItem>
                                                              </asp:DropDownList></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell ColumnSpan="2" style="font:20px Yanone Kaffeesatz;color:Black;border-bottom:1px solid Black;text-align:left;">Account Status</asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right">Status:</asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"><asp:DropDownList ID="acct_status_drp" runat="server" CssClass="txtbox" OnSelectedIndexChanged="acct_status_chngd" AutoPostBack="true">
                                                              <asp:ListItem Value="A">ACTIVE</asp:ListItem>
                                                              <asp:ListItem Value="I">INACTIVE</asp:ListItem>
                                                              </asp:DropDownList></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow ID="acct_inactive_row" runat="server" Visible="false">
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right">Try To Get Back:</asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Left"><asp:DropDownList ID="inactive_try_to_bet_bck_drp" runat="server" CssClass="txtbox">
                                                              <asp:ListItem Value="-">  MAKE A SELECTION  </asp:ListItem>
                                                              <asp:ListItem Value="Y">YES - AT NEXT RENEWAL</asp:ListItem>
                                                              <asp:ListItem Value="N">NO</asp:ListItem>
                                                              </asp:DropDownList></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell Width="150px" Wrap="false" HorizontalAlign="Right"></asp:TableCell>
            <asp:TableCell Wrap="false" HorizontalAlign="Right">
                    <telerik:radbutton id="submit_srch_btn" runat="server" text="UPDATE" Width="50"  OnClick="acct_update_submit"/> <telerik:radbutton id="cancel_update_btn" runat="server" text="CANCEL" Width="50" OnClick="acct_update_cancel"/>
            </asp:TableCell>
        </asp:TableRow>         
    </asp:Table>
 
     
</asp:Panel>


using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Oracle.DataAccess.Client;
using Telerik.Web.UI;
 
namespace Telerik.Web.Examples.ToolTip.ToolTipVersusToolTipManager
{
    public partial class InfoCustomers : System.Web.UI.UserControl
    {
        private string _party_id;
 
        public string Party_ID
        {
            get { return _party_id; }
            set { _party_id = value; }
        }
 
        protected void Page_PreRender(object sender, EventArgs e)
        {
            get_acct_info();   
 
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            cust_info_pnl.Visible = true;        
        }
 
        private OracleConnection CreateConnection()
        {
            string ora_db = "Data Source=(DESCRIPTION="
                                        + "(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx.xxx.xxx.xxx)(PORT=xxxx)))"  //test server
                                        + "(CONNECT_DATA=(SERVICE_NAME=xxxx)));"
                                        + "User Id=xxxx;Password=xxxx;";
            return new OracleConnection(ora_db);
        }
 
        
 
        protected void acct_update_submit(object sender, EventArgs e)
        {
         
        }
 
        protected void acct_update_cancel(object sender, EventArgs e)
        {           
            get_acct_info();
        }
 
        protected void acct_status_chngd(object sender, EventArgs e)
        {
            if (acct_status_drp.SelectedValue == "A")
            {
                acct_inactive_row.Visible = false;
            }
            else
            {
                acct_inactive_row.Visible = true;
            }
        }
 
        protected void get_acct_info()
        {
 
            OracleConnection conn = CreateConnection();
            try
            {
                conn.Open();
 
 
                DataTable information = new DataTable();
 
                try
                {
                    string sql = "SELECT PARTY_NAME, ATTRIBUTE_CATEGORY, ATTRIBUTE1 ,ATTRIBUTE2, ATTRIBUTE3,ATTRIBUTE4 ,ATTRIBUTE5 ,ATTRIBUTE6 ,ATTRIBUTE7 ,ATTRIBUTE9 ,ATTRIBUTE10 ,ATTRIBUTE11 "
                                + " FROM AR.HZ_PARTIES "
                                + " WHERE PARTY_TYPE = 'ORGANIZATION' "
                                + "           AND ATTRIBUTE_CATEGORY = 'EMPLOYER' "
                                + "           AND PARTY_ID = " + _party_id;
 
                    OracleCommand cmd = new OracleCommand(sql, conn);
                    OracleDataReader dr3 = cmd.ExecuteReader();
 
                    if (dr3.Read())
                    {
                        prnt_acct_name_txt.Text = Convert.ToString(dr3.GetValue(0));
                        acct_type_drp.SelectedValue = Convert.ToString(dr3.GetValue(1));
                        acct_cntrct_date_txt.Text = Convert.ToDateTime(dr3.GetValue(2)).ToString("dd-MMM-yyyy");
                        fu_date_txt.Text = Convert.ToDateTime(dr3.GetValue(3)).ToString("dd-MMM-yyyy");
                        es_priority_drp.SelectedValue = Convert.ToString(dr3.GetValue(9));
                        ins_carrier_txt.Text = Convert.ToString(dr3.GetValue(10));
 
                        ins_carrier_combo.Text = Convert.ToString(dr3.GetValue(10));
 
                        renewal_date_txt.Text = Convert.ToDateTime(dr3.GetValue(4)).ToString("dd-MMM-yyyy");
                        broker_code_txt.Text = Convert.ToString(dr3.GetValue(11));
                        ancil_svcs_drp.SelectedValue = Convert.ToString(dr3.GetValue(5));
                        alt_pt_drp.SelectedValue = Convert.ToString(dr3.GetValue(6));
                        alt_rx_drp.SelectedValue = Convert.ToString(dr3.GetValue(7));
                        alt_dx_drp.SelectedValue = Convert.ToString(dr3.GetValue(8));
 
                    }
 
                    dr3.Close();
                    dr3.Dispose();
                }
                finally
                {
 
                }
            }
            finally
            {
                if (conn.State == ConnectionState.Open)
                {
                    conn.Close();
                }
            }
 
        }
 
        protected void ins_carrier_combo_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
        {
            OracleDataAdapter adapter = new OracleDataAdapter("SELECT HP.PARTY_NAME, HCA.ACCOUNT_NAME, HCA.ACCOUNT_NUMBER, HCA.CUST_ACCOUNT_ID "
                                                                + " FROM AR.HZ_CUST_ACCOUNTS HCA  "
                                                                + "      INNER JOIN AR.HZ_PARTIES HP ON HP.PARTY_ID = HCA.PARTY_ID "
                                                                + " WHERE HCA.ATTRIBUTE_CATEGORY = 'INSURANCE CARRIER' AND "
                                                                + "       HCA.STATUS = 'A' AND "
                                                                + "       HCA.ACCOUNT_NAME LIKE '" + e.Text.ToUpper() + "%' "
                                                                + " ORDER BY ACCOUNT_NUMBER ",
                ConfigurationManager.ConnectionStrings["oracle_db"].ConnectionString);
 
            DataTable dataTable = new DataTable();
            adapter.Fill(dataTable);
 
            foreach (DataRow dataRow in dataTable.Rows)
            {
                RadComboBoxItem item = new RadComboBoxItem();
 
                item.Text = (string)dataRow["ACCOUNT_NAME"];
                item.Value = dataRow["CUST_ACCOUNT_ID"].ToString();
 
                string unitPrice = (string)dataRow["ACCOUNT_NAME"];
                string unitsInStock = (string)dataRow["ACCOUNT_NUMBER"];
 
                item.Attributes.Add("ACCOUNT_NAME", unitPrice.ToString());
                item.Attributes.Add("ACCOUNT_NUMBER", unitsInStock.ToString());
 
                ins_carrier_combo.Items.Add(item);
 
                item.DataBind();
            }
        }
 
    }
}
Marin Bratanov
Telerik team
 answered on 06 Oct 2014
1 answer
201 views
Hi All,

As this control shares the design of the RadTreeView I have found that if I change the color of the text on that via CSS I also end up changing the CSS of all the text on the Drop down Trees.

I am using .RadTreeView_Black to access the normal TreeView.  What CSS should I also use to access the drop down TreeView text,  I have tried things like .rddtPopup_Black .RadTreeView .RadTreeView_Black span with no luck.,

Regards

Jon
Magdalena
Telerik team
 answered on 06 Oct 2014
1 answer
86 views
Hello team Telerik,
Can we give Selection and Deletion option on Image Editor ?

what is want is:

i added a text element on rad image editor , then i want to edit it after insertion .(suppose modify a phone number in it), so what should i do is i select only that phone number area and delete it paste a new text element on its place with new phone number and save it as an image.

can we achieve it (By any means,approach.)
if yes then please post a demo , if no then how will i edit my data after insertion in RadImageEditor.

----------------------------------------------------------------------------------------------------------------------------------- 
Vessy
Telerik team
 answered on 06 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?