problem on gridview asp3.5c#

Posted by Suneel161 under Regular Expressions on 4/21/2010 | Views : 1183 | Status : [Member] | Replies : 5
i have taken a dropdown(year).below this i have taken a gridview.if i select the year as 2010 then the data is displaying correctly related to that year
but when i selected 2011 no data is displaying. could u please help me out.




Responses

Posted by: Pavanandey on: 4/21/2010 [Member] Bronze

Up
0
Down


Hi suneel,
check these points

1) does data for 2011 exists .
2) if data exists does it match to the conditions u specfied.
3) is ur dropdown autopostback set to true and ur bind the gridview in drop down selected index event
4) is year parameter passed correctly to the query



Thanks
Pavan Kumar
Mark Answer if this fits the need

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: SurajRane on: 4/21/2010 [Member] Starter

Up
0
Down
Could you please give more details. if posssible write which code you have written.

from above description I can only say you have not implemented selectedIndexChange for Dropdown
or forgot to bing grid in SelectedIndxChange event
.

please check it.

Mark it as answer if satisfied.

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Er.deepakdalal on: 4/21/2010 [Member] Starter

Up
0
Down
I think you successfully implement your drop-down list because as you say you get the correct result when you trying for the year 2010, so there is not any problem in you auto post back and selectedIndexChange, Now according to my experience you are doing mistake only in one of the following places :

1) First one in the condition you are implementing for the year 2011 for fetching the data from the database.

2) Second one in the SQL query where you supply the date for fetching the data.

3) Last one check whether there is data available in the database for year 2011 or not.

And after that if the problem is not solve then please write your condition and SQL query so we help you out.





Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Syedshakeer on: 4/21/2010 [Member] Starter

Up
0
Down
I think there is no data in a table related with 2011.

Syed Shakeer Hussain

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naveenmanam on: 4/27/2010 [Member] Starter

Up
0
Down
i think you use the online time and date
so remove it and try again
either post he all code

NaveenKumar

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response