Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
189 views
There is an odd behavior only in IE 9, where the SearchContext combo expands to fill the entire search box.  The search text and icon are then shifted to the far right.  This happens when you first hover over the search box, and only in IE 9.  Firefox, IE 8, 10 and 11 do not exhibit this behavior.  You can see the result of this behavior in the two attached files:  Quirky.gif (see aspx source below), and from the Telerik Demo page.

Any ideas on why this happening in IE 9?  I have too many users with IE 9 to just ignore it.
Thanks!
Dave
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test2.aspx.cs" Inherits="InsureHubWeb.Test2" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" EnablePageMethods="true" runat="server">
            <Services>
                <asp:ServiceReference path="~/WS/wsIHExplorer.asmx" />
            </Services>
        </telerik:RadScriptManager>
  
        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Default" ShowChooser="false" />
  
        <telerik:RadSearchBox ID="RadSearchBox1" runat="server" 
            EnableAutoComplete="false"
            EnableViewState="false"
            Width="500" 
            Label="Look In:"
            EmptyMessage="Enter name or part of name"
        >
            <SearchContext ShowDefaultItem="false">
                <Items>
                    <telerik:SearchContextItem Text="This Folder" Key="1" />
                    <telerik:SearchContextItem Text="All Folders" Key="2" />
                </Items>
            </SearchContext>
        </telerik:RadSearchBox
    </form>
</body>
</html>
Aneliya Petkova
Telerik team
 answered on 17 Mar 2014
2 answers
262 views
Hello,

I've got a RadMultiPage that displays it's RadPageViews based on a tab selected in a RadTabStrip.
What I want to know is if every RadPageView loads all at once (When the RadMultiPage loads) or do they load individually based on the tab that is selected in the RadTabStrip.

I am trying to create a wizard and I want to know if it would be wise to use the RadPageView_Load event to handle methods for an individual RadPageView.
Say I have a RadPageView called "Step2RadPageView". What if I wanted to run certain methods ONLY when this PageView is Selected?

Similar to using a normal asp.net MultiView and using the View.Activate event.

Thanks in advance.
Cody
Top achievements
Rank 1
 answered on 17 Mar 2014
3 answers
86 views
I'm creating a new project and including the RadEditor with it. I'm experiencing 2 issues and I hope that you can help me with these. The first issue is that when I declare the DeletePaths, UploadPaths and ViewPaths with "~/Images/Sections" I get the error "Invalid characters in the filename", however it takes me to that folder after the error. If I change the path to "~/Images" it works without the error. The second issue is that the upload and delete buttons are disabled. For all the other Managers (ie, documents, flash, media and templates) everything works?

Here is where I declare my paths
<ImageManager DeletePaths="~/Images/Sections" MaxUploadFileSize="1000000" UploadPaths="~/Images/Sections" ViewPaths="~/Images/Sections" />

Here is the code behind
Dim imagepath() As String = {"~/Images/Sections"}
 
If Not IsPostBack Then
    RadEditor1.ImageManager.ViewPaths = imagepath
End If

I've spent hours going over the forum and trying everything, but nothing seems to work. All my work so far has been on the localhost.

William
Ianko
Telerik team
 answered on 17 Mar 2014
2 answers
152 views
Hello,
I have a RadHtmlChart in which i dinamically create LineSeries. I have successfully set Chart.PlotArea.YAxis.MaxValue and Chart.PlotArea.YAxis.MinValue, but XAxis.MinValue does not work. I'd like to start the series in a way that the first value "thouches" the y-axis. Because in xaxis i have 2006 as first year, I tried to set XAxis.MinValue = 2006, but I always got a gap between the y-axis and the first value in the chart (it seems that the start of xaxis is the half of 2005). I see the same gap at the end of the chart.

In attachment the screenshot of chart.

Thanks
Danail Vasilev
Telerik team
 answered on 17 Mar 2014
