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

I am using TreeView inside a fixed-size Div on one of my aspx pages. Whenever there are nodes that exceed the fixed width, the treeview appears with both horizontal and vertical scrollbars, even when the number of nodes is very small and can easily fit within the fixed height.

I have tried setting the style to 'overflow-y: hidden' as per some other posts on this forum, but that permanently hides the vertical scrollbar, making it impossible to view nodes at the bottom if the number of nodes is large. Please note that I am loading the nodes at runtime, so there is no way of knowing the height at coding time.

My question: Is there is a way to control the appearance/behaviour of the vertical scrollbar, independent of the horizontal scrollbar in TreeView? And if so, how can that be done.

Thanks.

Yana
Telerik team
 answered on 09 Apr 2009
1 answer
76 views
I'm currently working on doing some testing on a site using the Rad Editor controls for forums and new posts and have run into an issue.
I'm experiencing serious display issues in Opera.

Mainly the Rad Editor content extends beyond the bottom border and overlaps the text positioned below it.
I can see the main content is expanding beyond the bottom edge and corners by almost 50 pixels.
Resizing carefully can put the borders back in the right position, but that isn't really a good experience for the user.

I found a fix by adjusting the height for this exact same issue in Safari, but in Opera --- No luck.

Curious what exactly the claimed support for Opera may be and if this is a known issue.
Martin
Telerik team
 answered on 09 Apr 2009
4 answers
137 views
Hi,
I have customized the RADGrid Pager in such a way that it uses NexPrevandNumeric Pager Style and has a dropdown to change the pagesize. The issue I face is mentioned below:

1. Consider a grid with total records of 21
2. If I select 10 records as page size the paging works.
3. If I select 25 from the dropdown for setting the page size the entire pager disappears.

PFB the code used for adding the controls and the code to add the controls.

public class RADGridPager:Control
    {
        private GridTableView tableView;
        DropDownList ddlPageSize;
        public RADGridPager(GridTableView tableView)
        {
            this.tableView = tableView;
            this.EnsureChildControls();
        }
        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            this.Controls.Add(new LiteralControl("Change Page Size: "));
            ddlPageSize = new DropDownList();
            ddlPageSize.ID = "ddlPager";
            ddlPageSize.Items.Add(new ListItem("10", "10"));
            ddlPageSize.Items.Add(new ListItem("15", "15"));
            ddlPageSize.Items.Add(new ListItem("20", "20"));
            ddlPageSize.Items.Add(new ListItem("25", "25"));
            ddlPageSize.AutoPostBack = true;
            ddlPageSize.Attributes.Add("style", "font-family: verdana; font-size: 10px;");
            ddlPageSize.SelectedIndexChanged += new EventHandler(ddlPageSize_SelectedIndexChanged);
            this.Controls.Add(ddlPageSize);
            this.Controls.Add(new LiteralControl("<br /><br />"));
        }

        protected override void OnPreRender(EventArgs e)
        {
            ddlPageSize.SelectedValue = tableView.PageSize.ToString();
            base.OnPreRender(e);
        }

        protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.tableView.PageSize = int.Parse(this.ddlPageSize.SelectedValue);
            this.tableView.CurrentPageIndex = 0;
            this.tableView.Rebind();
        }
    }

Code to consume the RADGrid Pager:

protected void rgUserList_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridPagerItem)
            {
                GridPagerItem pagerItem = (GridPagerItem)e.Item;
                pagerItem.PagerContentCell.Controls.Add(new LiteralControl("<br /><br />"));
                pagerItem.PagerContentCell.Controls.Add(new RADGridPager(e.Item.OwnerTableView));
            }
        }
Please let me know how to go about this. Thanks.




Yavor
Telerik team
 answered on 09 Apr 2009
3 answers
113 views
Hi I have a RadGrid with groups and static headers.  This causes display issues: The group headers are not aligned correctly.  I have tried several skins and they all appear to have this issue.


I also have group footers visible, perhaps this is contributing to the problem.

Would love to attach an image but no attach available.

Any workaround available?

Thanks

Guido Tapia
Dimo
Telerik team
 answered on 09 Apr 2009
3 answers
71 views
I'm using the latest Grid and am loving the new Page Size control in the pager. However I have noticed a problem in IE7 where something causes the droplist control to become scrollable. I have not yet figured out what causes it, but it may be changing pages or the page size or some combination.  I have screenshots of what it looks like but just realized I can't upload a picture in this posting.
Dimo
Telerik team
 answered on 09 Apr 2009
