Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
152 views
Hi There,

We are in a process to get the licence for Telerik RAD editor for Moss-2007.  I had some questions:

1) We are in process to get ASP.NET AJAX Version Q2 2010. Could you please let us know, which version it would translate into? Eg. 5.4.1 etc.

2) What is the latest version for Telerik RAD Editor for Moss-2007.  Is it 5.4.1?  If no, then what would be the latest version and what are the differences between latest version and 5.4.1.

3) Can you elaborate about Telerik RAD Editor LITE.  How different it is from regular Telerik RAD Editor.

4) Lastly, can you pls. share with us the structure of the licensed editor.  Eg. would we get an WSP or a Solution file.

Thanks
Amit Kumar

Emilia
Telerik team
 answered on 10 Aug 2010
1 answer
196 views
Hello,

My page has 3 sections, header, footer, and content - where the grid should take 100% height).

The grid has scrolling with static header.

I want the grid to take the full height of the middle div. And the height should work with browser/pane resizing.

It works fine in Firefox and Chrome. But in IE7 the grid is squashed up.

Here is my code.

Thanks a lot in advance!
==============================================================================
<%@ Page Language="C#" %>
<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<!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">
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <title>RadGrid for ASP.NET</title>
    <style type="text/css">
        html
        {
            overflow: auto;
        }
        html, body, form
        {
            margin: 0;
            height: 100%;
        }
        .header
        {
            height: 50px;
        }
        .container
        {
            position: absolute;
            top: 50px;
            bottom: 50px;
            width: 100%;
        }
        .footer
        {
            position: absolute;
            bottom: 0;
            height: 50px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div class="header">
        </div>
        <div class="container">
            <rad:RadGrid ID="RadGrid1" runat="server" DataSourceID="XmlDataSource1" AllowPaging="true"
                PageSize="40" Width="100%" Height="100%" Style="border: 0; outline: none">
                <MasterTableView TableLayout="Fixed" />
                <ClientSettings>
                    <Selecting AllowRowSelect="true" />
                    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                </ClientSettings>
            </rad:RadGrid>
        </div>
        <div class="footer">
        </div>
        <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/datasource.xml" />
    </form>
</body>
</html>
Dimo
Telerik team
 answered on 10 Aug 2010
5 answers
194 views
Hi all,

I have a context menu in a grid. The context menu works as it should but when I right click on areas in the grid that are not rows or columns then I get a code error because there is no row selected. If you look at the attached image you can see what I mean.

Code is below. I've set the context menu target to the grid.

Thanks for any help!

         <asp:SqlDataSource ID="SqlDataSource_PT20" runat="server">
         </asp:SqlDataSource>
     </asp:PlaceHolder>
<asp:PlaceHolder ID="PlaceHolder2" runat="server">
<input type="hidden" id="RadGridClickedRowIndex" name="RadGridClickedRowIndex" value="1" />
 <telerik:RadGrid ID="RadGrid_PT20" runat="server" AutoGenerateColumns="false" 
 AllowMultiRowSelection="false" AllowPaging="True" AllowCustomPaging="True" PageSize="15" AllowAutomaticInserts="false"
 GridLines="None" CellPadding="0" AllowSorting="false" Skin="Default" OnItemDataBound="Att_Log_Translate"
 ItemStyle-VerticalAlign="Top" OnNeedDataSource="RadGrid_PT20_NeedDataSource">
     <ExportSettings IgnorePaging="false" OpenInNewWindow="true">
         <Pdf PageHeight="297mm" PageWidth="210mm" PageTitle="OnTime System Logs" />
     </ExportSettings>
     <PagerStyle Mode="NextPrevAndNumeric"/>
     <MasterTableView Width="100%" CommandItemDisplay="Top" GridLines="None" AllowAutomaticInserts="false">
     <CommandItemSettings ShowAddNewRecordButton="false" />
     <CommandItemTemplate>
         <telerik:RadToolBar ID="RadToolBar_PT20" runat="server" Skin="Default" 
         OnButtonClick="RadToolBar_PT20_CommandClick">
             <Items>
                 <telerik:RadToolBarDropDown Text="Export" ImageUrl="Images/pdf_icon.gif">
                     <Buttons>
                         <telerik:RadToolBarButton Text="Export Current View"  Group="Bold" 
                         CheckOnClick="true" AllowSelfUnCheck="true" 
                          CommandName="ExportToPDF" ImageUrl="Images/pdf_icon.gif"/>
                         <telerik:RadToolBarButton Text="Export All Records" Group="Italic" 
                         CheckOnClick="true" AllowSelfUnCheck="true" />
                     </Buttons>
                 </telerik:RadToolBarDropDown>
             </Items>
         </telerik:RadToolBar>
     </CommandItemTemplate>
         <Columns>
               
              <telerik:GridBoundColumn UniqueName="Log_ID" DataField="Attendance_Logs_Auto_ID" HeaderText="Log ID"
              Visible="false"/>
              <telerik:GridBoundColumn UniqueName="Employee_First_Name" DataField="Employee_First_Name" HeaderText="First Name"
              Visible="false"/>
             <telerik:GridTemplateColumn UniqueName="PT20_Left_Column" HeaderText="Type" HeaderStyle-Width="40%">
                 <ItemTemplate>
                       
                     <asp:Panel ID="Panel3" runat="server" CssClass="logs_table_text">
                         <asp:Literal ID="Literal_Att_Logs_DateTime" runat="server" 
                         Text='<%# Eval("Attendance_Logs_DateTime").ToString() %>'></asp:Literal>
                         <br />
                         <asp:Literal ID="Literal2" runat="server" meta:resourcekey="Literal2Resource1"
                          Text="T: "></asp:Literal>
                         <asp:Literal ID="Literal_Att_Logs_Terminal_Name" runat="server" 
                         Text='<%# Eval("Terminal_Name").ToString() %>'></asp:Literal>
                     </asp:Panel>
                 </ItemTemplate>
             </telerik:GridTemplateColumn>
               
             <telerik:GridTemplateColumn UniqueName="PT20_Right_Column" HeaderText="Description" HeaderStyle-Width="60%">
                 <ItemTemplate>
                 <asp:Panel ID="Panel4" runat="server" CssClass="logs_table_text" >
                     <asp:Literal ID="Literal_Att_Logs_Employee_Name" runat="server" 
                     Text='<%# Eval("Employee_First_Name").ToString() %>'></asp:Literal>
                         <asp:Literal ID="Literal_Att_Logs_Employee_Name1" runat="server" 
                         Text='<%# Eval("Employee_Last_Name").ToString() %>'></asp:Literal>
                         <br />
                         <asp:Literal ID="Literal1" runat="server" meta:resourcekey="Literal1Resource1" Text="-">
                         </asp:Literal>
                         <asp:Literal ID="Literal_Att_Logs_Type" runat="server"
                          Text='<%# Eval("Attendance_Logs_Type").ToString() %>'>
                          </asp:Literal>
                 </asp:Panel>
                 </ItemTemplate>
             </telerik:GridTemplateColumn>
         </Columns>
     </MasterTableView>
     <ClientSettings>
         <Selecting AllowRowSelect="true" />
         <ClientEvents OnRowContextMenu="PT20_ContextMenu"></ClientEvents>
     </ClientSettings>
 </telerik:RadGrid>
 <telerik:RadContextMenu ID="RadMenu_PT20" runat="server" OnItemClick="RadMenu_PT20_ItemClick"
 Skin="Default" >  
       <Items>  
            <telerik:RadMenuItem Text="Go to Employee" />
            <telerik:RadMenuItem Text="Go to Terminal" />  
            <telerik:RadMenuItem Text="Edit Record" />  
       </Items>  
       <Targets>  
            <telerik:ContextMenuControlTarget ControlID="RadGrid_PT20"/>  
       </Targets>  
 </telerik:RadContextMenu>
Yana
Telerik team
 answered on 10 Aug 2010
3 answers
132 views
Hi, I'm trying to resolve an issue I've been recently discovering which I find a bit annoying: I've developed a site with some telerik controls and uploaded it to my ISP. The application works more or less ok but I've realized that after a certain period of inactivity the application kind of falls asleep: eg. clicks on a RadMenu control affect no response no more. I've witnessed a similar behaviour also on the telerik documentation page for the different controls: if you leave that page open for a while and then select an item nothing happens - one has to reload again in order to get it working. Also I haven't been able to detect how long it takes, before the application stops responding to user input. Can anyone shed some light on this issue ?

Thanks, Wolfgang
Wolfgang Sigel
Top achievements
Rank 1
 answered on 10 Aug 2010
7 answers
208 views
i am using the hierarchy in my application and multiple records can be collapsed at a time in that. but i want only one record to be expanded at a time. if already one record is expanded then that one must collapsed before the other one is expanding.
Tsvetoslav
Telerik team
 answered on 10 Aug 2010
9 answers
175 views
I'm trying to automate the registering of CSS files for a skin in an assembly and, for the most part, I've succeeded. The majority of the work is done by the following 2 methods...

public void ApplySkin(Control target)
{
    if (target == null)
    {
        return;
    }
    if (!target.Visible)
    {
        return;
    }
    if (target is ISkinnableControl)
    {
        AvailableSkin skinToUse = AvailableSkins.Find(s => s.Name == Skin);
        if (!skinToUse.IsEmbedded)
        {
            RegisterControlSkin(skinToUse, target.GetType().Name);
 
            if (target.GetType().Name == "RadEditor")
            {
                RegisterControlSkin(skinToUse, "RadWindow");
                RegisterControlSkin(skinToUse, "RadTabStrip");
                RegisterControlSkin(skinToUse, "RadGrid");
            }
        }
        //TODO: Need to have a flag on each item to determine if it is embedded or not
        ((ISkinnableControl)target).EnableEmbeddedSkins = skinToUse.IsEmbedded;
        ((ISkinnableControl)target).Skin = skinToUse.Name;
    }
    else
    {
        if (target.Controls.Count > 0)
        {
            foreach (Control child in target.Controls)
            {
                ApplySkin(child);
            }
        }
    }
}
void RegisterControlSkin(AvailableSkin Skin, string Control)
{
    RadStyleSheetManager mgr = Page.Master.FindControl("RadStyleSheetManager1") as RadStyleSheetManager;
 
    string controlName = Control;
    if (Control.StartsWith("Rad"))
    {
        controlName = Control.Remove(0, 3);
    }
    if (!skinnedControls.Contains(controlName))
    {
        string fileName = String.Format("{0}.{1}.{2}.{1}.css", Skin.Assembly, Skin.Name, controlName);
        StyleSheetReference skinRef = new StyleSheetReference(fileName, Skin.Assembly);
        mgr.StyleSheets.Add(skinRef);
        skinnedControls.Add(controlName);
    }
}

What I'm struggling with ATM is skinning of the RadEditor dialogs. You'll see that the ApplySkin() method registers the CSS files for the Grid, Window and TabStrip controls which are used by the dialog, but I am seeing SS1 when I open one of the dialogs.

I suspect that the problem is that the content of the window is using a separate page source and the custom skin items aren't being registered on that page.

How do I get around this?

-- 
Stuart
Stuart Hemming
Top achievements
Rank 2
 answered on 10 Aug 2010
1 answer
83 views
I am not sure if this is the right place for me to ask the technical question . Let me know please if this is not the right place.

I am using a radmenu control  set on the page vertically.   It goes down to three level. Now what I want to set is to show the link of the parent node as we go down on the nodes. 

For example when click on the root control and go down to the parent  and then to its child  nodes in the parth should be hightlighted. 

Also I must say we populate the RadMenu control dynamically at runtime. 

I have tried many examples on around the internet but no prevail. Please help thanks.
Yana
Telerik team
 answered on 10 Aug 2010
1 answer
111 views
Is there a built in way to send up multiple values to the Service?
Svetlina Anati
Telerik team
 answered on 10 Aug 2010
0 answers
201 views
So i have the need to create programmatically a grid so I began to dig around to see how this could be done, and found i needed to implement the ITemplate interface. So the following classes is those implementations. One for the header template, one for the itemtemplate and one for the footer template.

My problem is, for the first column, all works out great, with the numeric RadNumericTextBox validating good, the footer sums the values i put on the items RadNumericTextBox and it's perfect. But for the other columns, the it seems like it's a normal textbox. No validation is made, the the footer doesnt sum up the values. In attachment is the imagem of the final grid.

And sorry for the long post :)

