Hello guys,

My question is not very direct and clear but i'll try to explain it nicely.

I have a database running on MySQL with 1 important table which i need to use. Then I put this table into my C# application (I'm using Microsoft Visual Studio 2010). The only component I can see is the DataGridView which I use for getting the table from the database. Is there another way of retrieving data from the table and displaying it?
The other more important thing is that I want to make the table "editable" so each column is acting like a textbox and the user is able to click on each cell and edit the text.
I'm really out of ideas how to do this.

Hopefully I explain it clearly and understandable.
Thanks in advance.

Pepys

How you retrieve the data from the database won't change but in terms of displaying it you could opt to use a repeater control (you've posted this in the asp.net forum so I'm guessing its a web app you're working on).
Whatever you choose (a datagridview will work just fine) you will want to alter the columns to display either text boxes or checkboxes depending on what you need. In the properties of the datagirdview you can specify what control you want to be in a particular column. After that, for text for example, the data from the database would be inserted into the text box rather than displayed as text on the page allowing it to be edited by the user.
I have some sample code on another computer that might be of use if you need more help.

Steve

Hey Steve,
Thanks for the reply.

Yeah it's a WEB app and I'm using datagridview for getting the data from the database. No worries about that. But I don't really know how can I "control" this table afterwards in the app, so I can make the columns and rows as text boxes and to be editable. Since I'm pretty new to .ASP and C# at all, I have to read more about the repeater controller you are talking about. I don't know what it is exactly.
And if you have some similar code which could be helpful I will be so grateful.
Thanks dude

Pepys

Wow,
Thanks dude this is pretty close to my problem. I'm checking it out now.
Useful :)

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.