Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
WebGrid inside of a WebDialogWindow
posted

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>

<igtbl:UltraGridColumn BaseColumnName="PRICE" Key="PRICE" DataType="System.Double"

Format="$###,###,##0.00" Width="70px">

<Header Caption="Price" />

<CellStyle HorizontalAlign="Right" />

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="LISTDATE" Key="LISTDATE" Format="MMM dd, yyyy"

DataType="System.DateTime" Width="80px">

<Header Caption="List<br/>Date" />

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn BaseColumnName="ENDING" Key="ENDING" Format="###,##0" DataType="System.Int32"

Width="40px">

<Header Caption="Days<br/>Left" />

<CellStyle HorizontalAlign="Center" />

</igtbl:UltraGridColumn>

<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">

</CellStyle>

</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>

 

Protected Sub uwgUsers_ItemCommand(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.UltraWebGridCommandEventArgs) Handles uwgUsers.ItemCommand

Dim ci As UltraWebGrid.CellItem

Dim r As UltraWebGrid.UltraGridRow

Try

ci = e.ParentControl

If Not ci Is Nothing Then

r = ci.Cell.Row

Select Case e.CommandSource.ID

Case "btnEdit"

End Select

End If

Catch ex As Exception

Session("Error") = ex

End Try

End Sub