The is the Header template. I have the need to divide the header into 2 columns, One will have the values from the datasource and the other will contain RadNumericTextBox with the type of currency. (see attachment for a visualization of the final result)

public class RadGridHeaderTemplate : ITemplate
{ 
    private string _columName;
    public string ColumName
    {
        get { return _columName; }
        set { _columName = value; }
    }
    public RadGridHeaderTemplate(string cName)
    {
        _columName = cName;
    }
  
    public RadGridHeaderTemplate()
    {
    }
  
    public void InstantiateIn(Control container)
    {
        Table table = new Table();
        TableRow row1 = new TableRow();
        TableRow row2 = new TableRow();
  
        TableCell cell11 = new TableCell();
        TableCell cell21 = new TableCell();
        TableCell cell22 = new TableCell();
  
        cell11.ColumnSpan = 2;
        cell11.BackColor = System.Drawing.Color.Aqua;
        cell11.Text = ColumName;
        row1.Cells.Add(cell11);
  
        cell21.Text = "Valores Actuais";
        cell21.BackColor = System.Drawing.Color.Aqua;
        row2.Cells.Add(cell21);
  
        cell22.Text = "Valores Novos";
        cell22.BackColor = System.Drawing.Color.Aqua;
        row2.Cells.Add(cell22);
  
        table.Rows.Add(row1);
        table.Rows.Add(row2);
        container.Controls.Add(table);
    }
}

