Wrox Programmer Forums
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 20th, 2006, 10:23 AM
Authorized User
 
Join Date: Nov 2006
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataGridView

How to Use DataGridView.
I have problem in bind datagridview at run time. because it doesn't show record.
Help Me.


Thanks and Regards
Kumar Ashish
9350789189
__________________
Thanks
Kumar Ashish
krashishroa@yahoo.co.in
 
Old December 30th, 2006, 12:40 PM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi
this code help you
sepode you have a dataGridView that its name is dataGridView1

type follow code into your program

sqlconnection con =new sqlconnection("server=(local);database=database name;Integrated Security=True");
dataView dv = new dataView();
dataTable dt =new dataTable();
sqlDataAdapter da =new sqlDataAdapter("select * from tableName",con);
da.fill(dt);
dv=dt.DefultView;
dataGridView1.dataSource=dv;

kiani mehdi





Similar Threads
Thread Thread Starter Forum Replies Last Post
datagridview help manius VB Databases Basics 1 January 27th, 2008 02:44 AM
DatagridView in C# velan C# 2005 0 June 8th, 2007 09:25 PM
datagridview thirumalai ASP.NET 1.0 and 1.1 Professional 1 April 7th, 2007 03:35 AM
DataGridView Sakkaw C# 2005 1 January 9th, 2007 12:06 PM
datagridview ScottSheck Visual Basic 2005 Basics 0 June 14th, 2006 11:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.