473,287 Members | 1,564 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,287 software developers and data experts.

DataGrid header question

I have created many screens which all have a DataGrid and a set of buttons.
I decided to attempt to create a user control which would contail a DataGrid
and this set of buttons. However, the DataGrid functions dirrerently in the
user control then when I put the DataGrid directly on the form.

In both cases the dataset contains only one table. When the DataGrid is
directly on the form it imediately shows the data. But when I use the user
control it appears blank with a + sign. When you click on the + sign it then
shows the table name. When you click on the table name you then get the data.
I've gotten around those two problems by adding
Me.uCtrl.DataGrid.Expand(-1)
Me.uCtrl.DataGrid.NavigateTo(0, "ServObj")

However, I'm getting a header of "NewDataSet:" which is comming from me.uCtrl.
uDataSet.tables(0).dataset.datasetname

I don't get this header when the DataGrid is directly on the form and I don't
want it!! How the heck do I kill it?

Thanks,
Craig

--
Message posted via http://www.dotnetmonster.com
May 17 '06 #1
4 1020
will this work?
set the database name to " "
craig via DotNetMonster.com wrote:
I have created many screens which all have a DataGrid and a set of buttons.
I decided to attempt to create a user control which would contail a DataGrid
and this set of buttons. However, the DataGrid functions dirrerently in the
user control then when I put the DataGrid directly on the form.

In both cases the dataset contains only one table. When the DataGrid is
directly on the form it imediately shows the data. But when I use the user
control it appears blank with a + sign. When you click on the + sign it then
shows the table name. When you click on the table name you then get the data.
I've gotten around those two problems by adding
Me.uCtrl.DataGrid.Expand(-1)
Me.uCtrl.DataGrid.NavigateTo(0, "ServObj")

However, I'm getting a header of "NewDataSet:" which is comming from me.uCtrl.
uDataSet.tables(0).dataset.datasetname

I don't get this header when the DataGrid is directly on the form and I don't
want it!! How the heck do I kill it?

Thanks,
Craig

--
Message posted via http://www.dotnetmonster.com


May 17 '06 #2
I mean datasetName

May 17 '06 #3
I suspose it might, but I don't see why I should need to do this.
When I check the datasetname for the dataset bound to the DataGrid that is
placed directly on the form, it also has a datasetname of "NewDataSet". So,
the problem isn't that the dataset has this name, but why does one datagrid
give me the data and no header, but the other, that is in a user control,
initially display in this tree type view and when I expand it shows this
darned header???

Craig

--
Message posted via http://www.dotnetmonster.com
May 17 '06 #4
no idea. sorry.

May 18 '06 #5

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

Similar topics

0
by: Suzanne | last post by:
I'd like to know how can I put up a confirmation question when the user tries to delete a row in the datagrid by clicking on the row header and pressing the Delete key? I have found this code on...
13
by: pmcguire | last post by:
I have a DataGrid control for which I have also created several new extended DataGridColumnStyles. They behave pretty nicely, but I can't figure out how to implement Selected Item formatting for...
4
by: Mortar | last post by:
i need a datagrid with 2 header columns. The top one might have 1 column spanning 5 columns of the header row below it. what is the best way to do this? Could i have 2 datatables...1 filling the...
5
by: rn5a | last post by:
In my application, I want to populate all the directories & files existing in a directory on the server in a DataGrid. To ensure that all the directories get listed first followed by all the files,...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.