2 answers
209 views
The Example of keeping the expanded/collapse state of groups that Telerik provide uses the viewstate. If you have viewstate disabled, it causes a few kinks. Since I had to write this myself, I figured I'd share in case anyone needed it.

These two were in a class call telerikhelpers but you could put them anywyere
    /// <summary>
/// this loads the saved states of the group headers
/// (whether they were collapsed or expanded) you have to pass in the
/// grid you want to bind
/// </summary>
/// <param name="grid">the grid you want to bind</param>
public static void LoadGroupsExpandedState(RadGrid grid)
{
    var listCollapsedIndexes = HttpContext.Current.Session[grid.ID] as ArrayList;
 
    if (listCollapsedIndexes != null)
    {
        foreach (GridItem item in grid.MasterTableView.GetItems(GridItemType.GroupHeader))
        {
            if (listCollapsedIndexes.Contains(item.RowIndex))
            {
                item.Expanded = false;
            }
        }
    }
}//LoadGroupsExpandedState
 
/// <summary>
/// this function sets a session variable to remember which grouping items have been
/// collapsed or expanded
/// </summary>
/// <param name="grid"></param>
/// <param name="curItem"></param>
public static void SaveGroupsExpandedState(RadGrid grid, GridItem curItem)
{
    GridItem[] groupItems = grid.MasterTableView.GetItems(GridItemType.GroupHeader);
    if (groupItems.Length > 0)
    {
 
        var listCollapsedIndexes = new ArrayList();
 
        //if this first one is true, then we need to add it to the list
        //basically the state that is getting passed in is the old state
        //so if it's expanded = true, then it was expanded, and it's
        //getting collapsed
        if (curItem.Expanded)
        {
            listCollapsedIndexes.Add(curItem.RowIndex);
        }//if curItemExpanded
        else
        {
            //check if it's in the list
            if (listCollapsedIndexes.Contains(curItem.RowIndex))
            {
                listCollapsedIndexes.Remove(curItem.RowIndex);
            }//if listCollapse
        }//else
 
 
        foreach (GridItem item in groupItems)
        {
            if (!item.Expanded && item.RowIndex != curItem.RowIndex)
            {
                listCollapsedIndexes.Add(item.RowIndex);
            }
        }
        HttpContext.Current.Session[grid.ID] = listCollapsedIndexes;
    }
}//SaveGroupsExpandedState


Then attach these two functions to your itemdatabound and databound events on the acutal grid itself

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
    //get the grid
    RadGrid grid = sender as RadGrid;
 
    //if this is expand or collapse, save the state
    if (e.CommandName == RadGrid.ExpandCollapseCommandName)
    {
        TelerikHelpers.SaveGroupsExpandedState(grid, e.Item);
    }
 
}//ItemCommand
 
/// <summary>
/// This method adds logic on how to handle a databound (restore the grouping set on screen)
/// </summary>
///The parameter is not used.
///The parameter is not used.
protected void RadGrid1_DataBound(object sender, EventArgs e)
{
    TelerikHelpers.LoadGroupsExpandedState(sender as RadGrid);
}

If you make the first two accessible globally, you can literally attach multiple grids on a page to the same databound and item command events and it will just work. Hope this helps someone else!

Konstantin Dikov
Telerik team
 answered on 17 Mar 2014
3 answers
182 views
There are a few old threads up here - one from 2008 or 2009 stating that the RadGrid ExcelML export does not support line break characters.  Is this still the case?

I have a few cells that have line breaks I would like to bring through the ExcelML export - and have tried several approaches, but no luck.

Is this still an unsupported scenario?
Kostadin
Telerik team
 answered on 17 Mar 2014
2 answers
103 views
I'm watching the demo "MediaPlayer - Video Gallery" (http://demos.telerik.com/aspnet-ajax/media-player/examples/applicationscenarios/video-gallery/defaultcs.aspx), in the RadLightBox pop up the volumen bar and the progressrail bar didn't work. I'm using IE 11.

