This is a migrated thread and some comments may be shown as answers.

RadGrid Grouping and RadWindow

1 Answer 42 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
shwetha asked on 06 Aug 2008, 12:02 PM

    I have a problem in RadGrid which uses the Grouping.
   Im adding the attributes to the Image in the Databound event of radgrid that opens a radwindow based on some of the parameters.
    This works fine for normal grid, but if grouping is provided, this attributes added for image does not open for the event.
 Im Providing the Sample Code, 

 <radG:RadGrid ID="dgCommercialServices" Width="98%" ShowGroupPanel="False" runat="server" 
                        AutoGenerateColumns="false" Skin="Windows" EnableAJAX="True" OnItemDataBound="dgCommercialServices_ItemDataBound">  
                        <GroupHeaderItemStyle Font-Names="Verdana"></GroupHeaderItemStyle> 
                            <Scrolling ScrollHeight="493px" AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="false" /> 
                        <AlternatingItemStyle CssClass="GridAltRow2_Windows" /> 
                        <MasterTableView Width="100%">  
                                <asp:Label ID="lblError" runat="server" Text="Not applicable."></asp:Label> 
                                        <radG:GridGroupByField FieldAlias="Services" FieldName="ColGroup" FormatString="" 
                                        <radG:GridGroupByField FieldAlias="Services" FieldName="ColGroup" FormatString="" 
                            <ExpandCollapseColumn Visible="False">  
                                <HeaderStyle Width="10px" /> 
                            <RowIndicatorColumn Visible="False">  
                                <HeaderStyle Width="10px" /> 
                                <radG:GridBoundColumn HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Left" 
                                    Groupable="False" HeaderText="Services-Commercial" DataField="Services-Commercial" 
                                    <HeaderStyle HorizontalAlign="Left" ForeColor="Black" Width="30%"></HeaderStyle> 
                                    <ItemStyle HorizontalAlign="Left" Width="30%" /> 
                                <radG:GridTemplateColumn HeaderStyle-Font-Bold="true" HeaderText="PBM" Groupable="False" 
                                    <HeaderStyle HorizontalAlign="Center" ForeColor="Black" Width="12%"></HeaderStyle> 
                                    <ItemStyle HorizontalAlign="Center" Width="12%"></ItemStyle> 
                                        <asp:Image runat="server" Visible='<%#IsCheck(DataBinder.Eval(Container.DataItem,"PBM"))%>' 
                                            ID="imgPBM" ImageUrl="../Images/TickMark1.gif" /> 


  fobj_Img_PBM.Attributes.Add("onclick"string.Format("javascript:ShowEntyAffilWnd({0},{1},{2},{3},1,'Affiliations');", mint_PageID, fint_SvcID, mint_EntyTyp, mint_EntityId));  


function ShowEntyAffilWnd()  
    var left=event.x;  
    var top=event.y;  
    var oManager = RadWndMgr();  
    var aint_PageId=arguments[0];  
    var aint_RowId=arguments[1];  
     var aint_Enty_typ=arguments[2];  
    var aint_ColId=arguments[4];  
    var aint_EntyId=arguments[3];  
    var strUrl = "../common/EntityAffiliations.aspx?PageId="+aint_PageId+"&RowId="+aint_RowId+"&EntyType="+aint_Enty_typ+"&ColId="+aint_ColId+"&EntyId="+aint_EntyId;  
    var oMailWnd = oManager.Open(strUrl, "NewWindow");  
    oMailWnd.SetSize(200, 200);  
    oMailWnd.MoveTo(left, top);  

Everything is working fine in IE7, but in Safari Browser the window is not opening for rad grid where grouping is there.

   Hint: In normal radgrid, event.x gets the value in javascript, but the radgrid with grouping the event.x is undefined. (Safari)

Urgent help will be appreciated..
Thank you.

1 Answer, 1 is accepted

Sort by
Missing User
answered on 11 Aug 2008, 10:19 AM
Hi shwetha,

I cannot reproduce the same behavior locally and I need more information about your exact setup. Can you
open a support ticket and attach to it a small runnable sample that reproduces the undesired behavior? Once we can reproduce the problem locally, we will do our best to help.

Best wishes,
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Asked by
Top achievements
Rank 1
Answers by
Missing User
Share this question