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

RadGrid Grouping and RadWindow

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

Hi,
    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, 
  
.aspx


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




.aspx.cs



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

  javascript

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.Show();  
    //oMailWnd.Restore();       
    oMailWnd.SetTitle(arguments[5]);  
    oMailWnd.SetSize(200, 200);  
    //alert(left);  
    if((1024-left)<400)  
        left=left-110;  
    if((768-top)<425)  
        top=top-50;  
          
    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
0
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,
Plamen
the Telerik team

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