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
985
xamgrid commit row by row behaviour getting affected because of ActiveCellChanged event method Please help
posted

Hello all,

I am using XamGrid control for datainput from end user.  Databinding is working

For the xamgrid, I have added a new line at the bottom of the table and have kept the following settings:

<ig:XamGrid.AddNewRowSettings> <ig:AddNewRowSettings    IsEnterKeyEditingEnabled="True"   IsF2EditingEnabled="True"      

    IsMouseActionEditingEnabled="SingleClick"                 IsOnCellActiveEditingEnabled="False" AllowAddNewRow="Bottom"

 Style="{StaticResource addNewRowCellStyle}"/>    

</ig:XamGrid.AddNewRowSettings>

<ig:XamGrid.EditingSettings>

               <ig:EditingSettings AllowEditing="Row"   IsMouseActionEditingEnabled="DoubleClick"   IsEnterKeyEditingEnabled="True"   IsF2EditingEnabled="True" IsOnCellActiveEditingEnabled="False" />

</ig:XamGrid.EditingSettings>

Now the requirement is that if user enters on the new row cell, then the active cell should be the first cell in the xamgrid so I wrote the following code in the ActiveCellChanged event

 private void dataCurveGrid_ActiveCellChanged(object sender, EventArgs e)      

  {            

          Infragistics.Controls.Grids.CellBase type = dataCurveGrid.ActiveCell;

            if (type is Infragistics.Controls.Grids.Primitives.AddNewRowCell) 

            {                 if (dataCurveGrid.Rows.Count != 0)         

        {                     dataCurveGrid.Rows[0].Cells[0].IsActive = true;                 }             }                    }  

The above requirement is working but

Now my hurdle is because of above ActiveCellChanged method the behaviour of data entered on new row control is getting committed cell by cell instead of row by row which is required by me and was happening before this method.

Please advice what should I do to make the user data get committed row by row.

Also please inform if any alternate method is there to solve the above user requirement and not disturb the above row by row commitment.

 

Thanks in advance

Rakesh

 

 

 

 

 

 

Parents
No Data
Reply Children