extra row

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I connect DataGrid with table:

dataGrid1.DataSource = dataSet.Tables[0].DefaultView;

There always an extra row, How can I delete it? or can I control this row?

Moti
 
Moti said:
I connect DataGrid with table:

dataGrid1.DataSource = dataSet.Tables[0].DefaultView;

There always an extra row, How can I delete it? or can I control this
row?

Is this the extra row where it allows you to type in a new one?

-- Alan
 
Hi Alan

Yes it is, I want to delete this row, and only in "insert" mode to open 1 row

Moti

Alan Pretre said:
Moti said:
I connect DataGrid with table:

dataGrid1.DataSource = dataSet.Tables[0].DefaultView;

There always an extra row, How can I delete it? or can I control this
row?

Is this the extra row where it allows you to type in a new one?

-- Alan
 
Moti said:
Yes it is, I want to delete this row, and only in "insert" mode to open 1
row

If you set the grid's ReadOnly property to true, that row will go away. I
suppose you could toggle the property in the different modes.

-- Alan
 
hHi Alan

Tank you.

Do you know if i can limit the row that open ?
I want to open only 1 every insert.

Moti
 
Moti said:
Do you know if i can limit the row that open ?
I want to open only 1 every insert.

You may be able to catch the RowChanging or RowChanged event on the
underlying DataTable. If the Row Action shows added, then maybe you could
set the grid to ReadOnly? Just thinking out loud here, I haven't actually
tried it myself.

-- Alan
 
Thank you

I will try it

Moti

Alan Pretre said:
You may be able to catch the RowChanging or RowChanged event on the
underlying DataTable. If the Row Action shows added, then maybe you could
set the grid to ReadOnly? Just thinking out loud here, I haven't actually
tried it myself.

-- Alan
 
Back
Top