This is the Item Template, where i fill the values. One of the cells will have the values from the datasource, the other will contain a RadNumericTextBox  (see attachment for a visualization of the final and for an example of the datasource)

public class RadGridItemTemplate: ITemplate
{
    protected LiteralControl lControl;
    protected RangeValidator validatorTextBox;
    protected RadNumericTextBox textBox;
    private string _columnName;
    private string _headerName;
    private bool _isOrigin;

    
public string ColumnName
    {
        get { return _columnName; }
        set { _columnName = value; }
    }
  
    public string HeaderName
    {
        get { return _headerName; }
        set { _headerName = value; }
    }
  
    public bool IsOrigin
    {
        get { return _isOrigin; }
        set { _isOrigin = value; }
    }

    
public RadGridItemTemplate(string cName, string hName, bool isOrigin)
    {
        _columnName = cName;
        _headerName = hName;
        _isOrigin = isOrigin;
    }
    public RadGridItemTemplate()
    { 
    }

    
public void InstantiateIn(Control container)
    {
        Table table = new Table();
        table.BorderColor = System.Drawing.Color.Black;
        table.Style.Add(HtmlTextWriterStyle.BorderWidth, "1px");
        TableRow row1 = new TableRow();
  
        textBox = new RadNumericTextBox();
        textBox.ID = "templateColumnTextBox";
        textBox.Type = NumericType.Currency;
        textBox.ClientEvents.OnBlur = "Blur";
        textBox.ClientEvents.OnFocus = "Focus";
        textBox.Width = Unit.Pixel(60);
  
        if (IsOrigin)
        {
            lControl = new LiteralControl();
            lControl.ID = "lControl";
            lControl.DataBinding += lControl_DataBinding;
  
            TableCell cell11 = new TableCell();
            TableCell cell12 = new TableCell();
  
  
            cell11.Width = Unit.Pixel(50);
            cell11.Style.Add(HtmlTextWriterStyle.TextAlign, "center");
            cell11.Controls.Add(lControl);
            cell12.Controls.Add(textBox);
  
            row1.Cells.Add(cell11);
            row1.Cells.Add(cell12);
        }
        else
        {
            TableCell cell11 = new TableCell();
            cell11.Controls.Add(textBox);
  
            row1.Cells.Add(cell11);
        }
  
  
        table.Rows.Add(row1);
        container.Controls.Add(table);
    }

    
public void lControl_DataBinding(object sender, EventArgs e)
    {
        LiteralControl l = (LiteralControl)sender;
        GridDataItem container = (GridDataItem)l.NamingContainer;
        l.Text = String.Format("{0:C}", Convert.ToDouble(((DataRowView) container.DataItem)[ColumnName]));
    }


Footer template for my column. On the footer, I want to have the sum of all values of the textboxes. For that I use javascript, indicated on the line textBox.ClientEvents.OnLoad = "Load";
public class RadGridFooterTemplate : ITemplate
{
    protected RadNumericTextBox textBox;
    private bool _isOrigin;
  
