Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

Gridview textbox has data check without postback.. javascript?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
wildman@noclient.net - 13 Feb 2008 21:34 GMT
RE: Gridview textbox has data check without postback.. javascript?

I have a gridview with a textbox. I can set the textbox to
autopostback and check for a value in a prerender event to decide if I
should make a button on the grid row visible. However, the problem
with autopostback on a textbox is the postback occurrs when you select
another control or click away ( I guess). This is very awkward when
the control selected is dropdown as the page/selected control apears
to flicker and show and then retract the dropdownlist.

What's the best way to attack this? .. I want a button on my gridview
row to be visible when both a textbox and dropdown on  the control
have data selected/entered. problem is, I don't want to turn
autopostback on the textbox since it behalves awkwardly when the next
control selected is a dropdown and that cause a postback before I can
even select a value.

Thanks in advance for any help or information.
Angel - 13 Feb 2008 22:54 GMT
Suggest you post a code sample
Signature

aaa

> RE: Gridview textbox has data check without postback.. javascript?
>
[quoted text clipped - 14 lines]
>
> Thanks in advance for any help or information.
bruce barker - 14 Feb 2008 04:29 GMT
you should always render the button but hide with style="display:none",
then in javascript via a onchange handler, check the value, then set the
style to block.

if you are going to do .net development, you should learn the w3c dom
and javascript. posting back to tweek the UI is very bad coding. some
will suggest using an update panel, but that is way overkill for this
and would be slow over the internet.

-- bruce (sqlwork.com)

> RE: Gridview textbox has data check without postback.. javascript?
>
[quoted text clipped - 14 lines]
>
> Thanks in advance for any help or information.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.