1 answer
199 views
Is there a way to change the forecolor dynamically for each radslideritem? I want to change it through javascript. Im using RadControls for ASPNET AJAX Q1 2009.

Thanks
Tsvetie
Telerik team
 answered on 09 Apr 2009
21 answers
866 views
I have a simple RadNumericTextbox (prometheus version) with the following properties set.
<telerik:RadNumericTextBox ID="priceTextbox" runat="server" AutoPostBack="True" MinValue="0" Type="Currency"></telerik:RadNumericTextBox> 



I use the text box to capture some values from the user and save these values to the database. Everything works as expected at this stage.

However, when i retrieve the data from the database and attempt to redisplay the data some weird behaviour occurs. When the page loads, the text box appears to have the correct value in there (and focus is on that textbox). If i move focus away from the textbox, without changing the value, the text box will now display a number that is a factor of 100 less than the original
e.g. if the value was $250.00, once focus leaves the box it becomes $0.25.
If i manually type in 250 on top of the original 250 this problem does not occur.

The way i populate the textbox is shown below:

//unit_price is a decimal value retrieved from a database.
//This value is correct when retrieved from the database 
 
priceTextbox.Value = Convert.ToDouble(unit_price); 

Any help would be appreciated
Pavel
Telerik team
 answered on 09 Apr 2009
3 answers
958 views
What is the difference between using the HeaderStyle-Width attribute of RadGrid vs the Width attribute of ItemStyle? I have experiemented with both and they do not always appear to be equivalent. Can anyone add any color to how these two work?
Dimo
Telerik team
 answered on 09 Apr 2009
2 answers
284 views
Hi

I have the following date time column in a Telerik radGrid:

<

 

telerik:GridDateTimeColumn DataField="SubmissionDate"

 

 

HeaderText="Submission Date" SortExpression="SubmissionDate"

 

 

UniqueName="SubmissionDate" PickerType="DateTimePicker"

 

 

FilterControlWidth="120px" DataFormatString="{0:dd MMMMMMMMMMMM yyyy HH:mmm}"

 

 

DataType="System.DateTime">

 

 

</telerik:GridDateTimeColumn>

Filtering is also enabled for the columns.
The filter for this column will display a date time picker.

The problem is that the date time picker's pop up images are not displaying and the calendar and time selections are transparent.

What am I missing?

Thanks

 

Dimo
Telerik team
 answered on 09 Apr 2009
1 answer
690 views

Hi,

it is possible that to call a already existing OnClick - Event in my Grid (for example OnClick="lbEdit_Click") in my <ItemTemplate> node?

I have to try $find("<%= RadGrid1.MasterTableView.ClientID %>").editItem(editedRow), but i think this is only to use for a Inline-Edit-Mode, or?

What can be the solution?

Regards

ASCX

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AL.ascx.cs" Inherits="AL" %> 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
 
       <!-- content start --> 
       <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
 
<script type="text/javascript">  
      
    //-----------------------------------------------------------  
 
    function OnClientCloseHandler(sender, args) {  
        document.getElementById("btnRefresh").click();  
    }  
    //-----------------------------------------------------------  
 
    function RowDblClick(sender, eventArgs) {  
 
        document.getElementById("toEditRow").value = eventArgs.get_itemIndexHierarchical();  
        document.getElementById("btnRefresh").click();  
          
        //alert($find("<%= RadGrid1.MasterTableView.ClientID %>").editItem(editedRow));   
    }  
 
    //-----------------------------------------------------------  
</script> 
 </telerik:RadCodeBlock> 
 
<input type="text" id="toEditRow" name="toEditRow" value="-1"  style="display:none" /> 
<input type="submit" id="btnRefresh" name="btnRefresh" style="display:none" /> 
 
