Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
585 views
Hi,
I'm trying to follow a simple example using a RadGrid. Example is from RadControlsAJAXCourseWare.pdf (ch. 18), shorten the column header and provide a tooltip with the full "column header" description. Problem is that I got error message "The type or namespace name 'WebControls' does not exist in the namespace 'Telerik' (are you missing an assembly reference?)". I can't add namespace WebControls with directive 'using Telerik.WebControls;' so I must have missed something? I have added references 'Telerik.Web.UI' and 'Telerik.Web.Design'. Any kind of advice/help is highly appreciated!
Jo
Top achievements
Rank 1
 answered on 21 Jul 2012
6 answers
426 views
I just downloaded the latest version of your ASP.NET Controls and I am trying to use them in an existing ASP.NET Project. I get a "Error Creating Control" message for every one of the Telerik ASP.NET Controls. I have done everything listed in your help pages including registering the Telerik.Web.Design.dll in the GAC and copying it to the projects BIN directory and referencing it directly from there. Nothing is working. Please help. See attached screenshot.
Pavlina
Telerik team
 answered on 20 Jul 2012
0 answers
91 views
Hi telerik,

I am using rad progress area as busy indicator. My scenario is i will upload a excel file into server location, after  successful  upload i am showing a message box with OK button(used ajax modal popup) to user.when user click on OK,i am downloading file from server to local machine. my issue is while uploading rad progress area works fine but while downloading it displays the rad progress area,after the file is saved or cancelled by user the rad progress area is not closing.
i observed that while downloading file i got thread abort exception.please reply with solution ASAP.


Naveen T
Top achievements
Rank 1
 asked on 20 Jul 2012
1 answer
71 views
Hello

I can't find, how to add a lot of data using webservices

For example

I have a list of persons, when i expand the name I want to complete de treeview with all of data (All of adresse, all of children, ....), and not have to do many return to the server

Personne
+Martin
+Durand

Expand Martin done
-Martin
     + Adresse
     + Child
     + ......

Is it possible.... ?

I can't found how to transform RadTreeNodeData to RadTreeNode


Does someone can help me !!!!????

Thank you

Anne




Marbry
Top achievements
Rank 1
 answered on 20 Jul 2012
3 answers
99 views
I noticed some unspected behaviour using chrome browser when the radDockZone exceeds its fixed height, pretty much same issue same scenario found in this thread 2009 raddock issue in this same forum.

I also prepared a couple of videos demonstrating the case scenario using several browsers

IE8 working good
Chrome - not working good
Firefox working good

is this a known issue? any idea how to approach a fix for it?

BTW this issue occurs only when there's a fixed height in the raddockzone in CHROME.

thx- in advanced

Douglas
Slav
Telerik team
 answered on 20 Jul 2012
4 answers
96 views
Hi,

I am trying to localize a RadListBox.

Here is the aspx markup:
<telerik:RadListBox ID="rlbReadOnlyGroups" runat="server" meta:resourcekey="rlbReadOnlyGroups">
</telerik:RadListBox>

Here is my resource file:
rlbReadOnlyGroups.EmptyMessage              Aucun groupe assigné
rlbReadOnlyGroups.AllToLeft                 Tous à gauche
rlbReadOnlyGroups.Localization.AllToLeft    Tous à gauche
rlbReadOnlyGroups.Localization-AllToLeft    Tous à gauche


As you can see, I tried to set the property "AllToLeft" by different means, but in all cases it fails to show the French translation "Tous à gauche". The EmptyMessage property is shown correctly, but all the property linked to the buttons does not work.

Anyone had this issue?
David
Top achievements
Rank 1
 answered on 20 Jul 2012
