Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
117 views
Dear All,
I am developing product in asp.net using c sharp and I have two listboxes namely ListBox1 and ListBox2 in my page and  i have list items in ListBox1 which is added dynamically and   i have list items in ListBox2 which is added statically
here i need to insert value against partcular ListBox2 item after inserting value corresponding listbox item are disabled perfectly but next item of last inserted items only enabled true due to insert value.

we can selecting ListBox1 items for ListBox2 items are visible based on inserted values to insert value. when i frequently select ListBox1 items,ListBox2 enabled true is not working some times.,
how to solve this issue,


Susi
Top achievements
Rank 1
 asked on 21 Jul 2012
1 answer
124 views
Hi,
I cant manage to update a radgrid which is in a usercontrol. My ajaxmanager is in the mainform.

my usercontol is TaniUC 
I manage to fire ajaxrequest event from usercontol. But i can not update radgrid. I use TaniEkle(ID) which is a public func in my usercontol,add a row to my radgrid.
It is adding but not updating on screen.


protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            if(e.Argument=="taniekle")
            {
                int ID = DataReader.GetInt32(Request.Form["grdTanilarDClickedRowIndex"]);
                if (ID > 0)
                 {
                     ucpTani.TaniEkle(ID);
                 }
                return;
            }
}



<telerik:RadAjaxManager ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
       runat="server">
       <AjaxSettings>               
        
 
           <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
               <UpdatedControls>
                  <telerik:AjaxUpdatedControl ControlID="grdHastalar" LoadingPanelID="RadAjaxLoadingPanel1" />
               </UpdatedControls>
           </telerik:AjaxSetting>
          <telerik:AjaxSetting AjaxControlID="grdHastalar" EventName="OnRowClick" >
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="TaniUC"  LoadingPanelID="RadAjaxLoadingPanel1" />
               </UpdatedControls>
           </AjaxSettings>
   </telerik:RadAjaxManager>
Nazım
Top achievements
Rank 1
Iron
 answered on 21 Jul 2012
12 answers
671 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
456 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
115 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
99 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
122 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
114 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
89 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
211 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?