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.

How to handle a click in a DataGrid without EnableViewState=false?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DC - 12 Feb 2008 11:24 GMT
Hi,

I want to present hirarchical data in a gridview. Each row offers a
link to another data subset.

When viewstate is off, I have to early rebuild the gridview just to
raise the damn click event (right?). Using viewstate (no matter where)
to rebuild the gridview is no option since the gridview may contain
many rows. I then have to get the newly requested data - two expensive
trips to the database, one of them not necessary in my opinion.

I could just place an anchor in the gridview and trigger a get request
with the row number in the querystring. But that is no option either,
since the gridview resides in an updatepanel and the datagrid update
is supposed to happen in a callback.

Does someone have an idea how to work around this problem?

Regards
DC
bruce barker - 12 Feb 2008 16:41 GMT
there is no requirement to use .net event model which requires the controls
to be created for postback.

you can acess the form collection and use you own logic. the hidden field
"__EVENTTARGET" has the postback control name (unless its a button, then the
buttons name/value pair is passed). "__EVENTARGUMENT" has the command arg if
one is used. all the rest of the postbackl control values are in the form
collection as name/value pairs.

-- bruce (sqlwork.com)

> Hi,
>
[quoted text clipped - 16 lines]
> Regards
> DC
DC - 12 Feb 2008 17:52 GMT
On 12 Feb., 17:41, bruce barker
<brucebar...@discussions.microsoft.com> wrote:
> there is no requirement to use .net event model which requires the controls
> to be created for postback.
[quoted text clipped - 29 lines]
>
> - Zitierten Text anzeigen -

Bruce again, allright! I will check this out, sounds like the solution
I am looking for. Thanks a lot,
Regards
DC

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.