    public bool IsOrigin
    {
        get { return _isOrigin; }
        set { _isOrigin = value; }
    }
  
    public RadGridFooterTemplate(bool isOrigin)
    {
        _isOrigin = isOrigin;
    }
    public RadGridFooterTemplate()
    {  
    }
  
    public void InstantiateIn(Control container)
    {
        Table table = new Table();
        TableRow row1 = new TableRow();
  
        textBox = new RadNumericTextBox();
        textBox.ID = "footerColumnTextBox";
        textBox.Type = NumericType.Currency;
        textBox.ClientEvents.OnLoad = "Load";
        textBox.Enabled = false;
  
        if (IsOrigin)
        {
            TableCell cell11 = new TableCell();
            TableCell cell12 = new TableCell();
  
            cell11.Text = "Total";
            cell12.Controls.Add(textBox);
  
            row1.Cells.Add(cell11);
            row1.Cells.Add(cell12);
        }
        else
        {
            TableCell cell11 = new TableCell();
            cell11.Controls.Add(textBox);
  
            row1.Cells.Add(cell11);
        }
  
  
        table.Rows.Add(row1);
        container.Controls.Add(table);
    }
}


This final code, is where i do the assembling of the grid
 
        RadGrid radGrid = new RadGrid();
  
        radGrid.ID = "gvSetValues";
        radGrid.DataSource = buildDataTable;
        
