I am writing a similar program that I have written as a WebForm, only
this is a WinForm.
In the WebForm I check for a row count in a GridView. It works
perfectly everytime when
GridView1.Row.Count == 0.
But, in my WinForm, this code:
bindingSource4.DataSource = GetData2("Select id, parent_id, name,
image_file_name, thumbnail FROM categories where parent_id = '" +
dgData1 + "' order by sort_order asc");
dataGridView6.DataSource = bindingSource4;
if (dataGridView6.RowCount == 0)
{
shows a 1 for One Row when there is NO data.
Can I check for data in another way for a dataGridView than Row.Count
or RowCount?
Any help is appreciated.
Thanks,
Trint 3 1744
how about bindingSource4.Count ?
"trint" <tr***********@gmail.comwrote in message
news:11**********************@p47g2000hsd.googlegr oups.com...
>I am writing a similar program that I have written as a WebForm, only
this is a WinForm.
In the WebForm I check for a row count in a GridView. It works
perfectly everytime when
GridView1.Row.Count == 0.
But, in my WinForm, this code:
bindingSource4.DataSource = GetData2("Select id, parent_id, name,
image_file_name, thumbnail FROM categories where parent_id = '" +
dgData1 + "' order by sort_order asc");
dataGridView6.DataSource = bindingSource4;
if (dataGridView6.RowCount == 0)
{
shows a 1 for One Row when there is NO data.
Can I check for data in another way for a dataGridView than Row.Count
or RowCount?
Any help is appreciated.
Thanks,
Trint
On May 31, 1:58 pm, "Mel" <Mel.RemoveS...@insdirect.comwrote:
how about bindingSource4.Count ?
"trint" <trinity.sm...@gmail.comwrote in message
news:11**********************@p47g2000hsd.googlegr oups.com...
I am writing a similar program that I have written as a WebForm, only
this is a WinForm.
In the WebForm I check for a row count in a GridView. It works
perfectly everytime when
GridView1.Row.Count == 0.
But, in my WinForm, this code:
bindingSource4.DataSource = GetData2("Select id, parent_id, name,
image_file_name, thumbnail FROM categories where parent_id = '" +
dgData1 + "' order by sort_order asc");
dataGridView6.DataSource = bindingSource4;
if (dataGridView6.RowCount == 0)
{
shows a 1 for One Row when there is NO data.
Can I check for data in another way for a dataGridView than Row.Count
or RowCount?
Any help is appreciated.
Thanks,
Trint- Hide quoted text -
- Show quoted text -
Thanks Mel,
I will try this right now.
Trint
On Jun 1, 7:50 am, trint <trinity.sm...@gmail.comwrote:
On May 31, 1:58 pm, "Mel" <Mel.RemoveS...@insdirect.comwrote:
how about bindingSource4.Count ?
"trint" <trinity.sm...@gmail.comwrote in message
news:11**********************@p47g2000hsd.googlegr oups.com...
>I am writing a similar program that I have written as a WebForm, only
this is a WinForm.
In the WebForm I check for a row count in a GridView. It works
perfectly everytime when
GridView1.Row.Count == 0.
But, in my WinForm, this code:
bindingSource4.DataSource = GetData2("Select id, parent_id, name,
image_file_name, thumbnail FROM categories where parent_id = '" +
dgData1 + "' order by sort_order asc");
dataGridView6.DataSource = bindingSource4;
if (dataGridView6.RowCount == 0)
{
shows a 1 for One Row when there is NO data.
Can I check for data in another way for a dataGridView than Row.Count
or RowCount?
Any help is appreciated.
Thanks,
>Trint- Hide quoted text -
- Show quoted text -
Thanks Mel,
I will try this right now.Trint- Hide quoted text -
- Show quoted text -
That is it...Thanks Mel. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Andy |
last post by:
I have a C# application that is using a DataGridView (DGV). The DGV uses a
table adapter to connect to the datasource, which uses a DataSet as the data.
The DataSet has some constraints placed on...
|
by: Ivan |
last post by:
I have a class Foo which have two property. I have a thread that do
some process and update class Foo int B. I have a datagridview on main
form. this datagridview data source to this class Foo and...
|
by: Rick Shaw |
last post by:
Hi, I have a problem with the datagridview not refreshed when the
application first appear on the screen.
The datagridview display data from a table in the dataset. At the same
time, I've added...
|
by: michael sorens |
last post by:
I have successfully bound an XmlDocument to a DataGridView but all fields
seem to be strings. I want to retrofit appropriate datatypes on some of
the fields. Let me take this in 2 parts.
Part...
|
by: David Mayerovitch |
last post by:
As an exercise in learning Visual Basic 2005, I am putting together a simple
XML editor.
I place on the form the objects DataGridView1 and DataSet1.
' Read an XML file into DataSet1:...
|
by: =?Utf-8?B?TWFyY2Vsbw==?= |
last post by:
Hello,
I am new to pulling data into VB and using DataGridViews..... so this
might be a dumb question but I can not seem to understand how to make this
work.
What I need acomplished:
Exec a...
|
by: hjin |
last post by:
DataGridView takes very much time if I update a lot of data
I have a DataGridView which has a DataSource (a DataTable) of 3000
rows. If I want to update one column of every rows in the DataTable,...
|
by: QuickBooksDev |
last post by:
VB.NET 2005 DataGridView Checkbox - Check Event need to know check status
I would like to use the DataGridView Checkbox like a normal checkbox.
When someone clicks on it I would expect that I...
|
by: Limno |
last post by:
Can anyone suggest me how to pass datagridview data to database.
Process must be like this, if the user enter multiple data into the datagridview after user press "save" button, datagridview data...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
| |