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 March 24th, 2008, 03:53 AM
Authorized User
 
Join Date: Feb 2008
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Datagrid

Hello Friends,

I want to display + sign in datagrid for adding relation, but I am not able to get it.
Can anyone help me?
Thank You.
Here is my Code
//code
string str = "SELECT * FROM [Inventory].[dbo].[product_master]";

                sqlcon.Open();
                SqlDataAdapter adp = new SqlDataAdapter(str, sqlcon);

                DataSet dtp = new DataSet();
                adp.Fill(dtp,"product_master");
                dataGridView1.DataSource = dtp;
//code

JAININ
__________________
JAININ
 
Old March 24th, 2008, 04:33 AM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi
change your code with the flowing code
Code:
string str = "SELECT *  FROM [Inventory].[dbo].[product_master]";
   
sqlcon.Open();
SqlDataAdapter adp = new SqlDataAdapter(str, sqlcon);
  
DataSet dtp = new DataSet();
adp.Fill(dtp,"product_master");
dataGridView1.DataSource = dtp;
   dataGridView1.DataMember ="product_master";
 
Old March 24th, 2008, 12:41 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I'm afraid you are going to need to provide considerably more explanation here for us to understand the question.

-Peter
peterlanoie.blog





Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom paging in Datagrid with datagrid page count madhusrp ASP.NET 1.0 and 1.1 Professional 12 June 2nd, 2008 01:15 PM
User COntrol Datagrid inside datagrid rodmcleay ASP.NET 1.0 and 1.1 Professional 3 April 14th, 2007 10:11 AM
Creating DataGrid In Repeater/DataGrid liduwan ASP.NET 1.0 and 1.1 Professional 9 March 6th, 2007 03:31 PM
datagrid ajaidass ADO.NET 2 March 1st, 2007 05:36 PM
Need help regarding datagrid ngsharmila .NET Framework 1.x 1 February 1st, 2006 12:55 AM





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