0

I have a grid view of type datagridviewtextboxcolumn with the following fields:

 SrNo    |   Description   |    HSNCode   |    Qty   |    Rate    |    Amount

The SrNo and the Amount are calculated automatically from the code and both are in ReadOnly mode.I want the user to edit when he enters the cell. For that I have set the edit mode of the grid in Page_Load() event of the form.

grdData.EditMode = DataGridViewEditMode.EditOnEnter;

But the logic of generating the SrNo. and Amount does not work when I set the EditMode in this way. Which way can i use to apply the edit mode on all columns excluding these two columns.(SrNo. & Amount).I have used the CellEnter() event of the grid view to generate the "SrNo" and "Amount" in my program.

Please help.

coder
  • 1,980
  • 3
  • 21
  • 32
Mohemmad K
  • 809
  • 7
  • 33
  • 74

1 Answers1

1

You can set the ReadOnly property of that particular columns instead of using the EditMode property of grid.

You can configure the ReadOnly property to True of columns using columns designer dialog window.

Hope this helps

Praveen VR
  • 1,554
  • 2
  • 16
  • 34