Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
92 views
Hey,
I'm trying to open two radWindows on two different radButtons click event from server side using the following code:
newwindow1.ID = "RadWindow1";
               newwindow1.DestroyOnClose = true;
               newwindow1.NavigateUrl = "~/DocRelationBrowser.aspx?userid=" + user.UserID.ToString() + "&verid=" + selectedVersion.versionID.ToString() + "&rela=" + 0;
               newwindow1.VisibleOnPageLoad = true;
               newwindow1.AutoSize = true;
               RadWindowManager1.Windows.Add(newwindow1);

But the problem is the first time I hit button1-> everything go just fine.
the first time I hit button2->both windows open (the one that button1 should open and the one button2 should open)!!
How can I avoid that?
Shaza
Top achievements
Rank 1
 answered on 17 Aug 2011
1 answer
101 views
Hi all,
Please advise, how to show data in same indentation in ListView?
I want to show in 3 Columns(only one field of DataTable), and should be save indentation.
My current UI is as below and it doesn't look good.

Here it is my HTML
<telerik:RadListView ID="rlvBLNo" runat="server"  ItemPlaceholderID="BLNoHolder" Skin="Office2007" >
    <LayoutTemplate>
       <fieldset class="RadListView RadListView_Office2007"  style="width:400px;padding:0px 0px 0px 0px; margin:0px 0px 0px 0px;">
         <legend style="font-weight:bold;">BL Number</legend>
         <asp:Panel ID="BLNoHolder" runat="server" />
       </fieldset>
    </LayoutTemplate>
    <ItemTemplate>
       <%# Eval("bl_no")%>
    </ItemTemplate>
    <ItemSeparatorTemplate>
       <span >   </span>
    </ItemSeparatorTemplate>
</telerik:RadListView>

Thanks :)
Naunton
Top achievements
Rank 1
 answered on 17 Aug 2011
3 answers
447 views
This is my first time using telerik controls. I am using gridview with grouping enabled.I am changing gridview row color programmatically but after grouping , if I expand or collapse groups it changes the bgcolor to default.eher is my code:-
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/ITIMaster.Master" CodeBehind="EmailList.aspx.vb" Inherits="EmailAlertsMonitor.EmailList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:HiddenField ID="hdAlertState" runat ="server" />
    <telerik:RadGrid ID="gvEmailList" runat="server" 
        AllowSorting="True" CellSpacing="0" DataSourceID="SqlDataSource1" 
        GridLines="None" ShowGroupPanel="True" Skin="Outlook" >
        <ClientSettings AllowDragToGroup="True">
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
          
<MasterTableView AutoGenerateColumns="False" DataKeyNames="Alert_ID" 
            DataSourceID="SqlDataSource1">
         <GroupByExpressions >
            <telerik:GridGroupByExpression >
               <SelectFields >
                     <telerik:GridGroupByField FieldAlias ="Email_Subject" FieldName ="Email_Subject" />
               </SelectFields>
               <GroupByFields >
                     <telerik:GridGroupByField FieldName ="Email_Subject" HeaderText ="Subject" />
               </GroupByFields>
            </telerik:GridGroupByExpression>
         </GroupByExpressions>   
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
  
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
  
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
   
    <Columns>
        <telerik:GridBoundColumn DataField="Alert_State" 
            FilterControlAltText="Filter Alert_State column" HeaderText="Alert_State" 
            SortExpression="Alert_State" UniqueName="Alert_State" ItemStyle-Width ="50px">
<ItemStyle Width="50px"></ItemStyle>
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Email_Subject" 
            FilterControlAltText="Filter Email_Subject column" HeaderText="Email_Subject" 
            SortExpression="Email_Subject" UniqueName="Email_Subject" ItemStyle-Width ="200px">
<ItemStyle Width="200px"></ItemStyle>
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Email_Sender" 
            FilterControlAltText="Filter Email_Sender column" HeaderText="Email_Sender" 
            SortExpression="Email_Sender" UniqueName="Email_Sender" ItemStyle-Width ="100px">
<ItemStyle Width="100px"></ItemStyle>
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Email_DateReceived" 
            DataType="System.DateTime" 
            FilterControlAltText="Filter Email_DateReceived column" 
            HeaderText="Email_DateReceived" SortExpression="Email_DateReceived" 
            UniqueName="Email_DateReceived" ItemStyle-Width ="80px">
