Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
113 views
Everyone seems to use the same JavaScript function for getting a handle on a radwindow from within itself:
function GetRadWindow() {
    var oWindow = null;
    if (window.radWindow)
        oWindow = window.RadWindow; //Will work in Moz in all cases, including clasic dialog      
    else if (window.frameElement.radWindow)
        oWindow = window.frameElement.radWindow; //IE (and Moz as well)
    return oWindow;
}

This does not seem to work in IE8.  In IE8, both window.radWindow and window.frameElement are null when this is called from within a RadWindow.

Does anyone know how to get this to work in IE8?

Thanks.
Craig Wallace
Top achievements
Rank 1
 answered on 08 Mar 2012
1 answer
101 views
I have two RadGrid on a page when I select any row of the first RadGrid it shows the details in the second RadGrid where it also carries the product image is everything perfect except that when I have the image of the product I pointed to a directory where he carried a picture product is not available as I make my old code he was working this way:

foreach (DataRow ors in ds.Tables[0].Rows)
       {
           if (ds.Tables[0].Rows[0]["Bytes"].ToString().Trim() != string.Empty)
               myfoto = (byte[])ors[0];
       }
 
       //Caso o produto não tenha foto é atribuído uma imagem
       //com o texto "Foto não disponível"
       if (ds.Tables[0].Rows[0]["Bytes"].ToString() == string.Empty)
       {
 
           //Colocar i caminho da imagem
           string FinalPath = @"C:\Users\Administrador\documents\visual studio 2010\Projects\site uniao\site uniao\imagens\fotonaodisponiel.gif";
 
           FileStream stream = new FileStream(FinalPath, FileMode.Open, FileAccess.Read);
           BinaryReader reader = new BinaryReader(stream);
 
           myfoto = reader.ReadBytes((int)stream.Length);
 
       }
 
       context.Response.ContentType = "Bytes/JPG";
       context.Response.BinaryWrite(myfoto);

this is my main code of the RadGrid :

private void   pesquisar()
 
       {
            
           SqlConnection conn = new SqlConnection(@"Data Source=INFORMATICA005;Initial Catalog=unibanco;Integrated Security=True");
           SqlCommand comm = conn.CreateCommand();
           comm.CommandText = "SELECT * FROM uniao ";
           string[] palavras = RadTextBox2.Text.Split(' ');
           string sep = "where descricao like";
           int cont = 0;
           foreach (string s in palavras)
           {
           
               comm.CommandText += sep + " @palavra" + cont.ToString();
               comm.Parameters.AddWithValue("@palavra" + cont.ToString(), "%" + s + "%");
               sep = " AND descricao like";
               cont++;
 
           }
         
           SqlDataAdapter da = new SqlDataAdapter(comm);
           DataTable  ds = new DataTable ();
           da.Fill(ds);
           Session["gridtable"] = ds;
           RadGrid1.DataSource = Session["gridtable"];
           RadGrid1.Rebind ();
           
 
           
       }
Maria Ilieva
Telerik team
 answered on 08 Mar 2012
1 answer
122 views
I would like to be able to navigate from several spots within my application and open up the edit formtemplate for a particular row in a RadGrid on another page.  I can pass the key thru a session variable.
When the page loads, I would like the edit formtemplate (a popup) to automatically open with the data presented for the row with the passed key.

Any guidance on an approach to accomplish this would be greatly appreciated.

My alternative is to duplicate the rather complex formtemplate on other pages; something I'd rather not do.

Thanks in advance.

Jim
Shinu
Top achievements
Rank 2
 answered on 08 Mar 2012
1 answer
231 views
Hi, I want to upload a file in two target folder. Problem is file is uploaded successfully in first target folder but when it is saved for 2nd target folder I get file not found error. What I learn that RadAsyncUpload keeps files temporarily in App_Data folder and when file is saved then it is deleted from that folder. Any different approach so that I can save file for different target folder in single upload.
Bozhidar
Telerik team
 answered on 08 Mar 2012
3 answers
270 views
I am trying to get a client data key value in my rad tree list, but it always returns null:

