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
160
ClickCellButton event doesn't fire
posted

Hello.

I have a ultrawebgrid with a cellButton column,  I've tried diferent ways but cannot make the ClickCellButton to fire on server.

the button is like:

<igtbl:TemplatedColumn Type="Button" CellButtonDisplay="Always"   Width="15px" Key="itemBTN" IsBound="false" AllowUpdate="No"  BaseColumnName="Indicator"  >

I tried with a template column, and the itemCommand is fired but , the button on it does not appear until the row is commited.

This is my code in DisplayLayout:

 

 

 

 

 

 

 

 

 

 

 

 

<DisplayLayout AllowColSizingDefault="Fixed" ScrollBar="Auto" BorderCollapseDefault="Separate"

 

 

Name="UltraWebGrid1" RowSelectorsDefault="yes" TableLayout="Fixed" Version="4.00"

 

 

UseFixedHeaders="True" AutoGenerateColumns="False" AllowDeleteDefault="Yes" AllowUpdateDefault="Yes" AllowAddNewDefault="Yes" FixedHeaderIndicatorDefault="None"

 

 

CellClickActionDefault ="Edit"

 >

I tried with xmlLoadOnDemand = Acumulative, but does not work.

Please, help

 

 

 

 

 

Parents
No Data
Reply
  • 7694
    posted

    Hello,

    You can use the server event OnClick and handle it. Please take a look at the code below:

    ASPX:
    <Bands>
                    <igtbl:UltraGridBand>
                        <Columns>
                            <igtbl:TemplatedColumn>
                                <CellTemplate>
                                    <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
                                </CellTemplate>
                            </igtbl:TemplatedColumn>

    C#:
    protected void Button1_Click(object sender, EventArgs e)
        {
            Label1.Text = "change";
        }


    Hope this helps.

Children