Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
91 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
86 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
279 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
290 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
2 answers
96 views
I think the subject says it all...

I need to access the EditFormInsertItem from within the ObjectDataSource_Inserting command:

Private Sub ObjectDataSourceRenewal_Inserting(ByVal sender As Object, ByVal e As ObjectDataSourceMethodEventArgs) Handles ObjectDataSourceRenewal.Inserting
  
    Dim lEditFormInsertItem As GridEditFormInsertItem = ???
  
    Dim lRadTextBoxGroupNumber As RadTextBox = lEditFormInsertItem.FindControl("RadTextBoxGroupNumber")
    Dim lRadDatePickerRenewalBegin As RadDatePicker = lEditFormInsertItem.FindControl("RadDatePickerRenewalBegin")
    Dim lRadDatePickerRenewalEnd As RadDatePicker = lEditFormInsertItem.FindControl("RadDatePickerRenewalEnd")
    Dim lRadComboBoxRenewalAccountManager As RadComboBox = lEditFormInsertItem.FindControl("RadComboBoxRenewalAccountManager")
    Dim lCheckBoxSuppressInGrid As CheckBox = lEditFormInsertItem.FindControl("CheckBoxSuppressInGrid")
  
    e.InputParameters("CaseNumber") = lRadTextBoxGroupNumber.Text.Trim 
    e.InputParameters("RenewalBegin") = lRadDatePickerRenewalBegin.SelectedDate 
    e.InputParameters("RenewalEnd") = lRadDatePickerRenewalEnd.SelectedDate  
    e.InputParameters("RenewalAM") = lRadComboBoxRenewalAccountManager.SelectedValue 
    e.InputParameters("SuppressAMInRenewal") = lCheckBoxSuppressInGrid.Checked 
  
End Sub

I'm sure it's easy, i just can't guess or find the syntax. Finding the editforminsertitem was no problem on the ObjectDataSource_Updating command.

Thanks!
jfkrueger
Top achievements
Rank 1
 answered on 05 Oct 2010
1 answer
64 views
Hi
I need to use policy statements in my form.
Which will be the best server control in which I can display information in numbered format like
Policy Statement:

1         abcd
1.1     lkgnj
1.2     mnsdfsdhfd
1.3     sdfsdfsdfsdf
2.      lmnop
2.1     termp

I dont think I can use Textbox multiline.
Examples would be best to explain. 
Thanks in advance
Sucheta 


Sebastian
Telerik team
 answered on 05 Oct 2010
1 answer
89 views
Hi,

I am trying to get a new company where I am contracting to purchase the telerik web controls for the development team. I ran the install program but the web controls are not appearing in the toolbox. Do I need to create the tab to access the controls or have I missed something else. The previous company I worked with already had the package installed so this is my first install on my machine.

TIA

David

David
Top achievements
Rank 1
 answered on 05 Oct 2010
4 answers
139 views
If I insert an appointment it works fine. If I then try to immediately delete, the confirmation popup appears, but the delete event is not firing. If I leave the page and come back and delete, it works fine. If is only if they occur one after the other. I'm using an advanced edit form as well.

 

 

' ========================================================

 

 

' RadScheduler1_AppointmentDelete

 

 

' Delete an appointment

 

 

' ========================================================

 

 

Protected Sub RadScheduler1_AppointmentDelete(ByVal sender As Object, ByVal e As SchedulerCancelEventArgs) Handles RadScheduler1.AppointmentDelete

 

 

Dim ProspectToolDAL As New ProspectToolDAL

 

ProspectToolDAL.Delete(e.Appointment.ID)

 

End Sub

 

 

 

' ========================================================

 

 

' RadScheduler1_AppointmentInsert

 

 

' Add a new appointment

 

 

' ========================================================

 

 

Private Sub RadScheduler1_AppointmentInsert(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerCancelEventArgs) Handles RadScheduler1.AppointmentInsert

 

 

Dim AppointmentBE as New AppointmentBE

 

 

Dim ProspectToolDAL As New ProspectToolDAL

 

AppointmentBE.Subject = e.Appointment.Subject

AppointmentBE.StartTime = e.Appointment.Start

AppointmentBE.EndTime = e.Appointment.End

AppointmentBE.SalesUserID = ViewState(

"SalesUser")

 

AppointmentBE.ContactInformation = e.Appointment.Attributes(

"Contact")

 

AppointmentBE.ApptComments = e.Appointment.Attributes(

"Description")

 

 

Dim appointmentKey as Int32 = ProspectToolDAL.SaveAppointment(AppointmentBE, "I")

 

 

End Sub

 


Thanks,
Susan

Veronica
Telerik team
 answered on 05 Oct 2010
3 answers
113 views
Hi,
I was testing with the sample SchedulerWebPartProject_2010_Q2 project downloaded from Telerik site in SHarepoint 2010. The problem is I see the Day view grid is always shrunk and the appointments that I have added are barely visible. Month, Week and Timeline view is displaying fine.

Please suggest what might be the problem here
Peter
Telerik team
 answered on 05 Oct 2010
4 answers
150 views
In the following demo: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandradasyncupload/defaultcs.aspx?product=upload you have a skin selector that does nothing because the grid has Office2007 skin hardcoded into it.

In addition, the Radasynch upload control is within an edit item template, and no matter what skin I use for the upload control, it is inheriting the settings from the grid.

Is it possible to set the skin  for a control in the edit template to be different than the skin of the containing grid?
If so, how?

This appears to be a bug.
Peter
Telerik team
 answered on 05 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?