v
Not logged inv
SearchAsk a QuestionReport an IssueMake a SuggestionMy Questions and Issues
Issue Details
Find By ID

membership provider

Issue Details

Log in to Track Changes or Edit
Q207344
Question
Mike F
Yes
Processed
Answered
.NET (ASP.NET)
ASPxGridView and Editors Suite
8.3
Windows XP
Microsoft Visual Studio 2008
6/8/2009 3:18:32 PM
-> Created by Mike F 5/28/2009 3:04:40 AM

Hello.

What is the correct way to bind the standard ASP.NET membership provider to the ASPxGridView? Surely this is a common use of the ASPxGridView component. Should the data-binding be done at design-time or only in the Page_Load or Page_Init events? I would like to display the list of users in an ASPxGridView and then provide buttons to add, edit, delete, set the "IsApproved" property, etc. Currently I have included gridUsers.DataSource = Membership.GetAllUsers() and gridUsers.DataBind() in the Page_Load event, but this gets fired with each PostBack and repositions the grid to the first row each time. If the user has selected record 3 of 5, then record 3 of 5 should still be selected after a postback. Instead, the grid is being reset to the first row with each postback.

Do you have an example showing the ASPxGridView being used with the standard membership provider? It seems this would be a great way to showcase a practical usage of the product.

Any help would be greatly appreciated.

Thank you,

Mike Fitzgerald

<- Reviewed by DevExpress Team 5/28/2009 5:58:55 AM
<- Processed (Answered) by DevExpress Team 5/28/2009 2:41:27 PM

Hi Mike.

For such use cases it is best to wrap your provider in <link href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.aspx">ObjectDataSource</helplink> and then just declaratively bind it to grid.
Please, let us know if this makes sense.

With best regards,
Ivan N.

-> Reactivated by Mike F 5/30/2009 12:29:54 AM

Hello Ivan,

Thanks for the reply. Unfortunately, I don't know what you mean by this. Do you have an example of connecting the membership provider to the ASPxGridView using this method?

Thank you.

<- Processed (Answered) by DevExpress Team 6/1/2009 2:51:30 PM

Attachment: Q207344.zip (5047 bytes)

Hi Mike.

I've attached a sample project that demonstrates an approach described in my previous answer.
Please. let us know if this makes sense.

With best regards,
Ivan N.

-> Reactivated by Mike F 6/4/2009 3:37:57 PM

I tried to run the sample you provided and received the following error...

Could not load file or assembly 'DevExpress.Web.ASPxGridView.v8.3' or one of its dependencies. The system cannot find the file specified.     C:\Downloads\DevExpress\Example Membership Provider\WebSite54\Default.aspx

I then tried to run the project converter and it tells me it has skipped Default.aspx and web.config. I try to rebuild, and get the same error as above.

What is the proper way to convert my website from one version of the DevX controls to another? I'm using 8.3.6.0 and would like to upgrade everything to the 9.1 version but I want to avoid problems. I followed the upgrade instructions from the help system but it didn't work. BTW, how can I print a topic from the help system?

Thank you.

<- Processed (Answered) by DevExpress Team 6/8/2009 3:18:32 PM

Hi Mike,

This example project was made as a web site, with shortened references to assemblies. To make it work, copy the necessary assemblies to its Bin directory. You can find our assemblies in the "C:\Program Files\Developer Express .NET v8.3\Sources\DevExpress.DLL\" directory.

The document explorer already provides the File|Print command. Please also refer to issue Help files in PDF format.

Thanks,
Michael.

Log in to Track Changes or Edit

Peer-to-Peer Discussion in DevExpress Forums

No discussion on this article has been started yet.

Please login to start discussion.

v
v
Search
Searching Tips