<telerik:RadGrid ID="RadGrid1" runat="server"    
    AllowPaging="true" 
    PageSize="5" 
    AutoGenerateColumns="False"   
    onneeddatasource="RadGrid1_NeedDataSource"   
    AllowSorting="True" 
    onitemcreated="RadGrid1_ItemCreated"   
    AllowAutomaticInserts="True"   
    Width="100%">  
    <PagerStyle Mode="NextPrevAndNumeric" /> 
      
    <ClientSettings allowrowsdragdrop="false" AllowColumnsReorder="false"    
        AllowDragToGroup="false" ReorderColumnsOnClient="false">  
        <Selecting AllowRowSelect="True" /> 
        <ClientEvents OnRowDblClick="RowDblClick" /> 
        <Resizing   
            AllowColumnResize="true" 
            AllowRowResize="true"   
            ClipCellContentOnResize="false"   
            ResizeGridOnColumnResize="false" /> 
    </ClientSettings> 
          
    <HeaderContextMenu> 
    </HeaderContextMenu> 
    <MasterTableView CommandItemDisplay="None"   
        DataKeyNames="NumberofInfotypeRecordWithSameKey" EditMode="EditForms"   
        CellSpacing="-1">  
 
        <EditFormSettings EditFormType="Template"></EditFormSettings> 
        <RowIndicatorColumn Visible="True"></RowIndicatorColumn> 
          
        <Columns> 
            <telerik:GridTemplateColumn UniqueName="Name1"   
                AllowFiltering="true" HeaderText="Name1"   
                SortExpression="Name1" Visible="true">  
                <ItemTemplate> 
                    <asp:Label ID="Name1" runat="server"   
                        Text="Name1"></asp:Label> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
              
            <telerik:GridBoundColumn DataField="Name9" DataFormatString="{0:d}"   
                HeaderText="Name9" UniqueName="Name9" SortExpression="Name9"   
                Visible="true" AllowFiltering="true"/>  
              
            <telerik:GridBoundColumn DataField="Name10" DataFormatString="{0:d}"   
                HeaderText="Name10" UniqueName="Name10" SortExpression="Name10"   
                Visible="true" AllowFiltering="true" /> 
              
            <telerik:GridBoundColumn DataField="Name2" HeaderText="Name2"   
                UniqueName="Name2" SortExpression="Name2" Visible="true"   
                AllowFiltering="true"/>  
              
            <telerik:GridBoundColumn DataField="Name3" HeaderText="Name3" UniqueName="Name3"   
                SortExpression="Name3" Visible="true" AllowFiltering="true" /> 
              
            <telerik:GridBoundColumn DataField="Name4" HeaderText="Name4"   
                UniqueName="Name4" SortExpression="Name4"   
                Visible="true" AllowFiltering="true"/>  
              
            <telerik:GridTemplateColumn UniqueName="Name5" AllowFiltering="true"   
                HeaderText="Name5" SortExpression="Name5" Visible="true""> 
                <ItemTemplate> 
                    <asp:Label ID="CK" runat="server" Text='<%# Eval("C") %>' ToolTip='<%# GetCD(Eval("CK")) %>'>  
                    </asp:Label> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
              
            <telerik:GridTemplateColumn UniqueName="TemplateEditColumn"   
                AllowFiltering="false">  
                <ItemTemplate> 
                    <asp:LinkButton ID="lbtnEdit" runat="server" Text="Edit" CommandName="Edit"   
                        OnClick="lbEdit_Click">  
                    </asp:LinkButton> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn UniqueName="TemplateDeleteColumn"   
                AllowFiltering="false">  
                <ItemTemplate> 
                    <asp:LinkButton ID="lbtnDelete" runat="server" Text="Delete"   
                        CommandName="Delete" OnClick="lbDelete_Click">  
                    </asp:LinkButton> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
 
        </Columns> 
    </MasterTableView> 
       
</telerik:RadGrid> 
 
<telerik:RadWindow ID="rwUserListDialog" runat="server" Title="AD"   
    Height="100px" OnClientClose="OnClientCloseHandler" 
    Width="170px" Left="150px" Behaviors="Close" Modal="True"   
    VisibleStatusbar="False" Behavior="Close" ReloadOnShow="false" InitialBehavior="None" NavigateUrl="" style="display: none;" Top="" /> 
 
 

I want to use the (Line 103)  onclick="lbEdit_Click"

Codebehind
        protected void lbEdit_Click(object sender, EventArgs e)  
        {  
            LinkButton lbtn = sender as LinkButton;  
            if (lbtn != null)  
            {  
                if (lbtn.CommandName == "Edit")  
                {  
                    int index                           = Convert.ToInt32(lbtn.CommandArgument);  
                    rwUserListDialog.NavigateUrl        = "ADP.aspx?Event=" + lbtn.CommandName + "&Index=" + index.ToString();  
                    rwUserListDialog.VisibleOnPageLoad  = true;  
                }  
            }  
        }  
 
Shinu
Top achievements
Rank 2
 answered on 09 Apr 2009
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?