Completed
Last Updated: 03 Feb 2016 07:36 by Svetlin
Svetlin
Created on: 15 Nov 2012 04:44
Category: GridView
Type: Bug Report
0
FIX. RadGridView - the GridViewNewRowInfo is in modified state when the DefaultValuesNeeded event is used.
The GridViewNewRowInfo is in modified state when the DefaultValuesNeeded event is used. This causes the UserAddingRow event to be fired.

Workaround: 
void radGridView1_DefaultValuesNeeded(object sender, GridViewRowEventArgs e)
{
    e.Row.Cells["SearchType"].Value = "BI";
 
    FieldInfo fieldInfo = typeof(GridViewRowInfo).GetField("state", BindingFlags.NonPublic | BindingFlags.Instance);
    BitVector32 state = (BitVector32)fieldInfo.GetValue(e.Row);
    state[2] = false;
    fieldInfo.SetValue(e.Row, state);
 
    e.Row.InvalidateRow();
}
0 comments