Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
100 views
Hello,
RadTree Inside RadCombo Scrolling Problem
it shows an additional scroll bar in  combo

Help.....


Thanks in Advance

**(File Attached)
Yana
Telerik team
 answered on 05 Nov 2010
1 answer
72 views
Hello,

I have strugled couple days with a problem showing three level Hierarchial data in RadGrid.
Haven't got any answers and havent' found any samples.
I use Telerik version: RadControls_for_ASP.NET_AJAX_2010_1_415_dev

Problem is following:
A) Data is in Database in following way. Database table contains Ids to Organization table

IdA  IdB  IdC  IdD
---------------------
7     53    4    22  *
7     27    0     0
7     50  33     0
7     49   0      0
7     39   0      0
7     53   9    26  *

Rows that causes problems in RadGrid are marked with asterix.
Those rows will case duplicate rows into RadGrid.

B) I use two GridTableViews in RadGrid creating Hierarchy.

C) DetailTableDataBind is like following

protected void RadGridSubOrganizations_DetailTableDataBind(object source,
         Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
{
 GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
 string ParentOrganizationId = "";
 string ChildOrganizationId = "";
 string SubChildOrganizationId = "";

 switch (e.DetailTableView.Name)
 {
  case "ChildOrganization": // Name of 1. GridTableView
   {
    ParentOrganizationId = Convert.ToString(dataItem.GetDataKeyValue("ParentOrganizationId"));
    ChildOrganizationId = Convert.ToString(dataItem.GetDataKeyValue("ChildOrganizationId"));

    e.DetailTableView.DataSource =
     _presenter.GetOrganizationCustomersChildsSubChilds(long.Parse(ParentOrganizationId),
                   long.Parse(ChildOrganizationId));
   }
   break;

  case "SubChildOrganization": // Name of 2. GridTableView
   {
    ParentOrganizationId = Convert.ToString(dataItem.GetDataKeyValue("ParentOrganizationId"));
    ChildOrganizationId = Convert.ToString(dataItem.GetDataKeyValue("ChildOrganizationId"));
    SubChildOrganizationId = Convert.ToString(dataItem.GetDataKeyValue("SubChildOrganizationId"));

    e.DetailTableView.DataSource =
      _presenter.GetOrganizationCustomersChildsSubChilds(long.Parse(ParentOrganizationId),
                     long.Parse(ChildOrganizationId),
                     long.Parse(SubChildOrganizationId));
   }
   break;
 }
}


It seems to be so that DetailTableDataBind works ok or I thing so because duplicate Row (marked with asterix) has been created before debugger stops here.

D) I have tried to filter duplicates in in ItemCreated and ItemDataBound methods but haven't succeeded.
    e.Cancelled is now supported there!!!
    I also tried to use GroupExpression property in First level Columns but it didn't help.

Could I please get a working sample how to implemed Hierarchial RadGrid in situations like this?????

Our Company has license to Telerik, why can't I get support for this kind of question.

Michael



Tsvetina
Telerik team
 answered on 05 Nov 2010
40 answers
803 views
Is there a work-around or configuration setting to allow the follwoing in the MOSS Premium radEditor
  • inline javascript and / or onClick events that call javascript in the
  • style commands on DIV's
  • iframes

Thanks,

John

Stanimir
Telerik team
 answered on 05 Nov 2010
1 answer
285 views
Hello,

I've started down the path of Telerik Reporting in the past week, and have found that many of the limitations listed below have workarounds in Telerik Reporting, but are built-in features of RadGrid.

