473,326 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

SetFocus on a specific cell in datagrid

I have a datagrid on a web page. In the footer there is a field that should
be recieve the focus, either at the start or after a button is clicked to
insert the row that is being added in the footer.

I created the following Sub...

Private Sub SetFocus(ByVal ctrl As Control)
Dim SetFocus As String = "<script
language='javascript'>document.getElementById(""" & ctrl.ClientID &
""").focus();</script>"
RegisterStartupScript("SetFocus", SetFocus)
End Sub

And when I call it at the end of my ButtonClick event this is what I enter...

SetFocus(dtgIPAddresses)

in my HTML This is the entry to the control I want to select....

<FooterTemplate>
<asp:TextBox ID="txtIpAddressNew" Runat="server" TabIndex="1" />
</FooterTemplate>

I don't know what I need to do in my sub...or elsewhere to achieve this...
Jan 26 '06 #1
0 1499

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

Similar topics

1
by: Gerg | last post by:
The datagrid has a tablestyle applied to it, and there are DataGridTextBoxColumn and each DataGridTextBoxColumn has an array of DataGridTextBox objects. Private Sub highlight(ByVal str As...
2
by: michael Schindler | last post by:
How i can set in a datagrid in c# widows forms in a specifig cell example Row 3 column 4 a specifig data for example "Michael"? I want after the user give in a cell in my datagrid additionally...
2
by: Michael Schindler | last post by:
How can I in a cell see whether these am empty and if a text of me inside to set? For example "100012" into the cell Row 3 column 3? I work whit C# wondows Appl. Thanks Michael
3
by: Michael Schindler | last post by:
Hello NG How I can delete a specific cell in my Datagrid. I would like if the user is in the column 6 the value changed, after automaticly the value in the column 7 in the same row to delete....
3
by: coleenholley | last post by:
I need to know how to get a specific row/cell of data to post as a session variable - like I would with an ASP.Net table: Dim ld_sum_tot_cty_tax As Doubl Session("wa_tot_gal") =...
2
by: Daniel Walzenbach | last post by:
Hi, I created an ASP.NET Datagrid where a single row can be selected by clicking anywhere on the row (according to...
2
by: tenzeel. | last post by:
i wants that the Event would fie when we click on DataGrid using Asp.net without using any select command or hyperlink. i just want that user click on the specific cell of datagrid then the even...
4
by: gugu | last post by:
Hi I have a datagrid which has 20 rows and 20 columns, 15 of 20 columns are checkboxs and their headertexts, datafields are dynamic. I need to loop through the whole page to see if the specific...
1
by: Gidi | last post by:
Hi, Is it possible to Disable editing of one specific cell in one specific row in dataGrid? Thanks, Gidi.
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.