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.