private List<xItems> GetTreeListChanges()
    {
        List<xItems> xItems = new List<xItems>();
        foreach(TreeListDataItem rtlItem in rtlxItems.Items)
        {
            string xItemsId = Convert.ToString(rtlItem.GetDataKeyValue("xItemsId"));
        }
           [...]
    }

Here is the markup code, where my data key is well defined:

<telerik:RadTreeList ID="rtlxItems" runat="server" AllowMultiItemEdit="false"
        ParentDataKeyNames="ParentId" DataKeyNames="ChlidId" ClientDataKeyNames="xItemsId">

What can I do to get the datakey for a TreeListDataItem ?
Tsvetina
Telerik team
 answered on 08 Mar 2012
1 answer
168 views
Hi,

Here I am adding panelbar and panelbaritems at runtime. Also I am applying skin to panelbar while I am creating it. As panelbar and all things creates successfully but when I am clicking on panelbar its not collapsing or expanding. Here is my code:

private RadPanelBar PreparePanelBar()
   {
       RadPanelBar objRadPanelBar = new RadPanelBar();
       objRadPanelBar.ID = Guid.NewGuid().ToString();
       objRadPanelBar.Skin = "PanelbarDup"; //This point to my app_themes and from there it ref. to custom skin library
       objRadPanelBar.EnableEmbeddedSkins = false;
       objRadPanelBar.Width = Unit.Percentage(100);
       objRadPanelBar.ExpandMode = PanelBarExpandMode.MultipleExpandedItems;
       return objRadPanelBar;
   }
 
   private RadPanelItem PrepareRadPanelItem(string _rpbCaption,bool isExpanded)
   {
       //Prepare RadPanelItem under passed RadPanelBar
       RadPanelItem objRadPanelItem = new RadPanelItem();
       objRadPanelItem.Text = _rpbCaption;
       objRadPanelItem.Expanded = isExpanded;
       return objRadPanelItem;
   }
 
   protected void btnOk_Click(object sender, EventArgs e)
   {
       //Prepare Tab
       RadPanelBar objPanelbar = PreparePanelBar();
 
       //Prepare Sections
       RadPanelItem objPanelItem = PrepareRadPanelItem("Basic Information", true);
 
       //Prepare Dynamic HTML Table under Section
       objPanelbar.Items.Add(objPanelItem);
 
       // Add the table to the placeholder control
       ContentPlaceHolder.Controls.Add(objPanelbar);
   }
Peter
Telerik team
 answered on 08 Mar 2012
2 answers
150 views
hi 
i have a RadGrid and i want to add a RadAjaxManager using the smart tag but i get an error
 error invoking 'Add RadAjaxManager'

any help please !!
Rasheed
Top achievements
Rank 1
 answered on 08 Mar 2012
1 answer
249 views
HI,
I have page where I dynamic add control. When i add radgrid with RadAjaxManager and clikc on menu to get on ather page >> ERROR:

Dont found control with ID ActiveLeftMenu$rgridQuestion for trigger UpdatePanel ActiveLeftMenu$rgridQuestionPanel.


please help
page for dynamic add controls
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LeftMenuAndContent.ascx.cs"
    Inherits="Elearning.Usecases.UserControl.LeftMenuAndContent" %>
 
<div class="sheet">
    <div class="sheet-body">
        <div class="content-layout">
            <div class="content-layout-row">
                <div class="layout-cell sidebar1">
                    <div class="vmenublock">
                        <div class="vmenublock-body">
                            <div class="vmenublockcontent">
                                <div class="vmenublockcontent-body">
                                    <asp:Repeater ID="repLeftMenu" runat="server">
                                        <ItemTemplate>
                                            <li runat="server" id="ListItem">
                                                <asp:LinkButton ID="lnkNavigate" runat="server" CausesValidation="false">
                                                    <span class="l"></span><span class="r"></span><span class="t">
                                                        <asp:Literal runat="server" ID="litText"></asp:Literal>
                                                    </span>
                                                </asp:LinkButton>
                                            </li>
                                        </ItemTemplate>
                                        <HeaderTemplate>
                                            <ul class="vmenu">
                                        </HeaderTemplate>
                                        <FooterTemplate>
                                            </ul>
                                        </FooterTemplate>
                                    </asp:Repeater>
                                    <div class="cleared">
                                    </div>
                                </div>
                            </div>
                            <div class="cleared">
                            </div>
                        </div>
                    </div>
                    <div class="cleared">
                    </div>
                </div>
                <div class="layout-cell content">
                    <div class="post">
                        <h1>
                            <asp:Literal runat="server" ID="litTitleContent"></asp:Literal>
                        </h1>
                                <asp:PlaceHolder ID="plhContent" EnableViewState="False" runat="Server" />
                    </div>
                    <div class="cleared">
                    </div>
                </div>
            </div>
        </div>
        <div class="cleared">
        </div>
        <div class="cleared">
        </div>
    </div>