I'm built my own webapp and I found the same problem.
Eyup
Telerik team
 answered on 17 Mar 2014
4 answers
1.5K+ views
I've got a RadGrid on my page with one level of DetailTables.  Each detail table has a chevron next to it that collapses that table.  I'd like to have a chevron on the master table that expands or collapses all the detail tables (if any are expanded, it collapses them all; otherwise, it expands them all).  Is this a setting that can be set?  I would rather have the same look and feel, rather than using a button to expand or collapse all the tables. 
Eyup
Telerik team
 answered on 17 Mar 2014
1 answer
119 views
Hi.

My requirement is for a grid that will be dynamically populated,
Because of this I build the entire grid in my code behind.

I have this 99% working except for this issue with grouping:

When I group by a column and expand the group, then collapse the same group again it will collapse without any problem.

I also have these tabs which is essentially just a string value that I pass in from a hidden field it can optionally be used as a filter when I bring back a search result that will populate my grid.

The problem come in when I pass in this string; I am able to expand any of my groups, but when I want to collapse the group the page posts back but does not collapse the group again.
protected void Page_Init(object sender, System.EventArgs e)
       {
              string filterValue = HorizontalTabFilter();
               string verticalFilterValue = VerticalTabFIlter();
 
 
           DefineGridStructure();
 
       }
 
 