1 answer
65 views
I have a xmlhttppanel loading inside a radajaxloading panel and then a radgrid inside the xmlpanel. When there is a selection in the radgrid made it triggers a grid selected function which is where the onservicerequest is made. The problem is the panel.set_value is showing the panel null even though I am using the var panel = $find("<%=xmlPanel1.ClientID %>"); any ideas??

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" Runat="Server">
   
    <script type="text/javascript">
        function rdGrid1_RowSelected(sender, args) {
            var StartDate = args.getDataKeyValue("Start Date");
            var EndDate = args.getDataKeyValue("End Date");
            var panel = $find("<%=xmlPanel1.ClientID %>");
            panel.set_value(StartDate + '|' + EndDate);
        }
        </script>

   
    <style type="text/css">
        .style1
        {
            font-size: medium;
            font-weight: bold;
        }

        .divContainer
        {
            width: 100%;
            height: 160px;
            position: relative;
        }
        .divGrid, .divXmlHttpPanel
        {
            position: absolute;
            top: 2px;
            left: 0px;
        }
        .divXmlHttpPanel
        {
            top: 2px;
            left: 170px;
        }
        .lblstyle
        {
            font-weight: bold;
            font-size: medium;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_LeftNav" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_MainContent" Runat="Server">
    <%--<p>--%>
        <br />

        <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="chkComplete">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="chkComplete" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="radGrids">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rdGrid1" LoadingPanelID="rdPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="rdGrid2" LoadingPanelID="rdPanel2" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManagerProxy>
<div class="lblstyle">
    <asp:Label ID="lblSelect" runat="server" Font-Size="Smaller"></asp:Label>
    </div>
    <div class="divContainer">
        <div class="divGrid">
            <telerik:RadAjaxLoadingPanel ID="rdPanel1" runat="server" Skin="WebBlue"></telerik:RadAjaxLoadingPanel>
                <telerik:RadGrid ID="rdGrid1" runat="server" Skin="WebBlue" Height="150px" OnNeedDataSource="rdGrid1_DataSource"
                    GridLines="None" CellSpacing="0" Width="165px" AutoGenerateColumns="false">
                        <MasterTableView ClientDataKeyNames="Start Date, End Date" Width="100%" Summary="rdGrid1 table">
                            <Columns>
                                <telerik:GridBoundColumn HeaderText="Start Date" DataField="Start Date"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn HeaderText="End Date" DataField="End Date"></telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                        <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="false" ClientEvents-OnRowSelected="rdGrid1_RowSelected">
                            <Selecting AllowRowSelect="True" />
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                            <Resizing EnableRealTimeResize="True" />
                        </ClientSettings>
                </telerik:RadGrid>
        </div>         
        <div class="divXmlHttpPanel">
            <telerik:RadAjaxLoadingPanel ID="rdPanel2" runat="server" Skin="WebBlue"></telerik:RadAjaxLoadingPanel>
                <telerik:RadXmlHttpPanel ID="xmlPanel1" Runat="server" RenderMode="Block" LoadingPanelID="rdPanel2"
                        Value="FRANAR" OnServiceRequest="xmlPanel1_ServiceRequest" ClientIDMode="Inherit" EnableClientScriptEvaluation="true">
                    <telerik:RadGrid ID="rdGrid2" runat="server" Skin="WebBlue" GridLines="None" CellSpacing="0"
                            OnNeedDataSource="rdGrid1_DataSource" EnableClientScriptEvaluation="true">
                        <MasterTableView  AutoGenerateColumns="true" Summary="rdGrid2 table" Width="100%">
                        </MasterTableView>
                    </telerik:RadGrid>
                </telerik:RadXmlHttpPanel>
        </div>
    </div>
<div class="lblstyle">
<asp:Label ID="lblSelect2" runat="server" Font-Size="Smaller"></asp:Label>
</div>
    <p>
        &nbsp;</p>
</asp:Content>



Slav
Telerik team
 answered on 20 Jul 2012
2 answers
134 views
Hi,

I have a skeleton RadGrid on my page.
<telerik:RadGrid ID="rg" runat="server" CellPadding="2" CellSpacing="2" AutoGenerateColumns="false" EnableViewState="true"
    AllowPaging="true" PageSize="25" AllowSorting="true" AllowMultiRowSelection="true" AllowCustomPaging="true"
    OnNeedDataSource="rg_NeedDataSource" OnSortCommand="rg_SortCommand"
    OnItemDataBound="rg_ItemDataBound">
    <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="Bottom" AlwaysVisible="True" />
    <ClientSettings EnableRowHoverStyle="true">
        <Selecting AllowRowSelect="true"></Selecting>
        <ClientEvents OnRowSelected="RowSelected" OnRowDeselected="RowDeselected" />
    </ClientSettings>
</telerik:RadGrid>

On the page, when user selects the columns to see then it creates the columns dynamically.
private void DesignRadGrid()
{
    rg.MasterTableView.AllowMultiColumnSorting = true;
     
     
    var lPropertyInfo = typeof(MyObject).GetProperties(BindingFlags.Public | BindingFlags.Instance).ToList();
     
    var vColumns = from col in GetUserSelectedColumns() // return type is GridColumns
                    join pi in lPropertyInfo on col.ColumnName equals pi.Name
                    select new
                    {
                        col.ColumnId,
                        col.ColumnName,
                        col.DataType,
                        col.DisplayColumn,
                        col.ParentTable,
                        col.ParentColumn
                    };
     
    var width = 0;
    foreach (var oColumn in vColumns)
    {
        var boundColumn = new GridBoundColumn();
        GridTemplateColumn templateColumn = null;
         
        switch (oColumn.DataType)
        {
            case "Number":
                var isUnitized = UnitSystem.CheckIfUnitized(oColumn.ParentTable, oColumn.ParentColumn);
                 
                // if isUnitized then we need template column
                if (isUnitized)
                {
                    boundColumn = null;
                     
                    var unitLabel = UnitSystem.GetUnitLabel(oColumn.ParentTable, oColumn.ParentColumn, UserId);
                     
                    templateColumn = new GridTemplateColumn
                                        {
                                            HeaderText = String.Format("{0} ({1})", oColumn.ColumnName, unitLabel)
                                        };
                     
                    hdnColumnId.Value += "," + oColumn.ColumnId;
                }
            break;
             
             
            case "Date":
                boundColumn.DtaFormatString = "{0:dd-MMM-yyyy}";
                width = 75;
            break;
             
             
            case "Boolean"
                boundColumn = null;            
                templateColumn = new GridTemplateColumn();
                     
                hdnColumnId.Value += "," + oColumn.ColumnId;
            break;
             
             
            case "Text":
                if (oColumn.ColumnName.EndsWith("Remarks") || oColumn.ColumnName.EndsWith("Summary"))
                    width = 650;
            break;
        }
         
         
        // For sorting to work, the columns must be added to the rg collection before defining the properties
        // Telerik: Can you answer why?
        if (templateColumn == null)
        {
            rg.MasterTableView.Columns.Add(boundColumn);
 
            boundColumn.HeaderText = oColumn.ColumnName;
            boundColumn.SortExpression = oColumn.Name;
            boundColumn.DataField = oColumn.Name;
 
            if (width > 0)
                boundColumn.HeaderStyle.Width = width;
 
            //if (width > 0)
                //boundColumn.HeaderStyle.Width = Unit.Pixex(width);
        }
        else
        {
            rg.MasterTableView.Columns.Add(templateColumn);
 
            templateColumn.HeaderText = String.IsNullOrEmpty(templateColumn.HeaderText)
                                            ? oColumn.ColumnName
                                            : templateColumn.HeaderText;
            templateColumn.SortExpression = oColumn.Name;
            templateColumn.ItemTemplate = new MyTemplate(MyControlType.LiteralControl, "lit" + oColumn.ColumnId.ToString);
             
            if (width > 0)
                templateColumn.HeaderStyle.Width = width;
 
            //if (width > 0)
                //templateColumn.HeaderStyle.Width = Unit.Pixex(width);
        }
    }
 
    var gridCheckBoxColumn = new GridClientSelectColumn { HeaderText = String.Empty, UniqueName = "Select" };
    gridCheckBoxColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
    rg.MasterTableView.Columns.Add(gridCheckBoxColumn);
 
    var editTemplateColumn = new GridTemplateColumn();
    editTemplateColumn.ItemTemplate = new MyTemplate(MyControlType.ImageButton, "ibEdit");
    editTemplateColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
    editTemplateColumn.UniqueName = "Edit";
    rg.MasterTableView.Columns.Insert(0, editTemplateColumn);
}
 
 
 
// Class for Custom Template
public enum MyControlType
{
    Button = 0,
    ImageButton = 1,
    LiteralControl = 2
}
 
public class MyTemplate : ITemplate
{
    protected Control _ctrl;
    private MyControlType _ctrlType;
    private string _ctrlName;
 
    public MyTemplate (MyControlType ctrlType, string ctrlName)
    {
        _ctrlType = ctrlType;
        _ctrlName = ctrlName;
    }
 
    public void InstantiateIn(Control container)
    {
        switch (_ctrlType)
        {
            case MyControlType.Button:
                _ctrl = new Button {ID = _ctrlName};
                break;
            case MyControlType.ImageButton:
                _ctrl = new ImageButton {ID = _ctrlName};
                break;
            case MyControlType.LiteralControl:
                _ctrl = new LiteralControl {ID = _ctrlName};
                break;
        }
 
        _ctrl.EnableViewState = true;
        container.Controls.Add(_ctrl);
    }
}

I copied the above code from my VS to show only what I am trying to achieve. There might be typos or class name mistype because it is not clean copy/paste. Please ignore if any.

Anyway, my concern is that even if I define the width manually, it doesn't reflect in grid. I've tried setting width as Unit.Pixel and directly with value but both doesn't work.

Thanks.
Baal
Top achievements
Rank 1
 answered on 20 Jul 2012
4 answers
507 views
Hi There,

I'm busy implementing filtering of RadComboBox items from the client-side by calling the .hide() method of the combobox-item.
This results in the items I specify to be hidden from view for the user.

The problem I find is that once I click the Combo that was filtered and I click anywhere else on the html page, the items that I had set to be hidden become visible again.

Right now I think:
  1. RadCombo is executing an event once the RadCombo is focused on (selected) and then looses focus. This event makes all the items visible again.
  2. or I am not using the .hide() method correctly and require instructions for proper use,
Here is an extract of the relevant parts of the ASPX control and JS client-side method:

<telerik:RadComboBox ID="rcboProject" runat="server" AppendDataBoundItems="True"
  DataTextField="Name" DataValueField="ClientNameProjectID" DataSourceID="objProject" MarkFirstMatch="true" AllowCustomText="true" Filter="Contains"
  NoWrap="true">
  <Items>
    <telerik:RadComboBoxItem runat="server" Text="Non Project" Value="-1" />
  </Items>
</telerik:RadComboBox>


// this function is called from client side event such as a button click or perhaps even by the 
// OnClientSelectedIndexChanged event of another combo box(obviously it would need event params in that case).
function FilterProjects() {
      
    // GetProjectCombo(index)
    var projectCombo = GetProjectCombo();
            
    // Get project combo items.        
    var projectItems = projectCombo.get_items();
      
    projectCombo.trackChanges();
    // loop through, hide * projects except the top 10
    for (i = 0; i < projectItems._array.length; i++)
    {
       if (i < 10)
          continue;
        // Get Item, load its data.
        var item = projectItems.getItem(i);
        var itemValue = item.get_value();
                                  
        if (true) // simplified for Telerik support.
        {                
            item.hide(); // works temporarily until clicking on html body then it reverts back to original state.
            //item.removeAt(i); // works and persists.
            //item.disable(); // works and persists.
        }           
    }
    projectCombo.commitChanges();        
}
function GetProjectCombo(index) {
    return $find("<%= rcboProject.ClientID %>");
}

Additional Information:
Telerik Controls Version: 2010.1.415.40


Your help would be greatly appreciated.

Best,
 Llewellyn
Llewellyn
Top achievements
Rank 1
 answered on 20 Jul 2012
3 answers
108 views
Hi!Is it normal that the installation of telerik take more time than a normal installation.I have install from 21h00 pm ,now it is 6h00 am but still it is on 50%.
Chavdar Dimitrov
Telerik team
 answered on 20 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?