Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
109 views
I have a radgrid with 10 column which need multi sorting but I have to limit to three column.
Like,

ID   FIRST   LAST   TEL   EMAIL
1       2           3
But if he clicks 'TEL' now, then
ID   FIRST   LAST   TEL    EMAIL
         1           2         3
Anyone can help me out..If possible I need to switch images to indicate three column differently?


Thanks,
DIP
Dip
Top achievements
Rank 1
 answered on 29 Jan 2009
1 answer
180 views

Hello, I am using the RadGrid from the Prometheus release, version 2007.3.1425.20 in a .Net 2.0 application. We are trying to raise an event up from a user control to it's parent container. The set up is a RadGrid control is contained within a user control placed in a parent aspx page that uses a master page.  The user control's parent aspx page's OnBubbleEvent never gets control. The code used for this follows. Any help would be appreciated. All I can think of is that the RadGrid has an OnBubbleEvent and returns false so it never bubbles, but I am not sure.

The following code is called form the linkbutton and contains the RaiseBubbleEvent:

    protected void getSelectedItems(object sender, EventArgs e)
    {
        //iterate through selection and add selected items to collection
        foreach (GridDataItem item in grdBlocklist.MasterTableView.Items)
        {
            if (((CheckBox)item.FindControl("chkDisable")).Checked)
            {
                _items.Add(new BlockList(0, item["BillTo"].Text, item["ShipTo"].Text, item["SoldTo"].Text,
                    null, null, DateTime.Now.ToString(), item["BrandDesc"].Text, _type));
            }
        }

        //...then raise event to parent
        RaiseBubbleEvent(sender, e);
    }

The linkbutton that start this train was added by this code:

    protected void grdBlocklist_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridHeaderItem)
        {
            GridHeaderItem header = (GridHeaderItem)e.Item;
            LinkButton btn = new LinkButton();

            btn.Text = (_editMode ? "[block]" : "[unblock]");

            btn.Command += new CommandEventHandler(getSelectedItems);
            header["disable"].Controls.AddAt(0, btn);
        }
    }

However the parent container's following code block is not hit:

    protected void OnBubbleEvent(object sender, EventArgs e)
    {
        try
        {
            foreach (BlockList item in this.ctlBlocklistTelerik1.Items)
            {
                //check if this is a block or unblock
                if (this.ctlBlocklistTelerik1.EditMode)
                    item.Block();
                else
                    item.UnBlock();
            }

            //rebuild list
            rebindBlocklist();
        }
        catch (Exception oEX)
        {
            throw;
        }
    }

Thanks

Paul Martissa
Top achievements
Rank 1
 answered on 29 Jan 2009
1 answer
109 views
Bonjour,

I have a grid set with option  grd.GroupingSettings.CaseSensitive = false;

Is it a bug or normal that equal A is != then a when CaseSensitive is false...
Contains work properly
Greater than work properly

Thanks!
Daniel
Telerik team
 answered on 29 Jan 2009
1 answer
121 views
I've searched through the forum postings and documentation looking for an alternative place to bind the RadComboBox when it is used a filtering control assigned in the MyCustomFilteringColumn class.  The examples I've seen usually bind the data to the combo box in the SetupFilterControls method of the MyCustomFilteringColumn class.  I am trying to use my business objects and the data binding framework used throughout my application to perform the data binding for the filtering control on my web page.

I can successfully bind my filtering control in the page_load handler the first time the page is displayed, however, any other action on the RadGrid losses my data in the RadComboBox.

I was wondering if there is an event handler for RadGrid where I could get an instance of the actual RadComboBox used as the filter control that is created in the SetupFilterControls method?
alo
Top achievements
Rank 1
 answered on 29 Jan 2009
3 answers
263 views
I just installed Q3 2008 but there is no Telerik.web.ui.dll  while other programer has RadControls_for_ASP.NET_AJAX_2008_2_1001_dev installed which has Telerik.web.ui.dll. What is the difference between these two versions or am I missing something?

Syed
Daniel
Telerik team
 answered on 29 Jan 2009
1 answer
169 views
I am attempting to build a RadGrid programmatically utilizing GridDropDownColumns.  Each GridDropDownColumn will need to be bound to a DataSource object for population.  The DataSourceID specified will always throw the error: Cannot find DataSourceControl with ID 'xxx'.  Is this an issue with dynamic column creation and binding or is there another way to populate the GridDropDownColumn server-side?

HTML code:
<telerik:RadPageView runat="server" ID="viewXX" /> //Control to load the RadGrid into
<asp:XmlDataSource ID="XmlDataSource1" runat="server">  
                <Data>
                    <Items>
                          <Item Value="Ms" Text="Ms."/>  
                          <Item Value="Dr" Text="Dr."/>  
                          <Item Value="Mrs" Text="Mrs."/>  
                          <Item Value="Mr" Text="Mr."/>  
                    </Items>
                </Data>