<ItemStyle Width="80px"></ItemStyle>
        </telerik:GridBoundColumn>
         
       <telerik:GridBoundColumn DataField="Alert_Level_Descr" 
            FilterControlAltText="Filter Alert_Level_Descr column" 
            HeaderText="Alert_Level_Descr" SortExpression="Alert_Level_Descr" 
            UniqueName="Alert_Level_Descr" ItemStyle-Width ="100px">
<ItemStyle Width="100px"></ItemStyle>
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Alert_Source" 
            FilterControlAltText="Filter Alert_Source column" HeaderText="Alert_Source" 
            SortExpression="Alert_Source" UniqueName="Alert_Source" ItemStyle-Width ="100px">
<ItemStyle Width="100px"></ItemStyle>
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Alert_Server" 
            FilterControlAltText="Filter Alert_Server column" HeaderText="Alert_Server" 
            SortExpression="Alert_Server" UniqueName="Alert_Server">
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn HeaderText ="" >
                <ItemTemplate >
                       <asp:HiddenField ID="hdColorCode" runat ="server" Value ='<%#EVAL("Alert_Level_Color_Code") %>' />
                </ItemTemplate>
        </telerik:GridTemplateColumn>
    </Columns>
  
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
  
<FilterMenu EnableImageSprites="False"></FilterMenu>
  
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:DBConnectionString %>" 
        SelectCommand="SELECT Alert_Emails.Alert_ID, Alert_Emails.Email_ToAddresses, Alert_Emails.Email_Sender, Alert_Emails.Email_DateReceived, Alert_Emails.Email_Subject, Alert_Emails.EMail_Body, Alert_Emails.Alert_Level, Alert_Emails.Alert_Source, Alert_Emails.Alert_Server, Alert_Emails.Alert_State, Alert_Level.Alert_Level AS Alert_Level_Descr, Alert_Level.Alert_Level_Color_Code FROM Alert_Emails INNER JOIN Alert_Level ON Alert_Emails.Alert_Level = Alert_Level.Alert_Level_ID WHERE (Alert_Emails.Alert_State = @alertState) ORDER BY Alert_Emails.Alert_Level, Alert_Emails.Email_DateReceived DESC">
        <SelectParameters>
            <asp:Parameter Name="alertState" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
Imports System.Drawing
Imports System.Data
Imports System.Data.SqlClient
Public Class EmailList
    Inherits System.Web.UI.Page
    Dim alertState As String
  
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Page.IsPostBack = False Then
            alertState = Request.QueryString("State")
            Me.hdAlertState.Value = alertState
            LoadGrid()
        End If
    End Sub
    Private Sub LoadGrid()
        SqlDataSource1.SelectParameters("alertState").DefaultValue = hdAlertState.Value
        SqlDataSource1.Select(DataSourceSelectArguments.Empty)
        gvEmailList.DataBind()
        
    End Sub
  
    Private Sub gvEmailList_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles gvEmailList.ItemDataBound
        If e.Item.ItemType = Telerik.Web.UI.GridItemType.Item Or e.Item.ItemType = Telerik.Web.UI.GridItemType.AlternatingItem Then
            Dim alertColorCode As String = DirectCast(e.Item.FindControl("hdColorCode"), HiddenField).Value
            e.Item.BackColor = Color.FromName(alertColorCode)
        End If
    End Sub
  
     
End Class
Tsvetina
Telerik team
 answered on 17 Aug 2011
3 answers
277 views
Hi, I'm using the Telerik default CDN, but when I run my site with HTTPS, the javascripts and skins files are being loaded with HTTP. Any help would be greatly appreciated.
Simon
Telerik team
 answered on 17 Aug 2011
1 answer
95 views
Hi Telerik,

the Toolbar in IE9 is not working. The Same Toolbar works in Google Chrome.
I put up just an simple Toolbar with Bold and Italic.The Toolbar Buttons look like they are disabled (IE + Chrome).
There is no JavaScript Error (IE9 --> F12 DevTools --> Scripting)
The Setting of IE9 is:
- Empty Browsercache
- Security (Local Intranet) "lowest"
- So Scripting is enabled (Because of the Security Level)

What can be the Reason?

Regards
PS: Even when I remove the Tools Setting then I get the Default (big) Toolbar - and even this one is disabled.
So may I miss an basic setting, or something with the Code around is wrong.
The Editor is shown in an floating Div-Window
PPS: The looking like disabled happened because of an opacity Style. I can remove this, but still same happens
Dobromir
Telerik team
 answered on 17 Aug 2011
