C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

How to set DataGird focus in C#.net Windows App


Posted Date: 26 Sep 2008      Posted By: sathish      Member Level: Silver     Points: 1   Responses: 2



Hi

How to Set Focus in the Particular Cell in DataGrid.

How to move the Cursor to next cell using enter key.

Sathish.s
Pothanur





Responses

Author: Avadhesh Kumar Tiwari    26 Sep 2008Member Level: SilverRating: 2 out of 52 out of 5     Points: 1

try this

datagridview1["Column_Name","Row_Index].selected=true;

hope it will help you

You can contact me personally in avadhesh_fetcse@yahoomail.com or directally call me @ +919019548045



Author: suresh    26 Sep 2008Member Level: SilverRating: 2 out of 52 out of 5     Points: 5

hi u just try this one it may help u.
string cn = "user id=sa;password=sa;data source=syna2;database=pubs";
SqlConnection con = new SqlConnection(cn);
string cmd = "select sid,sname,sal from suresh";
con.Open();
SqlDataAdapter da = new SqlDataAdapter(cmd,cn);
DataSet ds = new DataSet();
da.Fill(ds,"suresh");
grdview.AutoGenerateColumns = false;
grdview.DataSource = ds;
grdview.DataMember="suresh";
grdview.CurrentCell = grdview[0, 2];
con.Close();



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : interface
Previous : Error in Visual Studion Dot Net
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use