</div>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using CSCR.Hermes.Controllers;
using Elearning.UserInterfaceLayer;
 
namespace Elearning.Usecases.UserControl
{
    public partial class LeftMenuAndContent : BaseUserControl
    {
        private Control contentControl;
        /// <summary>
        /// Get and set name of active usecase
        /// </summary>
        string ActiveLeftMenu
        {
            get { return (string)ViewState["ActiveLeftMenu"]; }
            set { ViewState["ActiveLeftMenu"] = value; }
            //get { return _activeLeftMenu; }
            //set { _activeLeftMenu = value; }
        }
 
        private string _activeLeftMenu = string.Empty;
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
 
                var hermes = GetHermesControl();
                if (hermes.Parameters != null && hermes.Parameters[ElearningCommon.PropertyKeys.LessonID] != null)
                    LessonId = Convert.ToInt32(hermes.Parameters[ElearningCommon.PropertyKeys.LessonID]);
                if (hermes.Parameters != null && hermes.Parameters[ElearningCommon.PropertyKeys.ExamID] != null)
                    ExamID = Convert.ToInt32(hermes.Parameters[ElearningCommon.PropertyKeys.ExamID]);
                if (hermes.Parameters != null && hermes.Parameters[ElearningCommon.PropertyKeys.ActiveItemLeftMenu] != null)
                    ActiveLeftMenu = hermes.Parameters[ElearningCommon.PropertyKeys.ActiveItemLeftMenu];
 
                repLeftMenu.DataSource = GetMenuItems();
                repLeftMenu.DataBind();
           //    if(!GetHermesControl().IsPostBack)
                SetActiveMenuAndLoadContent();
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            repLeftMenu.ItemCommand += OnItemCommand_repLeftMenu;
            repLeftMenu.ItemDataBound += OnItemDataBound_repLeftMenu;
        }
        public void SetActiveLeftMenu(string name)
        {
            ActiveLeftMenu = name;
        }
 
        private List<Tab> GetMenuItems()
        {
            var menuItems = new List<Tab>();
            switch (GetHermesControl().CurrentUsecase)
            {
                case ElearningCommon.UCConstants.UCManagmentLesson:
                    menuItems.Add(new Tab() { Name = (string)GetLocalResourceObject("Detail"), UsecaseName = ElearningCommon.UCConstants.LessonDetail });
                    if (LessonId > 0)
                    {
                        menuItems.Add(new Tab() { Name = (string)GetLocalResourceObject("Users"), UsecaseName = ElearningCommon.UCConstants.LessonUsers });
                        menuItems.Add(new Tab() { Name = (string)GetLocalResourceObject("Tests"), UsecaseName = ElearningCommon.UCConstants.TestsList });
                    }
                    break;
                case ElearningCommon.UCConstants.UCManagmentTest:
                    menuItems.Add(new Tab() { Name = (string)GetLocalResourceObject("Detail"), UsecaseName = ElearningCommon.UCConstants.ExamDetail });
                    if (ExamID > 0)
                        menuItems.Add(new Tab() { Name = (string)GetLocalResourceObject("QuestionAnswers"), UsecaseName = ElearningCommon.UCConstants.QuestionList });
                    break;
            }
            return menuItems;
        }
 
        private void SetActiveMenuAndLoadContent()
        {
            SetActiveMenu();
            LoadContent();
        }
 
