?
Solved

How to bind data to GridView table

Posted on 2008-11-04
2
Medium Priority
?
430 Views
Last Modified: 2013-12-17
Greetings,

In the table seen in the picture below I'm trying to populate column 1 with information based on the users login name.  The first section will provide two boxes for the user name and domain.  Based on this information the cells in column 1 will automatically populate.

Need help with this.

Thanks
UserModTable.JPG
0
Comment
Question by:John500
2 Comments
 
LVL 10

Accepted Solution

by:
jinn_hnnl earned 2000 total points
ID: 22883944
Create your gridView, bind your gridView datasource to an ObjectDataSource which rely on username and domain, this ObjectDataSource has a select method which require 2 parameters loginname & domain.

Look at my example, the UserProject.UserClass is a class where you define the GetUserChangeTable(string loginname, string domain)

Hope this helps

JINN


<asp:GridView ID="gvUserChange" runat="server"  DataSourceID="objdsUserChange" ...>
</asp:GridView>
 
<asp:ObjectDataSource ID="objdsUserChange" runat="server" SelectMethod="GetUserChangeTable" TypeName="UserProject.UsersClass" ...>
	<SelectParameters>
                    <asp:ControlParameter ControlID="tbLoginName" PropertyName="Text" Type="String" />		
                    <asp:ControlParameter ControlID="ddlDomain" PropertyName="SelectedValue" Name="Domain" Type="String" />
	</SelectParameters>
</asp:ObjectDataSource>

Open in new window

0
 

Author Closing Comment

by:John500
ID: 31513114
Thank you
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.
Suggested Courses
Course of the Month15 days, 13 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question