Column Sorting
Show/Hide Columns based on user selection
Exporting (having trouble with CSV in Reporting)
Paging (web version of Reporting doesn't page well)
Customizing the Report Viewer

So given that we are not doing complex CrossTab reports and all reports will be on the web, would you recommend that we switch to RadGrid? I understand you are biased towards your department, but I'd like some supporting evidence to back my claim that we should switch to RadGrid.

Thank you,

Scott McNeany
Steve
Telerik team
 answered on 05 Nov 2010
6 answers
328 views
Hi all,

I have some problems regarding No Wrap for Grid Cells and I couldn't find any solution for this in the forum or the tutorials.

I have a grid with a HeaderTemplate and an ItemTemplate and I want to prevent the wrapping for cells content (see attached picture). The grid is filled dynamically, so where and how do I have to insert the NoWrap?

Any help would be appreciated!

Here's my code:

Private Sub Create_Templates(ByRef grdTemplate As RadGrid, ByVal sRegGruppe As String, ByVal nIdGruppe As Integer, ByVal bNurPlatzkosten As Boolean)
        Dim templateColumn As New GridTemplateColumn()
        templateColumn.HeaderText = sRegGruppe
        templateColumn.HeaderTemplate = New MyTemplateHeader(sRegGruppe, nIdGruppe, bNurPlatzkosten)
        templateColumn.ItemTemplate = New MyTemplate(nIdGruppe, bNurPlatzkosten)
  
        grdTemplate.MasterTableView.Columns.Add(templateColumn)
    End Sub
  
    Private Class MyTemplateHeader
        Implements ITemplate
        Private sColHeader As String
        Private nIdCol As Integer
        Private bNurPK As Boolean
        Sub New(ByVal sColHeaderBez As String, ByVal nIdGruppe As Integer, ByVal bNurPlatzk As Boolean)
            sColHeader = sColHeaderBez
            nIdCol = nIdGruppe
            bNurPK = bNurPlatzk
        End Sub
        Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements ITemplate.InstantiateIn
            Dim TmpTable As New Table()
            Dim TmpRow1 As New TableRow()
            Dim TmpRow2 As New TableRow()
            Dim cReg As New TableCell()
            Dim cES As New TableCell()
            Dim cDS As New TableCell()
            Dim cBU As New TableCell()
  
  
            TmpTable.Width = Unit.Percentage(100)
            cReg.Width = Unit.Percentage(100)
            cReg.Text = sColHeader
            cReg.HorizontalAlign = HorizontalAlign.Center
            TmpRow1.Cells.Add(cReg)
  
            cES.Text = "ES"
            cES.Width = Unit.Percentage(100)
            cES.HorizontalAlign = HorizontalAlign.Center
            TmpRow2.Cells.Add(cES)
  
            If bNurPK = False Then
                cReg.ColumnSpan = 3
                cDS.Text = "DS"
                cBU.Text = "Buchbar"
  
                cDS.Width = Unit.Percentage(45)
                cBU.Width = Unit.Percentage(10)
  
                cDS.HorizontalAlign = HorizontalAlign.Center
                cBU.HorizontalAlign = HorizontalAlign.Center
                TmpRow2.Cells.Add(cDS)
                TmpRow2.Cells.Add(cBU)
            End If
            TmpTable.Rows.Add(TmpRow1)
            TmpTable.Rows.Add(TmpRow2)
  
            container.Controls.Add(TmpTable)
        End Sub
    End Class
  
    Private Class MyTemplate
        Implements ITemplate
        Protected lControlEZ As LiteralControl
        Protected lControlDZ As LiteralControl
        Protected lControlBu As LiteralControl
  
        Private nIdCol As Integer
        Private bNurPK As Boolean
        Private nfZahl As Integer
        Sub New(ByVal nIdGruppe As Integer, ByVal bNurPlatzk As Boolean)
            nIdCol = nIdGruppe
            bNurPK = bNurPlatzk
        End Sub
        Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements ITemplate.InstantiateIn
            Dim table As New Table()
            Dim row1 As New TableRow()
            Dim cell11 As New TableCell()
            Dim cell12 As New TableCell()
            Dim cell21 As New TableCell()
            table.CellPadding = 0
            table.CellSpacing = 0
            table.BorderStyle = BorderStyle.None
            table.Width = Unit.Percentage(100)
            lControlEZ = New LiteralControl()
            lControlEZ.ID = "ES" & nIdCol
            AddHandler lControlEZ.DataBinding, AddressOf lControlEZ_DataBinding
            cell11.Width = Unit.Percentage(100)
            cell11.BorderStyle = BorderStyle.None
            row1.Cells.Add(cell11)
  
            If bNurPK = False Then
                lControlDZ = New LiteralControl()
                lControlDZ.ID = "DS" & nIdCol
  
                AddHandler lControlDZ.DataBinding, AddressOf lControlDZ_DataBinding
  
                lControlBu = New LiteralControl()
                lControlBu.ID = "Buchbar" & nIdCol
                AddHandler lControlBu.DataBinding, AddressOf lControlBu_DataBinding
  
              
  
                cell11.Width = Unit.Percentage(45)
                cell12.Width = Unit.Percentage(45)
                cell21.Width = Unit.Percentage(10)
                cell11.BorderStyle = BorderStyle.None
                cell12.BorderStyle = BorderStyle.None
                cell21.BorderStyle = BorderStyle.None
                row1.Cells.Add(cell12)
                row1.Cells.Add(cell21)
            End If
  
            table.Rows.Add(row1)
  
            cell11.Controls.Add(lControlEZ)
            If bNurPK = False Then
                cell12.Controls.Add(lControlDZ)
                cell21.Controls.Add(lControlBu)
            End If
            container.Controls.Add(table)
        End Sub
        Private Sub boolValue_DataBinding(ByVal sender As Object, ByVal e As EventArgs)
            Dim cBox As CheckBox = DirectCast(sender, CheckBox)
            Dim container As GridDataItem = DirectCast(cBox.NamingContainer, GridDataItem)
  
            cBox.Checked = (DirectCast(container.DataItem, DataRowView))("Buchbar" & nIdCol).ToString()
  
        End Sub
        Public Sub lControlEZ_DataBinding(ByVal sender As Object, ByVal e As EventArgs)
            Dim l As LiteralControl = DirectCast(sender, LiteralControl)
            Dim container As GridDataItem = DirectCast(l.NamingContainer, GridDataItem)
  
            l.Text = String.Format("{0:C}", (DirectCast(container.DataItem, DataRowView))("ES" & nIdCol))
  
        End Sub
        Public Sub lControlDZ_DataBinding(ByVal sender As Object, ByVal e As EventArgs)
            Dim l As LiteralControl = DirectCast(sender, LiteralControl)
            Dim container As GridDataItem = DirectCast(l.NamingContainer, GridDataItem)
            l.Text = String.Format("{0:C}", (DirectCast(container.DataItem, DataRowView))("DS" & nIdCol))
  
        End Sub
        Public Sub lControlBu_DataBinding(ByVal sender As Object, ByVal e As EventArgs)
            Dim l As LiteralControl = DirectCast(sender, LiteralControl)
            Dim container As GridDataItem = DirectCast(l.NamingContainer, GridDataItem)
            If (DirectCast(container.DataItem, DataRowView))("Buchbar" & nIdCol).ToString() = "1" Then
                l.Text = "√"
            Else
                l.Text = "-"
  
            End If
  
  
        End Sub
    End Class
Ulrich
Top achievements
Rank 1
 answered on 05 Nov 2010
1 answer
171 views
I am working with a datasource that uses a 5 character code as the fileid & PK. This code can contain any printable character, so I have some fileid(s) that shape up like this: AAA/>, AAA:/, etc.

In RadGrid, I have added this field to the DataKeyFields and access it in grid_itemCreated() to build a javascript link used in a button column.

Here is the problem, the FileID is 'AAA/>' but the code below extracts the fileid from the keyvalue as 'AAA//>'
and causes a "no records found" since the primary key has an extra / in it.

I cannot locate the place where this / is being added nor eliminate it on extract, any ideas?
protected void dg_results_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            HyperLink editLink = (HyperLink)e.Item.FindControl("EditLink");
            editLink.Attributes["href"] = "#";
            editLink.Attributes["onclick"] = String.Format("return ShowEditForm('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["FileId"], e.Item.ItemIndex);
                 }
    }
