editable fields in datagrid

  • Thread starter Thread starter Jimmy
  • Start date Start date
J

Jimmy

Hey

On my PDA C# app. i have a datagrid called dataGrid1. This datagrid is
showing the contents of a DataSet. The DataSet is coming as a return value
from a web service. I have 4 columns with a lot of rows in it.

Now, what i want is to be able to edit the value in the 4th column if the
value in the 1st column is 0.
Ive searched everything (i think), and i really dont know how to make a
field in the 4th column of a specific row editable.
So how can i make a field in a specific row editable?

Can anyone help?
Please...
 
The short answer is that you can't. You must float a textbox over it, move
it arounds, and managed the interaction. Paul Yao's book has a good example
on how to do this.

-Chris
 
Hey

Thanks. What a shame.

Ive come up with another solution. When a user clicks the row, i open a new
form, fill in the data from that particular row into textboxes and labels,
edits the value, and when i click ok i save it back to the datagrid at the
appropriate field.

Im allready done with the new form part. Just need to figure out, how to get
it back into the datagrid. Hopefully that wont be to big a problem.

Thanks for your help man ;)
 
One thing comes to my mind.

Does this apply to datagrids overall?
I mean, can i make all the fields in a specific row or column editable?
Can i make all fields in the datagrid editable?

Im just asking because i know i will need that later on, but if the short
answer is that i cant do that either, id rather figure out another way of
doing what i need to do.

Thanks
 
If you are doing that by floating an edit control over the field that the
user wants to edit, sure. For that matter, you could float a drop-down list
for some fields, an edit control for some fields, etc. You're building a
user interface; the grid itself doesn't care.

Paul T.
 
Hey

Ok, got it.


Thanks man :)

--


Jimmy

Paul G. Tobey said:
If you are doing that by floating an edit control over the field that the
user wants to edit, sure. For that matter, you could float a drop-down list
for some fields, an edit control for some fields, etc. You're building a
user interface; the grid itself doesn't care.

Paul T.
 
Back
Top