Storeing the Tooltip Previous Displayed Values to SUM the same

2 posts, 0 answers
  1. sumanth
    sumanth avatar
    11 posts
    Member since:
    Feb 2009

    Posted 13 Apr 2009 Link to this post

    Hi

    My Requirement is i can selected multipule cells randomly in RADGIRD.
    Need the SUM of the Cells to be Displayed in TOOLTIP
    I am able to select the multipule cells and display the display the Tooltip for Selected Cells(Selected Value)
    BUT i am unable to SUM the Selected values in RAD GIRD to Display the same in ToolTip
    I suffring from past 2 weeks for the same
    Plz Help Me

    My code Goes like This .ASPX File

    <%

    @ Page Language="C#" AutoEventWireup="true" CodeBehind="gotit.aspx.cs" Inherits="dgtooltip.gotit" %>

     

    <%

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

     

    <%

    @ Register assembly="Infragistics35.WebUI.UltraWebGrid.v8.2, Version=8.2.20082.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.UltraWebGrid" tagprefix="igtbl" %>

     

    <!

     

    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></title>

     

     

    <style type="text/css">

     

     

    .HoverClass

     

    {

     

    background-color: aqua;

     

     

    }

     

    .DefaultClass

     

    {

     

    background-color: white;

     

     

    }

     

    .ClickClass

     

    {

     

    background-color:Red !important;

     

    }

    </

     

    style>

     

    </

     

    head>

     

    <

     

    script type="text/javascript">

     

     

    function RowCreated(sender, eventArgs)

     

    {

     

    var dataItem = eventArgs.get_gridDataItem();

     

     

    for (var i = 0; i < dataItem.get_element().cells.length; i++) {

     

    dataItem._element.cells[i].onmouseover =

    function() {

     

     

    this.className = "HoverClass";

     

     

    };

    dataItem.get_element().cells[i].onclick =

    function() {

     

     

    this.selected = this.selected == true ? false : true;

     

     

    this.className = "ClickClass";

     

     

    this.title = this.innerText;

     

     

    };

    dataItem.get_element().cells[i].onmouseout =

    function() {

     

     

    var cssName = this.selected ? "HoverClass" : "DefaultClass"

     

     

    this.className = cssName;

     

     

    return;

     

    };

    }

    }

     

     

    var grid;

     

     

    function RowSelected(rowObject) {

     

     

    var selRow = this.GetCellByColumnUniqueName(rowObject, "ID");

     

     

    //here selRow.innerHTML will hold the value for the selected row contact name

     

     

    }

     

    function GetSelectedNames() {

     

     

    for (var i = 0; i < grid.MasterTableView.SelectedCells.length; i++) {

     

     

    var curRow = grid.MasterTableView.GetCellByColumnUniqueName(grid.MasterTableView.SelectedCells[i], "ID");

     

     

    //here curRow.innerHTML will hold the value for the selected rows contact names

     

    }

    }

     

    function GridCreated() {

     

    grid =

    this;

     

    }

     

     

    </

     

    script>

     

    <

     

    body>

     

     

    <form id="form1" runat="server">

     

     

     

     

     

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">

     

     

    </telerik:RadScriptManager>

     

     

     

     

     

    <div>

     

     

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"

     

     

    style="z-index: 1; left: 10px; top: 34px; position: absolute; height: 0px; width: 0px">

     

     

    <AjaxSettings>

     

     

    <telerik:AjaxSetting AjaxControlID="RadGrid1">

     

     

    </telerik:AjaxSetting>

     

     

    <telerik:AjaxSetting AjaxControlID="m_Grid">

     

     

    </telerik:AjaxSetting>

     

     

    </AjaxSettings>

     

     

    </telerik:RadAjaxManager>

     

     

    <asp:HiddenField ID="HiddenField1" runat="server" Value="test();" />

     

     

     

    <asp:SqlDataSource ID="SqlDataSource1" runat="server"

     

     

    ConnectionString="<%$ ConnectionStrings:ULTIMATE_NEWConnectionString2 %>"

     

     

    SelectCommand="select id,id,id,ID from CustomerMaster"></asp:SqlDataSource>

     

     

    <asp:Label ID="lblLabel" runat="server"

     

     

    style="z-index: 1; left: 280px; top: 47px; position: absolute; height: 39px; width: 262px"

     

     

    Text="Label"></asp:Label>

     

     

    <br />

     

     

    </div>

     

     

     

    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"

     

     

     

    style="z-index: 1; left: 49px; top: 200px; position: absolute; height: 105px; width: 657px"

     

     

    GridLines="Both">

     

     

    <ClientSettings>

     

     

     

    <ClientEvents OnGridCreated="GridCreated" OnRowSelected="RowSelected" OnRowCreated="RowCreated"></ClientEvents>

     

    </

     

    ClientSettings>

     

    <

     

    HeaderContextMenu>

     

    <

     

    CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

     

    </

     

    HeaderContextMenu>

     

    <

     

    MasterTableView autogeneratecolumns="False" datakeynames="id,id1,id2,ID3"

     

     

    datasourceid="SqlDataSource1">

     

    <

     

    RowIndicatorColumn>

     

    <

     

    HeaderStyle Width="20px"></HeaderStyle>

     

    </

     

    RowIndicatorColumn>

     

    <

     

    ExpandCollapseColumn>

     

    <

     

    HeaderStyle Width="20px"></HeaderStyle>

     

    </

     

    ExpandCollapseColumn>

     

     

    <Columns>

     

     

    <telerik:GridBoundColumn DataField="id" DataType="System.Int16" HeaderText="id"

     

     

    ReadOnly="True" SortExpression="id" UniqueName="id">

     

     

    </telerik:GridBoundColumn>

     

     

    <telerik:GridBoundColumn DataField="id1" DataType="System.Int16"

     

     

    HeaderText="id1" ReadOnly="True" SortExpression="id1" UniqueName="id1">

     

     

    </telerik:GridBoundColumn>

     

     

    <telerik:GridBoundColumn DataField="id2" DataType="System.Int16"

     

     

    HeaderText="id2" ReadOnly="True" SortExpression="id2" UniqueName="id2">

     

     

    </telerik:GridBoundColumn>

     

     

    <telerik:GridBoundColumn DataField="ID3" DataType="System.Int16"

     

     

    HeaderText="ID3" ReadOnly="True" SortExpression="ID3" UniqueName="ID3">

     

     

    </telerik:GridBoundColumn>

     

     

    </Columns>

     

    </

     

    MasterTableView>

     

    <

     

    FilterMenu>

     

    <

     

    CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

     

    </

     

    FilterMenu>

     

     

    </telerik:RadGrid>

     

     

     

    <input type="hidden" id="comboValue" value="" runat="server" />

     

     

    &nbsp;<p>

     

     

    &nbsp;</p>

     

     

    <p>

     

     

    &nbsp;</p>

     

     

    <p>

     

     

    &nbsp;</p>

     

     

    <p>

     

     

    &nbsp;</p>

     

     

    <p>

     

     

    &nbsp;</p>

     

     

    <p>

     

     

    &nbsp;</p>

     

     

    </form>

     

    </

     

    body>

     

    </

     

    html>

     

  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 15 Apr 2009 Link to this post

    Hi sumanth,

    One possible option in this case would be to iterate through the cells in the control, acquire the sum, and set it as a tooltip for the required cell.
    I hope this suggestion helps.

    Sincerely yours,
    Yavor
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top