2 answers
192 views
I'm currently evaluating RadControls and am very impressed so far. After a couple days of playing with the controls Ive found a need to use the ImageManager dialog in a standalone form. Thanks to the robust support community telerik seems to have ive found this link http://www.telerik.com/support/kb/aspnet-ajax/editor/using-the-image-and-document-managers-outside-radeditor.aspx . Which definitely points me in the right direction. The problem i have is there doesnt seem to be a way to install a front-end control for the RadDialogOpener. The control does not appear in my Toolbox with the rest of the controls and it doesnt show up using intellisense when i try adding a control using the telerik tagprefix. I can see the RadDialogOpener class in object explorer and it appears to be in the telerik.web.ui namespace which is registered in my webconfig and seems to give me access to the rest of the controls. The sample looks like what i need, I just cant replicate it because its using a telerik:DialogOpener control that i cant seem to find. Any help would be appreciated and Im all but sold on the product already, very impressive set of controls.

Thanks,

Dave
Dobromir
Telerik team
 answered on 17 Aug 2011
1 answer
319 views
I have a rad combo box that I bind in my code with a data table. Whenever I select an item and then click out of the combo box, it doesn't keep the item I had picked selected. You can see my problem here http://michael.sprayapplications.com/temp.aspx . Just pick an item and then click out of the dropdown. Here is my aspx code

<telerik:RadComboBox ID="salesInput" runat="server" Width="200px" MarkFirstMatch="true">
</telerik:RadComboBox>

here's my vb code behind and the function it calls
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
        If (Not Page.IsPostBack) Then
            'populate the dropdown
            Dim tableOfData As DataTable = MyFunctions.createCrewDeleteTable()
            salesInput.DataSource = tableOfData
            salesInput.DataTextField = "Salesman"
            salesInput.DataValueField = "CrewId"
 
            salesInput.DataBind()
        End If
End Sub

And the function
    'this function gets the data for the crew dropdown
    'this sub returns a data table to bind to the dropdown
    Public Shared Function createCrewDeleteTable()
 
        'a new data table
        Dim table As DataTable = New DataTable()
        table.Columns.Add("Salesman")
        table.Columns.Add("CrewId")
 
        Dim type
 
        'my sql connection
        Dim myConn As New Data.SqlClient.SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("connection").ToString)
 
        'the name of the stored procedure
        Dim strSQL = "select FirstName+' '+LastName as Name, CrewType, CrewId from Crew where Deleted <> 'yes' " & _
        "AND crewid > 1 order by LastName, Firstname"
 
        Try
 
            myConn.Open()
            Dim readCommand As New Data.SqlClient.SqlCommand(strSQL, myConn)
 
            'while we have rows from the stored procedure
            'we will add them to a data table
            Dim cdr As SqlDataReader = readCommand.ExecuteReader()
            While cdr.Read()
 
                If (cdr(1).ToString = "3") Then
                    type = "Salesman"
                ElseIf cdr(1).ToString = "2" Then
                    type = "Crew Chief"
                Else
                    type = "Crew"
                End If 'if cdr(2)
 
                If (cdr.Item(0).ToString <> "") Then
 
                    table.Rows.Add(New String() {cdr.Item(0) & " - " & type, cdr.Item(1)})
 
                End If
 
            End While 'while cdr.Read()
 
        Catch ex As Exception
 
        End Try
        myConn.Dispose()
 
        Return table
 
End Function



Cat Cheshire
Top achievements
Rank 1
 answered on 17 Aug 2011
1 answer
44 views
I have a radpane, and inside I have a splitter.

I have a custom jquery function that when an icon is clicked, it shows/hides a html table.   The problem is when the table is visible, a scrollbar appears.  How can I auto-expand the radpane section and auto-shrink when the html table is shown/hidden?
Marin Bratanov
Telerik team
 answered on 17 Aug 2011
1 answer
141 views
I'm trying to assign a ASPX page, which returns a streamed PDF, to a RadWindow.
This is working in Chrome and FF, but not in IE.

I have seen some threads in this forum about similar topics,
but still not clear to me if this is a supported scenario or not (-> it works).
And what would be the best solution.

Thanks for clarifying
Eric


Marin Bratanov
Telerik team
 answered on 17 Aug 2011
1 answer
71 views
Hi all,

I was wondering if there was a form of custom dictionary that would allow the detection of common abbreviations and suggest their expanded version.

For example.

IBM    International Business Machines
mph    miles per hour

etc etc.

As it's not really a phoenetic expansion, I'm not sure where to start.


Thanks,


Alan
Marin Bratanov
Telerik team
 answered on 17 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?