Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DataGrid Focus

Reply
Thread Tools

DataGrid Focus

 
 
ABHIJIT B
Guest
Posts: n/a
 
      02-18-2008
Hi,

We are using ASP.net 2.0 with C# for developing web application.
I am using datagrid in one of form and binding data to it as given
below,

if (dsDatabaseList.Tables[0].Rows.Count > 0)
{
dgServiceDatabaseList.DataSource =
dsDatabaseList.Tables[0];
dgServiceDatabaseList.DataBind();
//dgServiceDatabaseList.SelectedIndex =
0;
dgServiceDatabaseList.Items[0].Cells[0].Focus();
dgServiceDatabaseList.Cur =
dcDatabaseListSucess = true;
}

dsDatabaseList.Tables[0] contains more than 100 records.

I want to set focus on first row and first column in datagrid.

I tried using foloowing,

dgServiceDatabaseList.SelectedIndex = 0; but this highlights the row
but iw ant to set focus.

I am unaware of SetFocus() method.

Best Regards,
Abhijit B
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
this.window.focus() vs. window.focus() vs. this.focus() Roger Javascript 3 03-08-2007 08:53 PM
Why "Focus and Recompose" causes back-focus issues Carl Miller Digital Photography 7 03-10-2005 12:14 PM
Fuji EXIF: Focus warning: "Out of focus" Hasan Diwan Digital Photography 3 12-26-2004 04:13 AM
Pan Focus vs Auto Focus JethroUK© Digital Photography 2 08-11-2004 06:26 PM
any manual focus cameras easy to focus? Catherine Jo Morgan Digital Photography 6 11-05-2003 06:36 PM



Advertisments