473,406 Members | 2,208 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,406 software developers and data experts.

Disappearing Gridview

Hello:

I'm developing a search page that will display the results in a gridview. The codebehind (in VB.NET) uses a SQL command to fill the gridview.

The gridview does have paging and sorting enabled. Once the search button is clicked the initial results are displayed, if the user clicks on a sorted column or wants to advance a page the gridview disappears. Enable Sorting And Paging Callbacks is set to True. Enable ViewState is also set to True.

Thanks in advance for the help.

- J
Oct 6 '10 #1

✓ answered by billybob206

Sorry. The solution was obvious (in my view). Just go into the Events property section of the gridview and then select the function (or procedure) that fills the gridview in the PageIndexChanged and Sorted fields.

4 4833
Frinavale
9,735 Expert Mod 8TB
You have to bind the GridView to the data source after paging or sorting.

-Frinny
Oct 6 '10 #2
Is that done in the GridViewSortEventHandler?
Oct 6 '10 #3
Frinavale
9,735 Expert Mod 8TB
I typically re-bind my GridView controls in the Page PreRender event but you don't have to...you should sort your data source based on the sort criteria that the user selected/clicked on and then re-bind your GridView to the DataSource.

So, yes, do it in the Sort event handling code.

-Frinny
Oct 6 '10 #4
Sorry. The solution was obvious (in my view). Just go into the Events property section of the gridview and then select the function (or procedure) that fills the gridview in the PageIndexChanged and Sorted fields.
Oct 6 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Larry Woods | last post by:
I have a site that works fine for days, then suddenly, I start getting ASP 0115 errors with an indication that session variables IN SEPARATE SESSIONS have disappeared! First, for background...
1
by: R0bert Neville | last post by:
My web page has one unordered list that disappears in Firefox. The unordered list in question has the class="dir". I double-checked the source code and verified the markup's semantics. Everything...
2
by: Rachel Suddeth | last post by:
Here is my scenario: I have a few custom controls that I set up on a form and tested setting properties and appearances. Then I added a couple references to the project which add classes I need to...
0
by: Pathogenix | last post by:
Greetings, I needed a GridView with an optional extra row in the THEAD and TFOOT. I extended GridView and used Dino Esposito's CreateRow overload...
1
by: yefei | last post by:
i have a grid view, with two hyperlink fields declared decratively, and few bound fields added dynamically in my code i have enabled the sorting and paging for the gridview, and also declared sort...
2
by: =?Utf-8?B?dmFuZGls?= | last post by:
I have a web app that I have been working on for the last couple of weeks trying to solve this problem. One page contains a GridView with four base columns, and an unknown number of columns to be...
0
by: Don Miller | last post by:
Here is an example of what I believe is a bug in ASP.NET 2.0 GridView paging without postbacks (or at least not documented how to fix it). Once the GridView is displayed, clicking on any of the...
4
by: Don Miller | last post by:
This is a repost of a reproducible problem/bug with GridView with dynamic SQL and binding. Is there a better ASP.NET newsgroup I should post to where MS techs or MVPs take an interest in such...
0
by: =?Utf-8?B?Q2hhcmxlcw==?= | last post by:
Like many people, I normally use Yahoo! Mail via the web and like to keep all my emails stored on the Yahoo! server. However sometimes I can’t get access to a PC/the web and I download my emails...
4
by: Ananthu | last post by:
I have created a templatefield at runtime for checkboxcolumn in gridview using Itemplate Interface and InstanceIn methods. I have given the id for checkbox also. I get the checkbox column in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.