        protected void OnItemDataBound_repLeftMenu(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var dataItem = (Tab)e.Item.DataItem;
                var lb = e.Item.FindControl("lnkNavigate") as LinkButton;
                var lit = e.Item.FindControl("litText") as Literal;
                lit.Text = dataItem.Name;
                lb.CommandName = dataItem.UsecaseName;
                if (string.IsNullOrEmpty(ActiveLeftMenu))
                    ActiveLeftMenu = dataItem.UsecaseName;
            }
        }
 
        protected void OnItemCommand_repLeftMenu(object source, RepeaterCommandEventArgs e)
        {
         //   if (ActiveLeftMenu == e.CommandName)
          //      return;
            ActiveLeftMenu = e.CommandName;
            SetActiveMenuAndLoadContent();
        }
        protected override void LoadViewState(object savedState)
        {
            base.LoadViewState(savedState);
           // if (!string.IsNullOrEmpty(ActiveLeftMenu))
            //    SetActiveMenuAndLoadContent();
        }
        private void LoadContent()
        {
            litTitleContent.Text = (string)GetLocalResourceObject(ActiveLeftMenu);
            contentControl =
                Page.LoadControl(
                    GetHermesControl().GetAppItemRelativeUrl(string.Format("~/Usecases/UserControl/{0}.ascx", ActiveLeftMenu)));
            plhContent.Controls.Clear();
            contentControl.ID = "ActiveLeftMenu";
            if (contentControl is BaseUserControl)
            {
                (contentControl as BaseUserControl).LessonId = LessonId;
                (contentControl as BaseUserControl).ExamID = ExamID;
            }
            plhContent.Controls.Add(contentControl);
            contentControl.DataBind();
 
        }
 
        private void SetActiveMenu()
        {
            for (int i = 0; i < repLeftMenu.Items.Count; i++)
            {
                HtmlGenericControl listItem = (HtmlGenericControl)repLeftMenu.Items[i].FindControl("ListItem");
                LinkButton listItemLink = (LinkButton)listItem.FindControl("lnkNavigate");
                if (listItemLink != null)
                    listItemLink.Attributes.Add("class", listItemLink.CommandName == ActiveLeftMenu ? "active" : "");
            }
        }
    }
}

and here control with radgrid 
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCQuestionDetail.ascx.cs"
    Inherits="Elearning.Usecases.UserControl.QuestionDetail" %>
<%@ Import Namespace="Elearning" %>
<%@ Register TagPrefix="include" TagName="imgbutton_1" Src="~/Usecases/CustomField/ButtonWithImage.ascx" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="include" TagName="TopMenu" Src="~/Usecases/UserControl/TopMenu.ascx" %>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
    <ajaxsettings>
            <telerik:AjaxSetting AjaxControlID="rgridAnswers">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl  ControlID="rgridAnswers" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </ajaxsettings>
</telerik:RadAjaxManager>
 <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"  />