private void DefineGridStructure()
       {
           string searchColumns = gf.GetConfigValue(HttpContext.Current.Session["APPLICATION"].ToString(), "SEARCHCOLUMNS");
           List<string> searchColumnList = searchColumns.Split('|').ToList();
 
           RadGrid grid = new RadGrid();
           grid.ID = "RadGrid1";
           grid.AllowSorting = true;
           grid.GroupingEnabled = true;
           grid.ClientSettings.AllowGroupExpandCollapse = true;
           grid.ClientSettings.AllowDragToGroup = true;
           grid.ClientSettings.Scrolling.AllowScroll = true;
           grid.ClientSettings.Scrolling.UseStaticHeaders = true;
           grid.ClientSettings.Scrolling.SaveScrollPosition = true;
           grid.ClientSettings.Scrolling.EnableVirtualScrollPaging = true;
           grid.ClientSettings.Resizing.ResizeGridOnColumnResize = true;
           grid.ClientSettings.Resizing.AllowColumnResize = true;
           grid.ClientSettings.Resizing.EnableRealTimeResize = true;
           grid.ClientSettings.Resizing.ResizeGridOnColumnResize =  true;
           grid.ClientSettings.Resizing .AllowResizeToFit = true;
           grid.HorizontalAlign = HorizontalAlign.Left;
           grid.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
           grid.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
           grid.AlternatingItemStyle.HorizontalAlign = HorizontalAlign.Left;
           grid.EnableViewState = true;
 
if (selectedTab != "" || selectedVerticalTab != "")
           {
               grid.DataSource = null;
               grid.Rebind();
           }
 
 
           grid.DataSource = dt = ed.SearcheDOCS(selectedTab, selectedVerticalTab, selectedVerticalTabIndex);
 
           colCount = dt.Columns.Count;
           rowCount = dt.Rows.Count;
 grid.Width = Unit.Percentage(99);
           grid.Height = Unit.Percentage(99);
           grid.PageSize = Convert.ToInt32(gf.GetConfigValue(HttpContext.Current.Session["APPLICATION"].ToString(), "PAGINATION"));
           if (Convert.ToInt32(gf.GetConfigValue(HttpContext.Current.Session["APPLICATION"].ToString(), "PAGINATIONALLOWED")) == 1)
           {
               grid.AllowPaging = true;
           }
           else
           {
               grid.AllowPaging = false;
           }
           grid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
           grid.AutoGenerateColumns = false;
           grid.ShowGroupPanel = true;
           grid.HeaderStyle.CssClass = "HEADER";
           grid.MasterTableView.Width = Unit.Percentage(100);
           grid.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
           grid.MasterTableView.DataKeyNames = new string[] { "DOCNUM" };
            
           GridBoundColumn boundColumn = new GridBoundColumn();
           GridImageColumn gi;
           GridButtonColumn gb;
           GridHyperLinkColumn hyperlinkColumn;
 
           boundColumn = new GridBoundColumn();
           gi = new GridImageColumn();
           gb = new GridButtonColumn();
           hyperlinkColumn = new GridHyperLinkColumn();
           grid.MasterTableView.TableLayout = GridTableLayout.Fixed;
           grid.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
           GridTableView tableViewOrders = new GridTableView(grid);
           grid.MasterTableView.Columns.Add(boundColumn);
 
 
           if (colCount == 10)
           {
               boundColumn.DataField = "icon";
               boundColumn.HeaderText = "icon";
               boundColumn.Visible = false;
               boundColumn.FilterImageUrl = "icon_icon.gif";
 
               string[] fld0 = { "icon" };
               gi = new GridImageColumn();
               gi.DataImageUrlFields = fld0;
               gi.DataImageUrlFormatString = "~/images/{0}";
               gi.HeaderText = "";
 
               gi.HeaderStyle.Width = Unit.Pixel(30);
               gi.ImageHeight = Unit.Pixel(20);
               gi.ImageWidth = Unit.Pixel(20);
 
               grid.MasterTableView.Columns.Add(gi);
 
               grid.MasterTableView.GroupsDefaultExpanded = false;
               GridGroupByExpression expression = new GridGroupByExpression();
               GridGroupByField gridGroupByField = new GridGroupByField();
               gridGroupByField = new GridGroupByField();
               gridGroupByField.FieldName = "AUTHOR";
               gridGroupByField.HeaderText = "AUTHOR";
               expression.SelectFields.Add(gridGroupByField);
 
               gridGroupByField = new GridGroupByField();
               gridGroupByField.FieldName = "AUTHOR";
               gridGroupByField.HeaderText = "AUTHOR";
               expression.GroupByFields.Add(gridGroupByField);
 
               boundColumn = new GridBoundColumn();
               grid.MasterTableView.Columns.Add(boundColumn);
               boundColumn.DataField = "application";
               boundColumn.HeaderText = searchColumnList[0].ToString();
               boundColumn.Visible = false;
 
               boundColumn = new GridBoundColumn();
               grid.MasterTableView.Columns.Add(boundColumn);
               boundColumn.DataField = searchColumnList[1].ToString();
               //boundColumn.ItemStyle.Width = Unit.Pixel(70);
               boundColumn.HeaderStyle.Width = Unit.Pixel(70);
               boundColumn.HeaderText = gf.GetHeadingText(searchColumnList[1].ToString());
 
               string[] fld = { "link" };
               hyperlinkColumn.DataNavigateUrlFields = fld;
               hyperlinkColumn.ItemStyle.CssClass = "hyperlink";
               hyperlinkColumn.DataNavigateUrlFormatString = "{0}";
               hyperlinkColumn.HeaderText = gf.GetHeadingText(searchColumnList[2].ToString());
               hyperlinkColumn.ItemStyle.Width = Unit.Pixel(300);
               hyperlinkColumn.HeaderStyle.Width = Unit.Pixel(300);
               hyperlinkColumn.DataTextField = "DOCNAME";
               hyperlinkColumn.AllowSorting = true;
               hyperlinkColumn.ItemStyle.Wrap = false;
               grid.MasterTableView.Columns.Add(hyperlinkColumn);
 
               hyperlinkColumn = new GridHyperLinkColumn();
               string[] fld4 = { "ABSTRACTLINK" };
               hyperlinkColumn.DataNavigateUrlFields = fld4;
               hyperlinkColumn.ItemStyle.CssClass = "hyperlink";
               hyperlinkColumn.DataNavigateUrlFormatString = "{0}";
               hyperlinkColumn.HeaderText = "Comments";
               hyperlinkColumn.HeaderStyle.Width = Unit.Pixel(75);
               hyperlinkColumn.ItemStyle.Width = Unit.Pixel(75);
               hyperlinkColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
               hyperlinkColumn.DataTextField = "ABSTRACT";
               hyperlinkColumn.AllowSorting = true;
               hyperlinkColumn.ItemStyle.Wrap = false;
               grid.MasterTableView.Columns.Add(hyperlinkColumn);
 
               hyperlinkColumn = new GridHyperLinkColumn();
               string[] fld2 = { "editlink" };
               hyperlinkColumn.DataNavigateUrlFields = fld2;
               if (gf.GetConfigValue(HttpContext.Current.Session["APPLICATION"].ToString(), "ALLOWEDIT") == "0")
               {
                   hyperlinkColumn.Visible = false;
               }
               hyperlinkColumn.DataNavigateUrlFormatString = "{0}";
               hyperlinkColumn.HeaderText = "Edit";
               hyperlinkColumn.HeaderStyle.Width = Unit.Pixel(45);
               hyperlinkColumn.ItemStyle.Width = Unit.Pixel(45);
               hyperlinkColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
               hyperlinkColumn.DataTextField = "editlink";
               hyperlinkColumn.ImageUrl = "~/images/EditProfile2.png";
               grid.MasterTableView.Columns.Add(hyperlinkColumn);
 
               hyperlinkColumn = new GridHyperLinkColumn();
               string[] fld3 = { "versionLink" };
               hyperlinkColumn.DataNavigateUrlFields = fld3;
               if (gf.GetConfigValue(HttpContext.Current.Session["APPLICATION"].ToString(), "ALLOWVERSION") == "0")
               {
                   hyperlinkColumn.Visible = false;
               }
               hyperlinkColumn.DataNavigateUrlFormatString = "{0}";
               hyperlinkColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
               hyperlinkColumn.HeaderStyle.Width = Unit.Pixel(55);
               hyperlinkColumn.ItemStyle.Width = Unit.Pixel(55);
               hyperlinkColumn.HeaderText = "Version";
               hyperlinkColumn.DataTextField = "versionLink";
               hyperlinkColumn.ImageUrl = "~/images/NewVersion2.png";
               grid.MasterTableView.Columns.Add(hyperlinkColumn);
 
               boundColumn = new GridBoundColumn();
               grid.MasterTableView.Columns.Add(boundColumn);
               boundColumn.DataField = "link";
               boundColumn.HeaderText = "Link";
               boundColumn.Visible = false;
 
               boundColumn = new GridBoundColumn();
               grid.MasterTableView.Columns.Add(boundColumn);
               boundColumn.DataField = "ABSTRACTLINK";
               boundColumn.HeaderText = "ABSTRACTLINK";
               boundColumn.Visible = false;
               this.PlaceHolder1.Controls.Add(grid);
           }

On page Page_Init I use  DefineGridStructure(); to build my grid and bind the datatable that comes from ed.SearcheDOCS(selectedTab, selectedVerticalTab, selectedVerticalTabIndex);

Then depending on the number of columns returned I build the grid,
when one of these filter values I mentioned above is passed in while grouped I use the code below, so when it posts back to collapse after having been expanded the code runs as expected but will not collapse the expanded group.
if (selectedTab != "" || selectedVerticalTab != "")
{
    grid.DataSource = null;
    grid.Rebind();
} grid.DataSource = dt = ed.SearcheDOCS(selectedTab, selectedVerticalTab, selectedVerticalTabIndex);
I could really use some help with this.
Any ideas?
Viktor Tachev
Telerik team
 answered on 17 Mar 2014
3 answers
82 views
I'm currently upgrading Telerik for our company, however it looks like the combo box layout that we used to use isn't there anymore.

I was hoping we would have the images that were used here, however it looks like we are missing those.

Attached is a screenshot of the combobox that we are using.
Magdalena
Telerik team
 answered on 17 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?