Not add new row in datagrid

hi, everybody, When the readonly property of datagrid is setted from true to false, the datagrid will add a new row. Dose have any method let datagrid not add a new row when the readonly property is setted from true to false? Thanks

Loader.
Up arrow icon