<include:TopMenu ID="TopMenu1" runat="server"></include:TopMenu>
<div class="sheet">
    <div class="sheet-body">
        <div class="content-layout">
            <div class="content-layout-row">
                <div class="layout-cell content">
                    <div class="post">
                        <h1>
                            <asp:Literal runat="server" ID="litTitleContent" meta:resourcekey="title"></asp:Literal>
                        </h1>
                        <div>
                       
                            <div style="float: right; width: 55%">
                                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"
                                    HorizontalAlign="NotSet" >
                                    <telerik:RadGrid ID="rgridAnswers" runat="server" GridLines="None" OnRowDrop="rgridAnswers_OnRowDrop"
                                        AutoGenerateColumns="False" ShowStatusBar="True" AllowAutomaticInserts="True"
                                        OnNeedDataSource="rgridAnswers_NeedDataSource" OnItemCreated="OnItemCreated"
                                        OnDeleteCommand="rgridAnswers_DeleteCommand" CellSpacing="0" >
                                        <ClientSettings AllowRowsDragDrop="True">
                                            <selecting allowrowselect="True" enabledragtoselectrows="False" />
                                          
                                        </ClientSettings>
                                        <mastertableview commanditemdisplay="Top" datakeynames="ID" width="100%" >
                                            <CommandItemSettings  AddNewRecordText='<%$ Resources:AddNewRecordText %>' RefreshText='<%$ Resources:RefreshText %>' />
                                            <Columns>
                                                <telerik:GridEditCommandColumn ButtonType="ImageButton"
                                                    FilterControlAltText="Filter EditCommandColumn column" >
                                                    <ItemStyle CssClass="MyImageButton" />
                                                </telerik:GridEditCommandColumn>
                                                <telerik:GridBoundColumn DataField="Text"
                                                    FilterControlAltText="Filter Text column"
                                                    meta:resourcekey="QuestionText" UniqueName="Text">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn DataField="Description"
                                                    FilterControlAltText="Filter Description column" 
                                                    meta:resourcekey="QuestionDescription" UniqueName="Description">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn DataField="ScorePerc"
                                                    FilterControlAltText="Filter ScorePerc column" 
                                                    meta:resourcekey="QuestionScorePerc" UniqueName="ScorePerc">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column"
                                                    meta:resourcekey="QuestionIsValid"
                                                    UniqueName="TemplateColumn">
                                                    <ItemTemplate>
                                                        <asp:ImageButton ID="imgIsValid" runat="server"
                                                            ImageUrl='<%# (bool)Eval("IsValid")? GetAppItemRelativeUrl(ElearningCommon.Icons.Public): GetAppItemRelativeUrl(ElearningCommon.Icons.Delete) %>'
                                                            meta:resourcekey="imgIsValidResource1" />
                                                    </ItemTemplate>
                                                    <HeaderStyle HorizontalAlign="Center" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn1 column"
                                                     UniqueName="TemplateColumn1">
                                                    <ItemTemplate>
                                                        <asp:HiddenField ID="hfSortOrder" runat="server"
                                                            Value='<%# Eval("SortOrder") %>' />
                                                    </ItemTemplate>
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"
                                                    ConfirmDialogType="RadWindow" 
                                                    ConfirmTitle="Delete" FilterControlAltText="Filter DeleteColumn column"
                                                    meta:resourcekey="QuestionReallyDelete" Text="Delete"
                                                    UniqueName="DeleteColumn">
                                                    <ItemStyle CssClass="MyImageButton" HorizontalAlign="Center" />
                                                </telerik:GridButtonColumn>
                                            </Columns>
                                            <editformsettings editformtype="WebUserControl"
                                                usercontrolname="~/Usecases/UserControl/AnswersDetail.ascx">
                                                <editcolumn filtercontrolalttext="Filter EditCommandColumn1 column"
                                                    uniquename="EditCommandColumn1">
                                                </editcolumn>
                                            </editformsettings>
                                        </mastertableview>
                                        <filtermenu enableimagesprites="False">
                                        </filtermenu>
                                    </telerik:RadGrid>
                                </telerik:RadAjaxPanel>
                            </div>
                        </div>
                        <div class="cleared">
                        </div>
                       
                    </div>
                </div>
            </div>
        </div>
        <div class="cleared">
        </div>
        <div class="cleared">
        </div>
    </div>
</div>


using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CSCR.Hermes.Controllers;
using Elearning.DataAccessLayer;
using Telerik.Web.UI;
 
namespace Elearning.Usecases.UserControl
{
    public partial class QuestionDetail : HermesUserControl
    {
   
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            if (Parameters != null && Parameters[ElearningCommon.PropertyKeys.LessonID] != null)
                LessonId = Convert.ToInt32(Parameters[ElearningCommon.PropertyKeys.LessonID]);
            if (Parameters != null && Parameters[ElearningCommon.PropertyKeys.ExamID] != null)
                ExamID = Convert.ToInt32(Parameters[ElearningCommon.PropertyKeys.ExamID]);
            if (Parameters[ElearningCommon.PropertyKeys.QuestionID] != null)
                QuestionId = int.Parse(Parameters[ElearningCommon.PropertyKeys.QuestionID]);
      
            TopMenu1.DataBind();
          }
 