        radGrid.AllowPaging = false;
        radGrid.AllowSorting = false;
        radGrid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
        radGrid.AutoGenerateColumns = false;
        radGrid.ShowStatusBar = true;
        radGrid.ShowFooter = true;
        radGrid.MasterTableView.ShowFooter = true;
    
        GridBoundColumn boundColumn = new GridBoundColumn();
        boundColumn.DataField = "Meses";
        boundColumn.UniqueName = "Meses";
        boundColumn.HeaderText = "Meses/PPI";
        radGrid.MasterTableView.Columns.Add(boundColumn);
  
        foreach (DataColumn column in buildDataTable.Columns)
        {
            //Add origins Columns
            if (column.ColumnName.StartsWith("O_"))
            {
                GridTemplateColumn templateColumn = new GridTemplateColumn();
                templateColumn.HeaderTemplate = new RadGridHeaderTemplate(column.ColumnName.Split('_')[1]);
                templateColumn.ItemTemplate = new RadGridItemTemplate(column.ColumnName, column.ColumnName.Split('_')[1], true);
                templateColumn.FooterTemplate = new RadGridFooterTemplate(true);
                radGrid.MasterTableView.Columns.Add(templateColumn);
                templateColumn.UniqueName = "OldValues";
            }
  
            //Add Destinations Columns
            if (column.ColumnName.StartsWith("D_"))
            {
                GridTemplateColumn templateColumn = new GridTemplateColumn();
                templateColumn.HeaderText = column.ColumnName.Split('_')[1];
                templateColumn.ItemTemplate = new RadGridItemTemplate(column.ColumnName, column.ColumnName.Split('_')[1], false);
                templateColumn.FooterTemplate = new RadGridFooterTemplate(false);
                radGrid.MasterTableView.Columns.Add(templateColumn);
            }
        }
  
        radGrid.DataBind();
        phGvMoveValues.Controls.Add(radGrid);
Rui Brito
Top achievements
Rank 1
 asked on 10 Aug 2010
4 answers
144 views
Hi All, 


Is it possible to show to asp panels inside <NestedViewTemplate> of RADGRID, so that one panel should bind with one data source
 and another panel should show bind with another data source.


Ex: <telerik:RadGrid ID="RadGrid1" runat="server" onneeddatasource="RadGrid1_NeedDataSource"  >
            
        
        <HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>

        <MasterTableView AutoGenerateColumns="False" CellSpacing="1"  CommandItemDisplay="Top" DataKeyNames="T_ID" GridLines="Vertical"
        PagerStyle-Mode="NextPrevAndNumeric"   />
               
             <NestedViewTemplate>

   <asp:Panel ID="panel1" runat="server" BorderStyle="Solid" BorderWidth="2px" >
                     <telerik:RadListView ID="RadListView1" runat="server"  DataSourceID="ObjectDataSource1"
                        ItemPlaceholderID="ParentContainer" >
                        </telerik:RadListView>
                    </asp:Panel>


           <asp:Panel ID="panel2" runat="server" BorderStyle="Solid" BorderWidth="2px" >                    
                     
                       <telerik:RadListView ID="RadListView2" runat="server"  DataSourceID="ObjectDataSource2"
                       ItemPlaceholderID="ParentContainer" >
        </telerik:RadListView>                   
                   </asp:Panel>
                     
             </NestedViewTemplate>

</MasterTableView>
        </telerik:RadGrid>

Or how can i achieve same  thing from any other alternative.

Currently i am refering http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplatedeclarativerelations/defaultcs.aspx, but in my case i need 2 panels.

naimish
Top achievements
Rank 1
 answered on 10 Aug 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?