Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
240 views
Hi,

I am running into the dreaded "A script is causing IE to run slowly" problem with expand and collapse all.  There are about 4000 items in the tree, but only about 50 or so are not leaf items.

Expand/Collapse all sample
http://www.telerik.com/help/aspnet-ajax/tree_clientexpandingcollapsing.html

I have tried both of these with no luck
http://www.telerik.com/help/aspnet-ajax/troubleshooting-treeview-script-causes-ie-run-slowly.html

Any other suggestions for getting this to not time out?  I have the same tree using Dyanmic Drive Simple Tree menu (http://www.dynamicdrive.com/dynamicindex1/navigate1.htm) and it is able to expand and collapse all just fine.

TIA
Nikolay Tsenkov
Telerik team
 answered on 06 Oct 2010
0 answers
102 views
Hello Admin,

                 I'm calling a webservice method from radcombobox.
Due to slow internet speed, the Getmethod is failed to access the method.

How can I rectify this problem.

Please help me.

With regards,
Arul kumar

    
Arul
Top achievements
Rank 1
 asked on 06 Oct 2010
2 answers
111 views
Hi i am using rad scheduler in my business application.

My requirement is to modfiy the template which appears on pop up after clicking New appointment. After going thrigh some articles i came to know that i can write the contents in <AdvancedInsertTemplate>. For this i refered sample code on your site. I created a user control and then inherited the same in  AdvancedInsertTemplate as per the example given. Everything works properly except when i click the New appointment button a window pops open in scheduler rad pane and calendar rad pane remains as it is. I want to open the popup on entire page and not in rad pane.

I searched throufh several forums and kb's to find solution but couldn't quite get the one. Any help in this regards will be appreciable. 
Sachin
Top achievements
Rank 1
 answered on 06 Oct 2010
4 answers
318 views

If I have:

var radGrid = (RadGrid)source;

 

 

var selectedValue = radGrid.SelectedValue.ToString();

 

 

(it happens to be an int)

And if I then throw that selectedValue to another grid on another page view a querystring redirect, what's the most efficient way to select the relevant grid row (supposing that row exists with the equivalent value) given that SelectedValue doesn't have a Set accessor?

Thanks,
Richard

 

Richard Weeks
Top achievements
Rank 2
 answered on 06 Oct 2010
15 answers
811 views
Currently, I'm changing the color of different calendars using something to the effect of:

e.Appointment.CssClass = <css color>

However, I would like to set this based on an ARGB color that I'm getting through the rad ColorPicker. How would I go about doing this?
sirishagundala
Top achievements
Rank 1
 answered on 06 Oct 2010
1 answer
119 views
 I am trying to add dynamic text boxes inside of a edit form popup from radgrid, in a manner where a user can hit "add new text box" button and another text box for data entry would appear. I Have found a sample of code that does this in VB I am looking for some guidance on how this can be accomplished in the edit form template  

Princy
Top achievements
Rank 2
 answered on 06 Oct 2010
0 answers
92 views
Hi All,

I have a requirement of accessing the datasource of the RadGrid on the Client side , Since i do some on the fly calculations. I need to fetch those values to be saved in the database. It is very urgent.

(Note : I am using Q3 2008 Version of the telerik)

Thanks in Advance,
Arun Prasad.S
Arun
Top achievements
Rank 1
 asked on 06 Oct 2010
2 answers
92 views
Hi EveryBody, 
                         I have a RadGrid with ten Template columns in that only one column is visible at a time.
                         I want find which column is visible in the grid in another User Defined Function(not in any grid events).
                         Any one please give an idea on this.

Thank You
Anto-
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
 answered on 06 Oct 2010
11 answers
297 views
Hi Everyone,

Is it possible to disable/enable command items of master table when it is expanded? If yes, How?

Attached is the UI for reference.

Thanks!
Zel
zel
Top achievements
Rank 1
 answered on 06 Oct 2010
3 answers
320 views
Hi ... following problem: I have a grid, in which I want display 2 different tooltips (ascx-pages)... to realize this, I must rebind the grid after closing. if not, the tooltip always shows the first loaded ascx-page. is there a solution for this issue?

Here my code:
<%@ Page
    Language="C#"
    AutoEventWireup="true"
    CodeBehind="AssetEdit_Messaging.aspx.cs"
    Inherits="Sigma_Web.AssetEdit_Messaging" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Messagingcenter</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="ScriptManager1" runat="server"
        EnableTheming="True">
    </telerik:RadScriptManager>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server"></telerik:RadStyleSheetManager>
    
    <div
        style="
        vertical-align: middle;
        line-height: 34px;
        background-color: #BBD7FA;
        color: gray;
        font-weight: bold;
        font-size: 15pt;
        height: 34px;
        background-color: #BBD7FA;">
        <div style="float: left; vertical-align: middle">
            <asp:Image
                ID="IMG_HeaderRight" runat="server"
                AlternateText="L_AssetEdit_MSCImage" />
        </div>
        <div style="float: left; padding-left: 10px;">
            <asp:Label
                ID="Label2" runat="server"                 
                Text="L_AssetEdit_MSCMessagingCenter">
            </asp:Label>
        </div>
        <div style="float: right; padding-top: 6px;">
                <telerik:RadComboBox
                    ID="RadComboBox1" runat="server"
                    AutoPostBack="true"
                    Height="150px"
                    OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" DataTextFormatString="<nobr>{0}</nobr">
                    <Items>
                        <telerik:RadComboBoxItem Text="L_AssetEdit_MSC10seconds" Value="10000" />
                        <telerik:RadComboBoxItem Text="L_AssetEdit_MSC30seconds" Value="30000"/>
                        <telerik:RadComboBoxItem Text="L_AssetEdit_MSC60seconds" Value="60000" Selected="True" />
                        <telerik:RadComboBoxItem Text="L_AssetEdit_MSC120seconds" Value="1200000"/>
                        <telerik:RadComboBoxItem Text="L_AssetEdit_MSC240seconds" Value="2400000"/>
                        <telerik:RadComboBoxItem Text="L_AssetEdit_MSC0seconds" Value="0"/>
                    </Items>
                </telerik:RadComboBox>
            </div>
        <div style="float: right; padding-right: 10px;">
            <asp:Label
                ID="Label3" runat="server"
                Text="L_AssetEdit_MSCChangeTimerInterval"></asp:Label>
        </div>
    </div>
    
    <telerik:RadTabStrip
        ID="RadTabStrip1" runat="server"
        MultiPageID="RadMultiPage1"
        SelectedIndex="3"
        Skin="Office2007">
        <Tabs>
            <telerik:RadTab runat="server" PageViewID="PageView1" Text="L_AssetEdit_MSCComputer" Selected="True" />
            <telerik:RadTab runat="server" PageViewID="PageView2" Text="L_AssetEdit_MSCProducts" />
        </Tabs>
    </telerik:RadTabStrip>        
    
    <telerik:RadMultiPage
            ID="RadMultiPage1" runat="server"
            SelectedIndex="0">
            
    <telerik:RadPageView ID="PageView1" runat="server">        
        <telerik:RadGrid
            ID="RadGrid1" runat="server"
            GridLines="None"
            DataSourceID="SDS_MCComputer"
            AllowPaging="True"
            AllowSorting="True"
            AutoGenerateColumns="False" onitemdatabound="RadGrid1_ItemDataBound"
            onitemcommand="RadGrid1_ItemCommand" >
            <MasterTableView
                DataSourceID="SDS_MCComputer"
                AutoGenerateColumns="False"
                TableLayout="Fixed"
                DataKeyNames="Id, ComputerId, ProductId"
                PageSize="20">
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField
                                FieldAlias="Computername"
                                FieldName="ComputerName"
                                HeaderValueSeparator=": ">
                            </telerik:GridGroupByField>                            
                        </SelectFields>
                        <GroupByFields>                            
                            <telerik:GridGroupByField
                                FieldAlias="ComputerName"
                                FieldName="ComputerName"
                                HeaderValueSeparator=": "/>                            
                        </GroupByFields>
                    </telerik:GridGroupByExpression>                                
                </GroupByExpressions>
                <Columns>
                    <telerik:GridTemplateColumn                                 
                        ReadOnly="True" >
                        <ItemTemplate>
                            <asp:ImageButton
                                ID="IB_Tasks_More" runat="server"
                                ImageUrl="Img/16x16/shadow/information.png" />                                    
                        </ItemTemplate>
                        <HeaderStyle Width="5px"></HeaderStyle>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn
                        DataField="ComputerName"
                        HeaderText="L_AssetEdit_MSCComputerName"
                        SortExpression="ComputerName"
                        UniqueName="ComputerName"
                        DataFormatString="<nobr>{0}</nobr>">
                        <HeaderStyle Width="25px"></HeaderStyle>
                    </telerik:GridBoundColumn>                    
                    <telerik:GridTemplateColumn
                        HeaderText="L_AssetEdit_MSCProductName"
                        ReadOnly="True"
                        SortExpression="Product_InstName">
                        <ItemTemplate>
                            <asp:ImageButton
                                ID="IB_ProductStatus" runat="server"
                                ImageUrl="Img/16x16/shadow/information.png" />
                            <asp:Label
                                ID="LBL_ProductStatus" runat="server"
                                Text='<%# Eval("Product_InstName") %>'>
                            </asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Width="25px"></HeaderStyle>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn
                        DataField="Status_Text"
                        HeaderText="L_AssetEdit_MSCStatus_Text"
                        SortExpression="Status_Text"
                        UniqueName="Status_Text"
                        DataFormatString="<nobr>{0}</nobr>">
                        <HeaderStyle Width="25px"></HeaderStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn
                        DataField="Type_Text"
                        HeaderText="L_AssetEdit_MSCType_Text"
                        SortExpression="Type_Text"
                        UniqueName="Type_Text"
                        DataFormatString="<nobr>{0}</nobr>">
                        <HeaderStyle Width="60px"></HeaderStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn
                        DataField="Task_Name"
                        HeaderText="L_AssetEdit_MSCTask_Name"
                        SortExpression="Task_Name"
                        UniqueName="Task_Name"
                        DataFormatString="<nobr>{0}</nobr>">
                        <HeaderStyle Width="60px"></HeaderStyle>
                    </telerik:GridBoundColumn>                    
                    <telerik:GridBoundColumn
                        DataField="TimeStart"
                        DataType="System.DateTime"
                        HeaderText="L_AssetEdit_MSCTimeStart"
                        SortExpression="TimeStart"
                        UniqueName="TimeStart"
                        DataFormatString="<nobr>{0}</nobr>">
                        <HeaderStyle Width="40px"></HeaderStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn
                        DataField="TimeStop"
                        DataType="System.DateTime"
                        HeaderText="L_AssetEdit_MSCTimeStop"
                        SortExpression="TimeStop"
                        UniqueName="TimeStop"
                        DataFormatString="<nobr>{0}</nobr>">
                        <HeaderStyle Width="40px"></HeaderStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn
                        DataField="ReturnCode_Text"
                        HeaderText="L_AssetEdit_MSCReturnCode_Text"
                        SortExpression="ReturnCode_Text"
                        UniqueName="ReturnCode_Text"
                        DataFormatString="<nobr>{0}</nobr>">
                        <HeaderStyle Width="25px"></HeaderStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn
                        DataField="Message"
                        HeaderText="L_AssetEdit_MSCMessage"
                        SortExpression="Message"
                        UniqueName="Message"
                        DataFormatString="<nobr>{0}</nobr>">
                        <HeaderStyle Width="150px"></HeaderStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn
                        DataField="Timeout"
                        DataType="System.Int32"
                        HeaderText="L_AssetEdit_MSCTimeout"
                        SortExpression="Timeout"
                        UniqueName="Timeout"
                        DataFormatString="<nobr>{0}</nobr>">
                        <HeaderStyle Width="15px"></HeaderStyle>
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings AllowDragToGroup="True">
            </ClientSettings>
        </telerik:RadGrid>           
    </telerik:RadPageView>
    
    <telerik:RadPageView ID="RadPageView1" runat="server" Width="100%">
        <telerik:RadGrid
            ID="RadGrid2" runat="server"
            GridLines="None"
            DataSourceID="SDS_MCProducts"
            AllowFilteringByColumn="False"
            AllowPaging="True"
            AllowSorting="True"
            AutoGenerateColumns="False" onitemdatabound="RadGrid2_ItemDataBound"
            onitemcommand="RadGrid2_ItemCommand" >
            <MasterTableView
                DataSourceID="SDS_MCProducts"
                AutoGenerateColumns="False"
                TableLayout="Fixed"
                DataKeyNames="InstallationTaskId,ConfigurationTaskId"
                PageSize="20">
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField
                                FieldAlias="Productname"
                                FieldName="Products_Name"
                                HeaderValueSeparator=": ">
                            </telerik:GridGroupByField>                            
                        </SelectFields>
                        <GroupByFields>                            
                            <telerik:GridGroupByField
                                FieldAlias="Productname"
                                FieldName="Products_Name"
                                HeaderValueSeparator=": "/>                            
                        </GroupByFields>
                    </telerik:GridGroupByExpression>                                
                </GroupByExpressions>
                <Columns>                                     
                    <telerik:GridBoundColumn
                        DataField="Products_Name"
                        HeaderText="L_AssetEdit_MSCProductName"
                        SortExpression="Products_Name"
                        UniqueName="Products_Name"
                        DataFormatString="<nobr>{0}</nobr>">
                        <HeaderStyle Width="25px"></HeaderStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn
                        DataField="Status_Text"
                        HeaderText="L_AssetEdit_MSCStatus_Text"
                        SortExpression="Status_Text"
                        UniqueName="Status_Text"
                        DataFormatString="<nobr>{0}</nobr>">
                        <HeaderStyle Width="25px"></HeaderStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn
                        DataField="ProductVersion"
                        HeaderText="L_AssetEdit_MSCProductVersion"
                        SortExpression="ProductVersion"
                        UniqueName="ProductVersion"
                        DataFormatString="<nobr>{0}</nobr>">
                        <HeaderStyle Width="25px"></HeaderStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn
                        DataField="Products_Description"
                        HeaderText="L_AssetEdit_MSCProductDescription"
                        SortExpression="Products_Description"
                        UniqueName="Products_Description"
                        DataFormatString="<nobr>{0}</nobr>">
                        <HeaderStyle Width="75px"></HeaderStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn
                        DataField="ComputerName"
                        HeaderText="L_AssetEdit_MSCComputerName"
                        SortExpression="ComputerName"
                        UniqueName="ComputerName"
                        DataFormatString="<nobr>{0}</nobr>">
                        <HeaderStyle Width="25px"></HeaderStyle>
                    </telerik:GridBoundColumn>                    
                    <telerik:GridBoundColumn
                        DataField="TimeAssigned"
                        DataType="System.DateTime"
                        HeaderText="L_AssetEdit_MSCTimeAssigned"
                        SortExpression="TimeAssigned"
                        UniqueName="TimeAssigned"
                        DataFormatString="<nobr>{0}</nobr>">
                        <HeaderStyle Width="40px"></HeaderStyle>
                    </telerik:GridBoundColumn>                    
                    <telerik:GridTemplateColumn
                        HeaderText="L_AssetEdit_MSCInstStat"
                        ReadOnly="True"
                        SortExpression="InstallationStatus_Text">
                        <ItemTemplate>
                            <asp:ImageButton
                                ID="IB_InstallationStatus" runat="server"
                                ImageUrl="Img/16x16/shadow/information.png" />
                            <asp:Label
                                ID="LBL_InstallationStatus" runat="server"
                                Text='<%# Eval("InstallationStatus_Text") %>'>
                            </asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Width="25px"></HeaderStyle>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn
                        DataFormatString="<nobr>{0}</nobr>"
                        DataField="InstallationTime"                                 
                        HeaderText="L_AssetEdit_MSCInstTime"
                        ReadOnly="True"
                        SortExpression="InstallationTime"
                        UniqueName="InstallationTime"
                        DataType="System.DateTime" >
                        <HeaderStyle Width="40px"></HeaderStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn
                        HeaderText="L_AssetEdit_MSCConfStat"
                        ReadOnly="True"
                        SortExpression="ConfigurationStatus_Text">
                        <ItemTemplate>
                            <asp:ImageButton
                                ID="IB_ConfigurationStatus" runat="server"
                                ImageUrl="Img/16x16/shadow/information.png" />
                            <asp:Label
                                ID="LBL_ConfigurationStatus" runat="server"
                                Text='<%# Eval("ConfigurationStatus_Text") %>'>
                            </asp:Label>
                        </ItemTemplate>
                        <HeaderStyle Width="25px"></HeaderStyle>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn
                        DataFormatString="<nobr>{0}</nobr>"
                        DataField="ConfigurationTime"                                 
                        HeaderText="L_AssetEdit_MSCConfTime"
                        ReadOnly="True"
                        SortExpression="ConfigurationTime"
                        UniqueName="ConfigurationTime"
                        DataType="System.DateTime" >
                        <HeaderStyle Width="40px"></HeaderStyle>
                    </telerik:GridBoundColumn>                    
                </Columns>
            </MasterTableView>
            <ClientSettings AllowDragToGroup="True">
            </ClientSettings>
        </telerik:RadGrid>           
    </telerik:RadPageView>
        
    
    </telerik:RadMultiPage>            
    <telerik:RadAjaxManager runat="server" ID="AjaxManager1"
        onajaxrequest="AjaxManager1_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadComboBox1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadComboBox1" />
                    <telerik:AjaxUpdatedControl ControlID="Panel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="Timer1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1"
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    
    <telerik:RadAjaxLoadingPanel
        ID="RadAjaxLoadingPanel1" Runat="server"
        height="75px" Transparency="20" width="75px" InitialDelayTime="1000">
        <table style="width:100%; height:100%;">
            <tr style="height:100%">
                <td align="center" valign="middle" style="width:100%">
                    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'
                    style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" />
                </td>
            </tr>
        </table>
    </telerik:RadAjaxLoadingPanel>

    
    <asp:Panel ID="Panel1" runat="server">
        <asp:Timer
            ID="Timer1" runat="server"
            Interval="60000"
            OnTick="Timer1_Tick" />
    </asp:Panel>
    
    <asp:SqlDataSource ID="SDS_MCComputer" runat="server"
        ConnectionString="<%$ ConnectionStrings:SigmaConnectionString %>"
        SelectCommand="WI_Asset_Edit" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:Parameter DefaultValue="GET_MCComputer" Name="Todo" Type="String" />                        
            <asp:QueryStringParameter DefaultValue="0" Name="OrgUnitId" QueryStringField="OrgUnitId" />
            <asp:QueryStringParameter Name="CStat" QueryStringField="CStat" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    
    <asp:SqlDataSource ID="SDS_MCProducts" runat="server"
        ConnectionString="<%$ ConnectionStrings:SigmaConnectionString %>"
        SelectCommand="WI_Asset_Edit" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:Parameter DefaultValue="GET_MCProducts" Name="Todo" Type="String" />                        
            <asp:QueryStringParameter DefaultValue="0" Name="OrgUnitId" QueryStringField="OrgUnitId" />
            <asp:QueryStringParameter Name="PStat" QueryStringField="PStat" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    
    <telerik:RadFormDecorator ID="RadFormDecorator1" Runat="server"
        Skin="Office2007" />
    
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            window.moveTo(0, 0);
            window.resizeTo(screen.width, screen.height);

            function refreshGrids(Eventstring) {
                $find("<%= AjaxManager1.ClientID %>").ajaxRequest(Eventstring);
            }

            function OnClientBeforeShow(sender, args) {
                sender.set_modal(sender.get_modal());
            };  
        </script>                    
    </telerik:RadCodeBlock>
    
    <telerik:RadToolTipManager
        ID="RadToolTipManager1" runat="server"
        OffsetY="-1"
        Width="500px"
        Height="300px"
        OnAjaxUpdate="RadToolTipManager1_AjaxUpdate"
        RelativeTo="Element"
        Position="BottomLeft"
        Skin="Office2007"
        Modal="True"
        onclientbeforehide="refreshGrids"
        ManualClose="True"
        Title="Computer" OnClientBeforeShow="OnClientBeforeShow">
    </telerik:RadToolTipManager>
    
    <telerik:RadToolTipManager
        ID="RadToolTipManager2" runat="server"
        OffsetY="-1"
        Width="500px"
        Height="200px"
        OnAjaxUpdate="RadToolTipManager2_AjaxUpdate"
        RelativeTo="Element"
        Position="BottomLeft"
        Skin="Office2007"
        Modal="True"
        onclientbeforehide="refreshGrids"
        ManualClose="True"
        Title="Products" OnClientBeforeShow="OnClientBeforeShow">
    </telerik:RadToolTipManager>
    </form>
</body>
</html>

and the c# code:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using Telerik.Web.UI;
using System.IO;

namespace Sigma_Web
{
    public partial class AssetEdit_Messaging : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                SqlUtil.AutofillLanguage(Controls);                
            }
        }

        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (Convert.ToInt32(RadComboBox1.SelectedValue) != 0)
            {
                Timer1.Interval = int.Parse(RadComboBox1.SelectedValue);
            }
            else
            {
                Timer1.Enabled = false;
            }
        }

        protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            // IB_ProductStatus
            if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
            {
                Control target1 = e.Item.FindControl("IB_Tasks_More");
                Control target2 = e.Item.FindControl("IB_ProductStatus");

                if (!Object.Equals(this.RadToolTipManager1, null))
                {
                    if (!Object.Equals(target1, null))
                    {
                        //Add the button (target) id to the tooltip manager
                        this.RadToolTipManager1.TargetControls.Add(target1.ClientID, "Computer;" + (e.Item as GridDataItem).GetDataKeyValue("Id").ToString(), true);
                    }
                
                    if (!Object.Equals(target2, null))
                    {
                        //Add the button (target) id to the tooltip manager
                        this.RadToolTipManager2.TargetControls.Add(target2.ClientID, "Product;" + (e.Item as GridDataItem).GetDataKeyValue("ComputerId").ToString() + ";" + (e.Item as GridDataItem).GetDataKeyValue("ProductId").ToString(), true);
                    }
                }
            }
        }

        protected void RadGrid2_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
            {
                Control target1 = e.Item.FindControl("IB_InstallationStatus");
                Control target2 = e.Item.FindControl("IB_ConfigurationStatus");
                if (!Object.Equals(this.RadToolTipManager1, null))
                {
                    if (!Object.Equals(target1, null))
                    {
                        //Add the button (target) id to the tooltip manager
                        this.RadToolTipManager1.TargetControls.Add(target1.ClientID, "Computer;" + (e.Item as GridDataItem).GetDataKeyValue("InstallationTaskId").ToString(), true);
                    }
                    if (!Object.Equals(target2, null))
                    {
                        //Add the button (target) id to the tooltip manager
                        this.RadToolTipManager1.TargetControls.Add(target2.ClientID, "Computer;" + (e.Item as GridDataItem).GetDataKeyValue("ConfigurationTaskId").ToString(), true);
                    }
                }
            }
        }

        protected void RadToolTipManager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)
        {          
            this.UpdateToolTip1(e.Value, e.UpdatePanel);
        }
        protected void RadToolTipManager2_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)
        {
            this.UpdateToolTip2(e.Value, e.UpdatePanel);
        }

        private void UpdateToolTip1(string elementID, UpdatePanel panel)
        {
            Control ctrl1 = Page.LoadControl("AssetEdit_ToolTipComputer_Tasks.ascx");
            Control ctrl2 = Page.LoadControl("AssetEdit_ToolTipComputer_Products.ascx");

            string[] elements = elementID.Split(';');

            panel.ContentTemplateContainer.Controls.Add(ctrl1);
            Tasks details = (Tasks)ctrl1;
            details.TaskId = elements[1];

        }

        private void UpdateToolTip2(string elementID, UpdatePanel panel)
        {
            Control ctrl1 = Page.LoadControl("AssetEdit_ToolTipComputer_Tasks.ascx");
            Control ctrl2 = Page.LoadControl("AssetEdit_ToolTipComputer_Products.ascx");

            string[] elements = elementID.Split(';');

            panel.ContentTemplateContainer.Controls.Add(ctrl2);
            Products details = (Products)ctrl2;
            details.ComputerId = elements[1];
            details.ProductId = elements[2];

        }

        public void Timer1_Tick(object sender, EventArgs e)
        {
            RadGrid1.Rebind();
            RadGrid2.Rebind();
        }

        protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
        {
            if (e.CommandName == "Sort" || e.CommandName == "Page")
            {
                RadToolTipManager1.TargetControls.Clear();
                RadToolTipManager2.TargetControls.Clear();
            }
        }

        protected void RadGrid2_ItemCommand(object source, GridCommandEventArgs e)
        {
            if (e.CommandName == "Sort" || e.CommandName == "Page")
            {
                RadToolTipManager1.TargetControls.Clear();
                RadToolTipManager2.TargetControls.Clear();
            }
        }

        protected void AjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            RadToolTipManager1.TargetControls.Clear();
            RadToolTipManager2.TargetControls.Clear();
            RadGrid1.Rebind();
            RadGrid2.Rebind();
        }
    }
}

Thanks for your help!!!



Enigma
Top achievements
Rank 1
 answered on 06 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?