Tsvetina
Telerik team
 answered on 05 Nov 2010
2 answers
234 views
Hello,

I have a RadGrid with one detailtable.
Both the MasterTableView as the DetailTable GridTableView have the following CommandItemTemplate
<CommandItemTemplate>
  <div style="padding: 5px 5px 5px 5px; float: right; display: inline">
    <asp:LinkButton ID="RebindButton" runat="server" CommandName="RebindGrid" ToolTip="Refresh">
      <asp:Image ID="RebindImage" runat="server" ImageUrl="~/Images/Refresh.gif" ImageAlign="Middle" />
    </asp:LinkButton>
  </div>                                            
</CommandItemTemplate>

When i click the refresh button on the DetailTable, the MasterTableView gets rebound.
Is it possible to only have the DetailTable GridTableView to rebind?

Kind regards.
Jeroen Eikmans
Top achievements
Rank 1
 answered on 05 Nov 2010
1 answer
109 views
I was on the sitefinity demo site and in the radeditor there I pasted in some html into the html mode tab...swapped between design and html modes...and it was all properly formatted (indented, not one giant string)

I went over to the site I was working on and they have a newer version of the RadEditor and it DOESNT do that...

Where can I enable this? :)

Steve
Rumen
Telerik team
 answered on 05 Nov 2010
1 answer
447 views
Hi,
I have top and bottom panels. Top panel wraps a RadGrid, bottom panel wraps a text box and a save button. If the height of a grid is larger than the container, I want to display  grid  with a focus on last row. I know how to do this in asp.net Gridview but couldnot find the currentcell property for RadGrid.

In ASP.NET GRIDVIEW, given below is the code to focus on last row;
 dataGridView1.CurrentCell = dataGridView1.Rows[dataGridView1.Rows.Count - 1].Cells[0];

Can someone help me out on this?

Thanks!
Prava
       
Shinu
Top achievements
Rank 2
 answered on 05 Nov 2010
1 answer
110 views
Hello,
I have a simple form consisting of :
- raddatetimepicker
- checkbox

I want to validate raddatetimepicker to see whether or not the user enters the date& time when the checkbox control is checked.
If the checkbox is unchecked, no validation is occurred.

How do I accomplished this?

Thanks
Brew
Shinu
Top achievements
Rank 2
 answered on 05 Nov 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
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
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?