        public int QuestionId
        {
            get
            {
                if (ViewState[ElearningCommon.PropertyKeys.QuestionID] == null)
                    return -1;
                return (int)ViewState[ElearningCommon.PropertyKeys.QuestionID];
            }
            set { ViewState[ElearningCommon.PropertyKeys.QuestionID] = value; }
        }
   
 
        protected void rgridAnswers_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            rgridAnswers.DataSource = DataManager.Instance.GetAnswersByQuestion(QuestionId);
        }
 
     
        protected void rgridAnswers_DeleteCommand(object sender, GridCommandEventArgs e)
        {
            string ID = (e.Item as GridDataItem).OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"].ToString();
            DataManager.Instance.DeleteAnswer(int.Parse(ID));
        }
 
        private void rgridAnswers_Update(object sender, CommandEventArgs e,Answer answer)
        {
            rgridAnswers.MasterTableView.ClearEditItems();
            DataManager.Instance.UpdateAnswer(answer);
            rgridAnswers.Rebind();
        }
 
        private void rgridAnswers_Insert(object sender, CommandEventArgs e,Answer answer)
        {
            answer.QuestionReference.SetId(EntityHelper.References.Questions,QuestionId);
            if (rgridAnswers.Items.Count > 0)
            {
                var order = (HiddenField)rgridAnswers.Items[rgridAnswers.Items.Count - 1].FindControl("hfSortOrder");
                answer.SortOrder = int.Parse(order.Value) + 1;
            }
            else
                answer.SortOrder = 1;
            DataManager.Instance.InsertAnswer(answer);
            rgridAnswers.Rebind();
        }
 
        protected void OnItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
            {
                AnswersDetail MyUserControl = e.Item.FindControl(GridEditFormItem.EditFormUserControlID) as AnswersDetail;
                MyUserControl.OnUpdate += rgridAnswers_Update;
                MyUserControl.OnInsert += rgridAnswers_Insert;
            }
        }
 
 
        protected void rgridAnswers_OnRowDrop(object sender, GridDragDropEventArgs e)
        {
            if (e.DraggedItems[0] != null)
            {
                var orderDrag = GetOrderFromGrid(e.DraggedItems[0]);
                var orderDest = GetOrderFromGrid(e.DestDataItem);
                DataManager.Instance.ReOrderAnswers(orderDrag,orderDest);
                rgridAnswers.Rebind();
            }
        }
 
        private int GetOrderFromGrid(GridDataItem item)
        {
            var orderDragStr = (item.FindControl("hfSortOrder") as HiddenField).Value;
            return int.Parse(orderDragStr);
        }
    }
}

Iana Tsolova
Telerik team
 answered on 08 Mar 2012
10 answers
315 views
Hello,

I've been facing a bug in the filter textboxes of the radgrid as following.

The Problem:
When the user press Enter key on any text box of the filter textboxes it will always display the filter menu of the first column.

Debugging:
After doing some debugging, I noticed that the filter image is of type "Submit" which the browser considers the submit button of the form and invokes it, so while there are no submit buttons on the form, the onclick event of the filter image is invoked resulting in the menu displayed by mistake.
In FireFox, the menu is displayed at position 0,0.
In IE, the menu is displayed relative to where the mouse positioned.

To Reproduce:
1- Put a radgrid in a webform page while flitering is enabled and do set autopostbackonfilter=false, don't put any other elements in the page, to be precise no submit buttons.
2- Focus on any of the filtering textboxes and hit enter.



Tsvetina
Telerik team
 answered on 08 Mar 2012
1 answer
194 views
I have a grid that is grouped by one field and has as its rightmost column a template column that contains a user control.
This user control just renders as a table with one row and a not-fixed number of columns, the cells containing an 'X' character or a space. Nothing fancy.
My trouble is aligning this table to the right.
In IE9 i can't get it to align to the right. In IE9 compatabilty mode the grid rows align properly, the header row doesn't.
In PDF export the table never aligns to the right; in Word export, it does so nicely.
I tried different style attributes on different levels, wrapping the table in a <div> element, to no avail.
There must be something i missed. Can someone point me in the right direction?
Galin
Telerik team
 answered on 08 Mar 2012
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?