</asp:XmlDataSource>

C# code:
RadGrid radgrid = new RadGrid();
GridDropDownColumn boundColumnList = new GridDropDownColumn();
boundColumnList.DataSourceID = "XmlDataSource1";
radgrid.MasterTableView.Columns.Add(boundColumnList);

Todd
Top achievements
Rank 1
 answered on 29 Jan 2009
1 answer
171 views
Hi,
 We are moving our project using above version(2008.2.1001.20) rad controls.
1) In the case of Rad Grid, the "Telerik.WebControls.RadGrid" is working fine with self Hierarchy settings. It is clearly showing  parent and child relationship.
2) But if we use the above version Rad Grid, it is not showing the self Hierarchy properly.
3) Whenever we add new child record for a parent, it's showing separate record in the Grid.
4)Also we are using MasterTableView  filter expression as  follows in the "Telerik.WebControls.RadGrid" Version RadGrid.
 RadGrid1.MasterTableView.FilterExpression = "ParentID='  ' "; ( in page load event).
5) If we are moving same code to above version Rad Grid, Self Hierarchy settings   is not working properly.

Can someone help me with this ASAP as this is an urgent requirement?

Regards
Amit Mondal.






Georgi Krustev
Telerik team
 answered on 29 Jan 2009
1 answer
74 views
I have a ODBC connection to an informix database that is populating incremental 30 minutes of data.  Here is the aspx and the vb.  Basically I don't need to have all series to show.  I only need the total as the x-axis and y datalabel as starttime.  At the moment they post but I get a huge blank space in the chart I assuming that is the series for the starttime.  I need to have that removed as well as the choices in the datatable.  Thanks in advance.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Charting" TagPrefix="cc1" %> 
<!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>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
        <asp:DropDownList ID="DropDownList1" runat="server" Width="89px" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" AutoPostBack="True">  
            <asp:ListItem>1401</asp:ListItem> 
            <asp:ListItem>1406</asp:ListItem> 
            <asp:ListItem>1426</asp:ListItem> 
            <asp:ListItem>1059</asp:ListItem> 
        </asp:DropDownList> 
        <br /> 
    </div> 
    <telerik:RadChart ID="RadChart1" runat="server" Width="850px">  
        <PlotArea> 
            <EmptySeriesMessage Visible="True">  
                <Appearance Visible="True">  
                </Appearance> 
            </EmptySeriesMessage> 
        </PlotArea> 
    </telerik:RadChart> 
    <br /> 
    <telerik:RadGrid ID="RadGrid1" runat="server">  
    </telerik:RadGrid> 
    </form> 
</body> 
</html> 
 

Imports System.IO  
Imports System.Data.SqlClient  
Imports System.Collections.Specialized  
Imports System.Diagnostics  
Imports System.Web.UI.HtmlControls  
'Imports Telerik.Windows.Controls.Charting  
Imports System  
Imports System.Data  
Imports System.Configuration  
Imports System.Collections  
Imports System.Web  
Imports System.Web.Security  
Imports System.Web.UI  
Imports System.Web.UI.WebControls  
Imports System.Web.UI.WebControls.WebParts  
Imports Telerik.Charting  
Imports Telerik.Web.UI  
Imports System.Data.Odbc  
Imports System.Data.OleDb  
 
