Solved

datagrid focus event for timer

Posted on 2011-02-18
8
299 Views
Last Modified: 2012-05-11
I have a timer on my page that refreshes my page, hte problem is that is someone is in the middle of updatinga row in the gridview it refreshes the page and there data disappears and then they need to starat over agian.  Is there a way to turn off the timer when they put focus on a row of the gridview to edit it.
0
Comment
Question by:kdeutsch
  • 3
  • 2
8 Comments
 
LVL 11

Expert Comment

by:SAMIR BHOGAYTA
ID: 34927529
May be you should write the code into Timer_Tick() event. Ok
0
 

Author Comment

by:kdeutsch
ID: 34929212
Hi,
What code??  Is there a gridview focus event have no idea.
Protected Sub UPdateTimer_Tick(ByVal sender As Object, ByVal e As EventArgs)
        FillGrid()
    End Sub

Open in new window

0
 
LVL 25

Expert Comment

by:apeter
ID: 35033161
If  there is a user post back,while entering grid then you can set a hidden variable in code behind to true,

In the trigger function, check for the hidden variable. If it is false then refresh else don't
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:kdeutsch
ID: 35036075
Hi,

I guess I am not understanding this, if I have a gridview on my screen with textboxes in it and I start editing it, how can I set a value in a hidden field that will  not cause the refresh.
0
 
LVL 25

Accepted Solution

by:
apeter earned 500 total points
ID: 35041438
Through onchange event for textbox in javascript you can set your hidden field. All textbox in ur grid can update the same one hidden variable.
0
 

Author Closing Comment

by:kdeutsch
ID: 35046687
thanks
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Read about why website design really matters in today's demanding market.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now