Click here to Skip to main content
15,905,028 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Add-in issue while Loading Excel Files using ASP.net Pin
ToddHileHoffer25-Jan-08 4:19
ToddHileHoffer25-Jan-08 4:19 
GeneralWebService Pin
honeyss25-Jan-08 3:10
honeyss25-Jan-08 3:10 
AnswerRe: WebService Pin
ToddHileHoffer25-Jan-08 3:35
ToddHileHoffer25-Jan-08 3:35 
GeneralConfirm Box Pin
mehrdadc4825-Jan-08 2:10
mehrdadc4825-Jan-08 2:10 
GeneralRe: Confirm Box Pin
Vasudevan Deepak Kumar25-Jan-08 2:47
Vasudevan Deepak Kumar25-Jan-08 2:47 
AnswerRe: Confirm Box Pin
ToddHileHoffer25-Jan-08 3:33
ToddHileHoffer25-Jan-08 3:33 
GeneralRe: Confirm Box Pin
bhanu1234525-Jan-08 20:43
bhanu1234525-Jan-08 20:43 
QuestionScroll/navigate /focus datagrid to the row in which edit was clicked [modified] Pin
Sakshi Smriti25-Jan-08 1:22
Sakshi Smriti25-Jan-08 1:22 
Hi All,

I am using a datagrid in a ASP.NET page.
The data grid is inside a div tag.
<div id="divEditProjectRes" style="OVERFLOW: auto; HEIGHT: 150px">
<asp:datagrid id="dgEditResource" runat="server" Width="100%">

There is edit option in each row of the data grid and the user can edit on a few fields.
The grid has many records and the user has to scroll down.After scrolling to the record and clicking on edit there is a post back ,and the grid is set back to the top and he again has to scroll back to the row in which now fields are editable.
What I want here is that after he clicks on edit the same row must come at the top and the user need not scroll it again.
I have used the following code in dgEditResource_EditCommand to set focus to the editable text box in the particular scroll row ,Although it gets the focus but again we need to scroll down .


Dim descTB As TextBox
descTB = dgEditResource.Items(e.Item.ItemIndex).Cells(2).FindControl("sdate_edit")
'Set the script to focus and select the TextBox
RegisterStartupScript("focus", "&lt;script language=""JavaScript"">
vbTab &amp; "Form2." &amp; descTB.ClientID &amp; ".focus();"
vbCrLf &amp; vbTab &amp; "Form2." & descTB.ClientID &amp; ".select();" &amp; "&lt;" &amp; "/script&gt;")
descTB = dgEditResource.Items(e.Item.ItemIndex).Cells(2).FindControl("percent_Edit")

If we press tab or space bar the record comes up as focus is already in the text box.
But I need that row to scroll up or navigate by itself after edit is clicked.

Thanks in advance.

Regards,
Sakshi
Smile | :)

<div class="ForumMod">modified on Saturday, January 26, 2008 7:47:32 AM</div>
GeneralDropdowlist using database wizard Pin
C#Coudou25-Jan-08 0:46
C#Coudou25-Jan-08 0:46 
GeneralActiveXObject + javascripting Pin
ritu432125-Jan-08 0:01
ritu432125-Jan-08 0:01 
GeneralRe: ActiveXObject + javascripting Pin
Venkatesh Mookkan25-Jan-08 0:16
Venkatesh Mookkan25-Jan-08 0:16 
GeneralRe: ActiveXObject + javascripting Pin
ritu432125-Jan-08 0:28
ritu432125-Jan-08 0:28 
GeneralRe: ActiveXObject + javascripting Pin
Venkatesh Mookkan25-Jan-08 0:50
Venkatesh Mookkan25-Jan-08 0:50 
GeneralChange cursor position & language Pin
samerh24-Jan-08 23:36
samerh24-Jan-08 23:36 
Generalproblem with website Pin
eyeseetee24-Jan-08 22:56
eyeseetee24-Jan-08 22:56 
GeneralRe: problem with website Pin
bamagrad26-Jan-08 15:02
bamagrad26-Jan-08 15:02 
GeneralRegularExpressionValidator Pin
AnhTin24-Jan-08 22:15
AnhTin24-Jan-08 22:15 
GeneralRe: RegularExpressionValidator Pin
Sathesh Sakthivel24-Jan-08 22:38
Sathesh Sakthivel24-Jan-08 22:38 
QuestionProblem with Gridview Updating- ITs very urgent Pin
robinsimon_m24-Jan-08 21:47
robinsimon_m24-Jan-08 21:47 
GeneralRe: Problem with Gridview Updating- ITs very urgent Pin
pmarfleet25-Jan-08 1:49
pmarfleet25-Jan-08 1:49 
GeneralRe: Problem with Gridview Updating- ITs very urgent Pin
Paul Conrad25-Jan-08 3:46
professionalPaul Conrad25-Jan-08 3:46 
GeneralRe: Problem with Gridview Updating- ITs very urgent Pin
Vasudevan Deepak Kumar25-Jan-08 3:10
Vasudevan Deepak Kumar25-Jan-08 3:10 
GeneralRe: Problem with Gridview Updating- ITs very urgent Pin
Paul Conrad25-Jan-08 3:45
professionalPaul Conrad25-Jan-08 3:45 
QuestionHow Find This is mail is Valid or not...! Pin
Virendrak24-Jan-08 21:37
Virendrak24-Jan-08 21:37 
GeneralRe: How Find This is mail is Valid or not...! Pin
Sathesh Sakthivel24-Jan-08 22:36
Sathesh Sakthivel24-Jan-08 22:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.