473,397 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Drill down and caption "New Data Set"

This is a WinForm.
After the code below is executed, my data grid only shows a plus sign. I
click the plus sign and the word table is shown. I click on the word table,
and my columns are shown with the data from my SP.

How do I stop the plus sign, and the table word from coming up? How do I
stop the caption "New Data Set" at the top of my data grid?

Nov 17 '05 #1
3 1392
I forgot to post my code, here it is.

private void frmDealerSearch_Load(object sender, System.EventArgs e)
{
string sConnString = "Data
Source=db;Database=License;Integrated Security=False;User
ID=sa;password=password";
string sProc = "prGet_DealerInfo";

using (SqlConnection oCn = new
SqlConnection(sConnString))
{
using (SqlCommand oCmd = new
SqlCommand(sProc, oCn))
{
oCn.Open();
oCmd.CommandType =
CommandType.StoredProcedure;

oCmd.Parameters.Add("@sDealerNum",
SqlDbType.NChar, 6);
oCmd.Parameters["@sDealerNum"].Value
= "900001";

SqlDataAdapter oDa = new
SqlDataAdapter();

oDa.SelectCommand = oCmd;
DataSet ds=new DataSet();
oDa.Fill(ds);
dgDealerInfo.DataSource = ds;
}
}

}

"Mike L" wrote:
This is a WinForm.
After the code below is executed, my data grid only shows a plus sign. I
click the plus sign and the word table is shown. I click on the word table,
and my columns are shown with the data from my SP.

How do I stop the plus sign, and the table word from coming up? How do I
stop the caption "New Data Set" at the top of my data grid?

Nov 17 '05 #2
Hi,

[Inline]

"Mike L" <Ca***@nospam.nospam> wrote in message
news:E2**********************************@microsof t.com...
I forgot to post my code, here it is.

private void frmDealerSearch_Load(object sender, System.EventArgs e)
{
string sConnString = "Data
Source=db;Database=License;Integrated Security=False;User
ID=sa;password=password";
string sProc = "prGet_DealerInfo";

using (SqlConnection oCn = new
SqlConnection(sConnString))
{
using (SqlCommand oCmd = new
SqlCommand(sProc, oCn))
{
oCn.Open();
oCmd.CommandType =
CommandType.StoredProcedure;

oCmd.Parameters.Add("@sDealerNum",
SqlDbType.NChar, 6);

oCmd.Parameters["@sDealerNum"].Value
= "900001";

SqlDataAdapter oDa = new
SqlDataAdapter();

oDa.SelectCommand = oCmd;
DataSet ds=new DataSet();
oDa.Fill(ds);
dgDealerInfo.DataSource = ds;
Change to dgDealerInfo.DataSource = ds.Tables[0];
---OR---
Use dgDealerInfo.DataMember to set the table name, which is presumable
"table" if that's what you saw.

HTH,
Greetings

}
}

}

"Mike L" wrote:
This is a WinForm.
After the code below is executed, my data grid only shows a plus sign. I
click the plus sign and the word table is shown. I click on the word
table,
and my columns are shown with the data from my SP.

How do I stop the plus sign, and the table word from coming up? How do I
stop the caption "New Data Set" at the top of my data grid?

Nov 17 '05 #3
Hi Cadel,

Does "Bart Mermuys"'s reply make sense to you? Is your problem resolved?
Please feel free to feedback, thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Julian | last post by:
Hi I am just trying to get to grips with ado.net . I simply wish to add data from some text boxes back to a new row in the dataset on clicking a save button. How do you create the new row in...
3
by: Julian | last post by:
Hi I am just trying to get to grips with ado.net . I simply wish to add data from some text boxes back to a new row in the dataset on clicking a save button. How do you create the new row in...
51
by: Tony Sinclair | last post by:
I'm just learning C#. I'm writing a program (using Visual C# 2005 on WinXP) to combine several files into one (HKSplit is a popular freeware program that does this, but it requires all input and...
38
by: Sanders Kaufman | last post by:
I'm converting my table-based layouts to css-positioned divs - but the ONLY reason I'm doing it is because it's *considered* a best practice. I don't really see where anything goes hinky when...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.