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
830
enabling selection of row while one cell has textbox in the column's TemplateDataField declaration
posted

Hi, can u pls help with this:

I have datagridview with one of the columns defined like this:

<ig:TemplateDataField Width="90px"  CssClass="RightCellContent"  Key="Correction">                    

                    <HeaderTemplate>

                     (Plus) Correction <img src="../../lodestar/ig_res/Default/images/Edit.png" 

                     onclick='showNotes();' />

                    </HeaderTemplate>                    

                    <ItemTemplate>   

                    <asp:TextBox ID="CorrectionTB" CssClass="RightCellContent" Columns="5" onkeypress="event.returnValue=isBetween_0_99999(event, this);" Text='<%# Eval("Correction") %>'   

                    runat="server"  onkeydown="dirty()" ></asp:TextBox>                    

                    </ItemTemplate>                    

                 </ig:TemplateDataField>

But if I add the following declaration in my grid to allow selection of the row:

<Behaviors>                     

                      <ig:Activation />                             

                     <ig:Selection RowSelectType="None" CellClickAction="Cell" />  

</Behaviors>

Then it does not allow me to enter values in my textbox anymore, I only can do that if I remove the line:

<ig:Selection RowSelectType="None" CellClickAction="Cell" /> 

Can u pls suggest a way for me to make this work ? or

Do u have some small sample for me pls that allows me to have templatedatafield with textbox inside it and allows me to select rows at the same time ?

The client wants that way

Thank u for ur time :)