473,734 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Programmaticall y selecting a row in a DataGridView

I'm creating a C# (.NET BETA2) Windows application (NOT a Web application, a
Windows application), and I would like to programmaticall y selecting a row
inside of a DataGridView. It seems like it should be pretty easy to do, but
I'm have a hard time with this.

Can anyone give me any guidance?

Thanks,

David

Nov 17 '05 #1
3 2942
Dear David,

Go through these links, You can Manipulate your rows programmaticall y.
and also it gives more info on DataGridView Control

Windows Forms Programming
How to: Manipulate Rows in the Windows Forms DataGridView Control
---------------------------------------------------------------------
http://msdn2.microsoft.com/en-us/library/ddtce152.aspx

other "HOW TOs"
---------------
http://msdn2.microsoft.com/en-us/library/ms171596

Windows Forms Programming
DataGridView Control (Windows Forms)
------------------------------------
http://msdn2.microsoft.com/en-us/library/e0ywh3cz

Bye
Venkat_KL
For Anything and Everything, Please Let Me Know

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 17 '05 #2
Dear David,

Go through the these links,
1st one gives you the reply for your query.
Other links gives more info on DataGridView Control

Windows Forms Programming
How to: Manipulate Rows in the Windows Forms DataGridView Control
--------------------------------------------------------------------
http://msdn2.microsoft.com/en-us/library/ddtce152.aspx

Other "HOW-TOs"
----------------

http://msdn2.microsoft.com/en-us/library/ms171596

Windows Forms Programming
DataGridView Control (Windows Forms)
---------------------------------------

http://msdn2.microsoft.com/en-us/library/e0ywh3cz

Bye
Venkat_KL
For Anything and Everything, Please Let Me Know

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 17 '05 #3
That's great, thanks it worked.

"Venkat_KL" wrote:
Dear David,

Go through the these links,
1st one gives you the reply for your query.
Other links gives more info on DataGridView Control

Windows Forms Programming
How to: Manipulate Rows in the Windows Forms DataGridView Control
--------------------------------------------------------------------
http://msdn2.microsoft.com/en-us/library/ddtce152.aspx

Other "HOW-TOs"
----------------

http://msdn2.microsoft.com/en-us/library/ms171596

Windows Forms Programming
DataGridView Control (Windows Forms)
---------------------------------------

http://msdn2.microsoft.com/en-us/library/e0ywh3cz

Bye
Venkat_KL
For Anything and Everything, Please Let Me Know

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
22148
by: Rain County | last post by:
I am programmatically building and populating a table and then making it the data source for a dataGridView. I want to add a column to the dataGridView which will be a DataGridViewComboBoxColumn. I wish to populate, by default, all of the ComboBoxes with the same list of three choices. How do I add the DataGridViewComboBoxColumn, and do I first populate one as a template for the others? I will appreciate any help.
2
15163
by: Bob | last post by:
How do I show a calendar control or another appropriate control to pick a date and time for a cell in a column in a datagridview? Thanks for any help. Bob
3
34404
by: Dave | last post by:
Is it possible to remove a row in a datagridview programmatically? If so, what is the code? Thanks -- L. A. Jones
8
19177
by: =?Utf-8?B?UmljaA==?= | last post by:
My from contains a "Move Next" button. When the user clicks on the "Move Next" button - several procedures get invoked and eventually, the dataset underlying the form will display main data from the next record and will display detail data in a datagridview also on the form which is related to the current main record in view. Another button ("Transfer Account") on the form can modify what detail data is related to the current main...
1
8504
by: =?Utf-8?B?RGF0YUdyaWRWaWV3IGFkZCByb3cgZHluYW1pY2Fs | last post by:
Hi, I am working on the windows application. I created a form Form1 to list records. I used datagridview to show data and bound it to a dataadapter. User can click Update button in Form1 to open a new dialog window Form2 to update selected record and also add new records. When user closes the Form2, the Form1's records should be updated (New records should be added and updated record should be updated.) And we also want to stay in the...
0
2178
by: RKT | last post by:
I have a DataGridView bound to an MS Access table. This is a single- user application. When the User is adding or editing a row, the User may click on a Control elsewhere. That Control has context which I use to programmatically set *other* r/o cell values for the currently selected grid row. So, after that click on another control, and stuffing the related cell values, I want to seamlessly allow the user to resume editing/adding that row...
3
6752
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I am wondering what is considered a best practice for setting column widths to fit the data for a DataGridView (.Net 2.0) that was created on-the-fly from an arbitrary query. What I would probably do is scan the width of each column for the first couple hundred or so rows and find the largest. (But how does one convert character counts to field widths in pixels?) More generally, however, is there a better approach to accomplish this?
4
26859
by: =?Utf-8?B?UGFycm90?= | last post by:
I cannot programmatically select a row in datagridview control. I use the following instruction to change the selection of a row dataGridView2.ClearSelection(); dataGridView2.Rows.Selected = true; When I add another entry to the datagrid, I return to this routine and check for the current row as follows: DataGridViewRow row = dataGridView2.CurrentRow;
4
1906
by: techno58 | last post by:
In my form i want to be able to fill all my controls with a particular record by selecting that record from my datagridview.If i select a particular record after clicking on it all my controls like textbox etc will be filled with that specific record. Can i do this without using binding context?
0
8776
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9182
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.