I have an imagebutton in a templated column on a WebGrid that is inside of a WebDialogWindow. When I clikc on the button the page is posting back but the ItemCommand Action is never being fired. I have also tried to give the button itself a OnClick event, but the same happens. The page posts back, but the OnClikc event is never being fired.
I tried on last thing and added a template column of type Checkbox and placed an WebImageButton elsewhere on the screen. When that button is click the button event is fired, but when I check the value of the checkbox in the grid, it evluates to False whether the box is checked or not.
Has anyone else encountered this problem?
<cc2:WebDialogWindow ID="wdwUser" runat="server" Height="650px" Width="925px" InitialLocation="Centered"
Modal="True" StyleSetPath="~/ig_res" StyleSetName="Default" MaintainLocationOnScroll="True"
WindowState="Hidden">
<Header CaptionAlignment="Left" CaptionText="Maintain User">
</Header>
<ContentPane>
<Template>
<div style="width: 98%; padding-left:5px;">
<igtbl:UltraWebGrid ID="uwgItems" runat="server" Width="100%" Height="100%" Browser="Xml"
DataKeyField="LISTNBR">
<Bands>
<igtbl:UltraGridBand>
<Columns>
<igtbl:UltraGridColumn BaseColumnName="LISTNBR" Key="LISTNBR" Width="80px">
<Header Caption="Listing Number" />
<HeaderStyle CustomRules="border-left: solid 1px #c0c0c0" />
<CellStyle CustomRules="border-left: solid 1px #c0c0c0">
</CellStyle>
</igtbl:UltraGridColumn>
<igtbl:UltraGridColumn BaseColumnName="TIT" Key="TIT" CellMultiline="Yes">
<Header Caption="Item Description" />
<igtbl:UltraGridColumn BaseColumnName="PRICE" Key="PRICE" DataType="System.Double"
Format="$###,###,##0.00" Width="70px">
<Header Caption="Price" />
<CellStyle HorizontalAlign="Right" />
<igtbl:UltraGridColumn BaseColumnName="LISTDATE" Key="LISTDATE" Format="MMM dd, yyyy"
DataType="System.DateTime" Width="80px">
<Header Caption="List<br/>Date" />
<igtbl:UltraGridColumn BaseColumnName="ENDING" Key="ENDING" Format="###,##0" DataType="System.Int32"
Width="40px">
<Header Caption="Days<br/>Left" />
<CellStyle HorizontalAlign="Center" />
<igtbl:TemplatedColumn AllowResize="Fixed" AllowRowFiltering="False" Key="Buttons"
Width="20px">
<CellTemplate>
<asp:ImageButton ID="ibtnDel" runat="server" ImageUrl="~/images/buttons/cross.png"
Style="cursor: pointer" ToolTip="Delete Item" CausesValidation="False" />
</CellTemplate>
<HeaderStyle Cursor="Default" />
<CellStyle HorizontalAlign="Center">
</igtbl:TemplatedColumn>
</Columns>
<AddNewRow Visible="NotSet" View="NotSet">
</AddNewRow>
</igtbl:UltraGridBand>
</Bands>
<DisplayLayout Version="4.00" SelectTypeRowDefault="Single" Name="uwgItems" AllowSortingDefault="Yes"
AllowDeleteDefault="Yes" AllowColSizingDefault="Fixed" RowHeightDefault="30px"
TableLayout="Fixed" RowSelectorsDefault="No" CellClickActionDefault="RowSelect"
HeaderClickActionDefault="SortMulti" BorderCollapseDefault="Separate" AutoGenerateColumns="False"
ColFootersVisibleDefault="No" ColWidthDefault="" EnableProgressIndicator="False"
StationaryMargins="HeaderAndFooter">
<FrameStyle CssClass="igwgFrame" Height="100%" Width="100%" Wrap="True">
</FrameStyle>
<RowAlternateStyleDefault CssClass="igwgAlternateRow">
</RowAlternateStyleDefault>
<Pager MinimumPagesForDisplay="2" AllowPaging="True" PagerAppearance="Both" PageSize="10">
<PagerStyle CssClass="igwgPager" />
</Pager>
<FooterStyleDefault CssClass="igwgFooter">
</FooterStyleDefault>
<HeaderStyleDefault HorizontalAlign="Center" CssClass="igwgHeader" VerticalAlign="Middle">
</HeaderStyleDefault>
<RowStyleDefault CssClass="igwgDefaultRow" TextOverflow="Ellipsis" VerticalAlign="Middle"
Wrap="true">
</RowStyleDefault>
<SelectedRowStyleDefault CssClass="igwgSelectedRow">
</SelectedRowStyleDefault>
<GroupByBox Hidden="True">
</GroupByBox>
<ActivationObject BorderColor="" BorderWidth="" AllowActivation="False">
<BorderDetails WidthLeft="0px" WidthRight="0px"></BorderDetails>
</ActivationObject>
<ClientSideEvents InitializeLayoutHandler="grid_Initialize" />
</DisplayLayout>
</igtbl:UltraWebGrid>
</div>
</Template>
</ContentPane>
</cc2:WebDialogWindow>
Dim ci As UltraWebGrid.CellItem
Try
ci = e.ParentControl
If Not ci Is Nothing Then
r = ci.Cell.Row
Case "btnEdit"
End Select
End If
Session("Error") = ex
End Try
End Sub
I don't know if this will help, but when I search the WebGrid forum for "ItemCommand", I find:
http://news.infragistics.com/forums/p/2135/14463.aspx#14463
Thanks for the reply, but unfortunately I have tried eveything in that post with no avail. I have officially submitted something to IG and just last night I received a email stating that this has been officially listed as a bug. If you are interested here is the issue ID BR32491