How do I make the selected Row of a datagrid display textboxcolumns??

2 views
Skip to first unread message

rhaazy

unread,
Jul 26, 2006, 1:34:30 PM7/26/06
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Using C#, VS2003

I need to turn all the columns in the selected row of a datagrid into
textboxcolumns, as to give the user an obvious choice of inputing data
via the keyboard. Anyone have any ideas?

rupinder rp

unread,
Jul 27, 2006, 1:54:50 PM7/27/06
to DotNetDe...@googlegroups.com

bstalz

unread,
Jul 27, 2006, 11:29:25 PM7/27/06
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
You need to have an event fire from something like an "Edit" button in
the row. Add a column to your datagrid for this. Are you working in
asp.net or winforms?

In the OnEditClicked (or similar event handler function), you need to
set the edititemindex equal to the one supplied as an argument to the
event handler function. If in asp.net, and using simple BoundColumns,
you will get textboxes automatically. If you are using itemtemplates,
you may have to write int he text boxes.

If you are doing asp.net, you should really read through this series of
tutorials.
http://aspnet.4guysfromrolla.com/articles/040502-1.aspx

rhaazy

unread,
Jul 28, 2006, 9:55:02 AM7/28/06
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I am using windowsform.datagrid control.

Tito

unread,
Jul 29, 2006, 10:33:46 PM7/29/06
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
What are these columns being changed from? Are they not textboxcolumns
to begin with? Do you need to highlight what row you are editing?

rhaazy

unread,
Jul 31, 2006, 10:28:36 AM7/31/06
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
The user clicks a button, and a new row is added programtically, the
row is selected and the first column is made active, the active cell
appears as a textbox, however I would like the whole current row's
cells to look like they are in "edit" mode if you will.

Tito

unread,
Aug 1, 2006, 6:48:38 PM8/1/06
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
What are the other columns? Are they not textboxes also? What do you
mean by "edit" mode?

rhaazy

unread,
Aug 1, 2006, 9:38:43 PM8/1/06
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Nevermind, no one bother I just decided to use a seperate form to add
data....

Thanks anyway.

Reply all
Reply to author
Forward
0 new messages