Home
|
Tutorial
|
Articles
|
Forum
|
Interview Question
|
Code Snippets
|
News
|
Fun Zone
|
Poll
|
Web Links
|
Certification
|
Search
Welcome :
Guest
Sign In
Register
Win Surprise Gifts!!!
Congratulations!!!
Top 5 Contributors of the Month
ffttt
Home
>>
Forum
>>
WPF
>>
Post New Question
Subscribe to Forum
text block
Posted By:
siri.k
Posted Date:
February 09, 2011
Points:
2
Category :
WPF
hai all can any one plz tell me ,, in my project design there is one button show customer id , and when we clik that button i want to display all customer details avail in database should be display in that text blok so plz tell me how to write code for that
Responses
Author:
siri.k
Posted Date: February 10, 2011 Points: 5
no one is there to ans my que hmmmmmmmm
Author:
Naresh
Posted Date: February 15, 2011 Points: 5
hi siri,
U cannot display all the customer id in a text box rather u can use data grid to display all the records,
Here i give the coding for displaying in datagrid,
Copy datagrid from tool box and place it in ur form
in button click event try this code,
SqlConnection con1 = new SqlConnection("Server=LocalHost;DataBase=DatabaseName;Uid=sa;Pwd=sa");
con1.Open();
SqlCommand cmd3 = new SqlCommand("select customerId from TableName", con1);
DataTable t = new DataTable();
SqlDataAdapter dr = new SqlDataAdapter(cmd3);
dr.Fill(t);
this.DataGrid1.DataSource = t;
this.DataGrid1.DataBind();
con1.close();
In think the code will help u
Thanks
Naresh
Author:
siri.k
Posted Date: February 16, 2011 Points: 5
thanku naresh
Post Reply
You must
Sign In
To post reply
Related Questions Related Questions
How to write to a text file in C#
User can not select TEXT for copy paste from my .aspx page...
How to show hyperlink, Linkbutton text on the tiltle bar of Internet explorer...
How to restrict user to (ctrl+v) option for a text box..?
display text in other page using c#
display text in other page
disply contacts in text box seperated by cama
How i can read a Text from Image in a web application ?
How to re size the text (Font) in asp.net website
textbox text values should not be copied or edited
Latest Forum Questions From The Same Category
Share WPF Application over net
Rich Desktop Interactive application
How To Find the Combobox in Wpf
Getting Row Value is null in WPF.
Combobox Binding in WPF
Add button to datagrid Dynamially in wpf
Detecting Mobile Device IMEI, IMSI, Model, Comport Information using AT commands in VB.Net
Bind combobox
Show the Default Text Of Combobox as "--Select--" when combo is binding to dataset.
how to stop .swf html page any button click in wpf,any idea please share with me
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Here
Quick Links For Forum Categories:
ASP.Net
Windows Application
.NET Framework
C#
VB.Net
ADO.Net
Sql Server
SharePoint
OOPs
Silverlight
IIS
JQuery
JavaScript/VBScript
Biztalk
WPF
Patten/Practices
WCF
Others
www.DotNetSpark.com
UnAnswered
All
Hall of Fame
Twitter
Terms of Service
Privacy Policy
Contact Us
Archives
Tell A Friend