Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 displaying datas in datagrid based on the selectio

Author  Topic 

susan_151615
Yak Posting Veteran

99 Posts

Posted - 2008-10-14 : 13:42:12
hi i am a beginer in asp.net .I am creating a web page in that there is a form
the form has a datagrid
and a (claendar and a text box which displas the date selected in calendar
and there is a drop down list hardcoded with certain values ---these are out of datagrid)

i need to display certain records in the datagrid based on the selection of date from calendar and drop down list as well as the login id which i used to login into the page (which am using as session variable)

when the user clicks the date and drop down any value the datagrid must display the values for the particular user id who is logged in based on the session as well as date as well as dropdown

i have correctly passed the session my problem is how to make the datagrid to display values

susan

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-10-14 : 14:20:44
dont use a session to pass the value. As if you have a heavily hit site, it will weigh down your site.

Use the control name. ie


DateTime mydate;
mydate = Calendar1.SelectedDate;



pass the value of mydate to your object datasource to be processed by your database
Go to Top of Page

susan_151615
Yak Posting Veteran

99 Posts

Posted - 2008-10-15 : 00:48:56
no ya actually based on the users login id only i have to access these things so user id am using in session variable

susan
Go to Top of Page

cvraghu
Posting Yak Master

187 Posts

Posted - 2008-10-15 : 07:39:47
Please read how to show data in grid -

1. Build a datasource based on all your criteria - date, combo and userid.

2. Bind it to the grid and do a refresh.

If you are still not sure, please read more about grids, datasources and .Net
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-10-15 : 07:46:07
For sessions read up on asp.net membership provider. AS its all done for you. You really dont need to assign a session ID
Go to Top of Page

susan_151615
Yak Posting Veteran

99 Posts

Posted - 2008-10-16 : 12:53:01
hi thank u so much with all ur ideas i made the dats to display in datagrid based on selection but if i select one value the value is getting displayed but if i select another value it is not getting displayed its showing the same value and i have set even the auto post back property to true

susan
Go to Top of Page
   

- Advertisement -