Partial Class _Default  
    Inherits System.Web.UI.Page  
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
        RadChart1.ChartTitle.Visible = False 
 
        RadChart1.Legend.Visible = False 
        If Not Page.IsPostBack Then  
            RadChart1.Visible = False 
        End If  
 
    End Sub  
 
 
    Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged  
 
        Dim i As Integer  
        Dim x As Integer  
        Dim totalacd As Integer  
        Dim str As StringString = String.Empty  
        Dim dte As StringString = String.Empty  
        Dim cmd As OdbcCommand  
        Dim cmd2 As OdbcCommand  
        Dim swhere As String  
        Dim swhere2 As String  
        Dim conn As New OdbcConnection  
        Dim inttotal As Integer  
        Dim average As Integer  
 
        conn.ConnectionString = ("DSN='';uid='';pwd=''")  
        conn.Open()  
 
        swhere = "select * from hsplit where row_date = TODAY - 1 OR row_date = TODAY AND split = " & DropDownList1.SelectedValue.ToString() & ""  
        swhere2 = "SELECT DISTINCT row_date, starttime FROM hsplit WHERE row_date = Today OR row_date = TODAY - 1 ORDER BY row_date DESC, starttime DESC" 
 
        cmd = New OdbcCommand(swhere, conn)  
        cmd2 = New OdbcCommand(swhere2, conn)  
 
        Dim dt As New DataSet1.DataTable1DataTable  
        Dim dt2 As New DataSet1.DataTable2DataTable  
        Dim dt3 As New DataSet1.DataTable3DataTable  
 
        Dim da As OdbcDataAdapter  
        Dim da2 As OdbcDataAdapter  
 
        dt.Clear()  
        dt2.Clear()  
 
        cmd.ExecuteNonQuery()  
        cmd2.ExecuteNonQuery()  
 
        da = New OdbcDataAdapter(cmd)  
        da2 = New OdbcDataAdapter(cmd2)  
 
        da.Fill(dt)  
        da2.Fill(dt2)  
 
        totalacd = 0 
        inttotal = 0 
        average = 0 
 
        For x = 0 To 14  
            For i = 0 To dt.Rows.Count() - 1  
                Try  
                    If dt2.Rows(x).Item("starttime") <> Nothing Then  
                        Try  
                            If dt.Rows(i).Item("starttime").ToString = dt2.Rows(x).Item("starttime").ToString Then  
                                totalacdtotalacd = totalacd + dt.Rows(i).Item("acdcalls").ToString  
                                inttotalinttotal = inttotal + 1  
                            End If  
                            str = dt2.Rows(x).Item("starttime").ToString  
                            dte = dt2.Rows(x).Item("row_date").ToString  
                        Catch ex As Exception  
                            average = 0 
                            str = dt2.Rows(x).Item("starttime").ToString  
                            dte = dt2.Rows(x).Item("row_date").ToString  
                        End Try  
                    End If  
                Catch ex As Exception  
                    average = 0 
                End Try  
            Next  
 
            Dim newCustomersRow As DataSet1.DataTable3Row  
            newCustomersRow = dt3.NewDataTable3Row()  
 
            newCustomersRow("row_date") = dte  
            newCustomersRow("starttime") = str  
 
            Try  
                average = (totalacd / inttotal)  
            Catch ex As Exception  
                average = 0 
            End Try  
            newCustomersRow("average") = average.ToString  
            newCustomersRow("total") = inttotal.ToString  
            dt3.Rows.Add(newCustomersRow)  
            average = 0 
            totalacd = 0 
            inttotal = 0 
 
        Next  
        RadChart1.PlotArea.XAxis.DataLabelsColumn = dt3.starttimeColumn.ToString()  
 
        RadChart1.Series(0).Type = ChartSeriesType.Line  
        RadChart1.Series(1).Type = ChartSeriesType.Bar  
        RadChart1.Series(0).Visible = False    
        RadChart1.PlotArea.DataTable.Visible = True 
 
        RadChart1.ChartTitle.Visible = False 
        RadChart1.Legend.Visible = False 
        RadChart1.DataSource = dt3 
        RadChart1.DataBind()  
        RadChart1.Visible = True 
 
        RadGrid1.DataSource = dt3 
        RadGrid1.DataBind()  
        RadGrid1.Visible = True 
 
        conn.Close()  
 
    End Sub  
End Class 
Jon-Jon Kershaw
Top achievements
Rank 2
 answered on 29 Jan 2009
5 answers
215 views
Hi,

Using a radgrid inside a tab container, the grid only gets loaded when the tab panel is selected, so to display the loading message using AJAXLoadingTemplate I load the datasource with an empty set, then populate with the expected data when the tab is focused.

Everything is working as fine, the only problem is the loading.gif message is being chopped off because there are no rows being shown the first time the data is being loaded into the grid.

Any ideas as to how I could solve this?

Thanks.
Dimo
Telerik team
 answered on 29 Jan 2009
4 answers
86 views
Hello,

After installing the last 1314 version, I noticed some broken features:
- some tooltip now have vertical lines left and right, this also appear in your demo : adcontrols_aspnetajax/ToolTip/Examples/BindToTarget/DefaultCS.aspx

- area for tooltips no more adapt to its content as previously, following code no more works, tolltip is displyaed but to small for content:
if (!Object.Equals(Ctl, null) && (ImgItem.imageShortDescription != string.Empty) )
{
                RadToolTip tt           =   new RadToolTip();
                tt.ID                   =   string.Format("tt_{0}",Ctl.ID);
                tt.TargetControlID      =   Ctl.ClientID;
                tt.IsClientID           =   true;
                tt.Position             =   ToolTipPosition.Center;
                tt.RelativeTo           =   ToolTipRelativeDisplay.Element;
                tt.ContentScrolling     =   ToolTipScrolling.Auto;
                Ctl.Parent.Controls.AddAt(Ctl.Parent.Controls.IndexOf(Ctl),tt);
                tt.Text                 =   ImgItem.imageShortDescription;
            }
           
Thanks for suggestion.

CS
CSurieux
Top achievements
Rank 2
 answered on 29 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?