• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 546
  • Last Modified:

ASP.Net Gridview Filtering and Display

I have a two questions. I was not sure if I should split them up or not. But I have a gridview in asp.net (c#). The girdview's datasource is a SQL Server view. I want to filter the gridview for the currently logged in user. I am using the membership model. How do I filter the data?
Second, with that same gridview, I want to dispaly the data in 2 columns. Is there a way to do this? It's returning only one column from the view, but the results can be many records. I'd ike to display it in two columns so it does not take up to much real estate. Thanks.
0
dodgerfan
Asked:
dodgerfan
1 Solution
 
Nathan BoveSoftware EngineerCommented:
You can filter the data by putting an event handler on the "OnSelecting" event of your datasource and setting the value of a parameter to the current user.

You can add columns to a gridview through it's <Columns> tag.  You can have as many columns as you like specified.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now