Hi
Can anybody tell me how to determine, from within an overrided DataGrid,
whether the datasource of the datagrid is a DataView or DataTable?
Thanks in advance
Geoff 6 1091
Geoff,
Have you considered something like:-
Dim oRet as new object
oRet = dg.datasource
if typeof oRet is datatable then
else
if typeof oRet is dataview then
end if
end if
Haven't tried this, but HTH. Phil
"Geoff Jones" <no********@email.com> wrote in message
news:43***********************@news.dial.pipex.com ... Hi
Can anybody tell me how to determine, from within an overrided DataGrid, whether the datasource of the datagrid is a DataView or DataTable?
Thanks in advance
Geoff
Geoff,
Have you considered something like:-
Dim oRet as new object
oRet = dg.datasource
if typeof oRet is datatable then
else
if typeof oRet is dataview then
end if
end if
Haven't tried this, but HTH. Phil
"Geoff Jones" <no********@email.com> wrote in message
news:43***********************@news.dial.pipex.com ... Hi
Can anybody tell me how to determine, from within an overrided DataGrid, whether the datasource of the datagrid is a DataView or DataTable?
Thanks in advance
Geoff
Many thanks Phil
"Phil G." <Ph**@nospam.com> wrote in message
news:dg**********@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com... Geoff,
Have you considered something like:-
Dim oRet as new object
oRet = dg.datasource if typeof oRet is datatable then
else if typeof oRet is dataview then
end if end if
Haven't tried this, but HTH. Phil
"Geoff Jones" <no********@email.com> wrote in message news:43***********************@news.dial.pipex.com ... Hi
Can anybody tell me how to determine, from within an overrided DataGrid, whether the datasource of the datagrid is a DataView or DataTable?
Thanks in advance
Geoff
Many thanks Phil
"Phil G." <Ph**@nospam.com> wrote in message
news:dg**********@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com... Geoff,
Have you considered something like:-
Dim oRet as new object
oRet = dg.datasource if typeof oRet is datatable then
else if typeof oRet is dataview then
end if end if
Haven't tried this, but HTH. Phil
"Geoff Jones" <no********@email.com> wrote in message news:43***********************@news.dial.pipex.com ... Hi
Can anybody tell me how to determine, from within an overrided DataGrid, whether the datasource of the datagrid is a DataView or DataTable?
Thanks in advance
Geoff
> Can anybody tell me how to determine, from within an overrided DataGrid, whether the datasource of the datagrid is a DataView or DataTable?
if typeof datagrid1.datasource Is DataTable then ...........
etc
I hope this helps,
Cor
> Can anybody tell me how to determine, from within an overrided DataGrid, whether the datasource of the datagrid is a DataView or DataTable?
if typeof datagrid1.datasource Is DataTable then ...........
etc
I hope this helps,
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dianna K. |
last post by:
I have a dataview which I am assigning to a Datatable (I
am doing this because currently Crystal Reports will not
accept a dataview as a Reportsource -- The recommended
work-around is to assign...
|
by: Brian Bischof |
last post by:
I'm using a third-party tool that takes a DataTable as a parameter. I really
need to pass it a DataView instead. When I try to explicitly cast the
DataView as a DataTable I get an error that they...
|
by: TaeHo Yoo |
last post by:
Hi all,
After sorting and grouping data using a dataview, then how to transfer
the changed datatable in the dataview to a datatable in C#?
Cheers
|
by: Alpha |
last post by:
I have a window application. In one of the form, a datagrid has a dataview
as its datasource. Initial filtering result would give the datavew 3 items.
When I double click on the datagrid to edit...
|
by: kjvt |
last post by:
Based on a prior posting, I've written a function to convert a
recordset to a dataview. The first call to the function for a given
recordset works perfectly, but the second call always returns a...
|
by: Steve |
last post by:
I have a form with a dataset and a datagrid.
I created a dataview on this dataset.
When the user modifies the datagrid, I look up this record in the dataview
to make sure it is unique.
Here is...
|
by: David Wender |
last post by:
I want to create a dataview with a sort on multiple columns. However,
when I use FindRows, I only want to search some of the columns, not
all. Is this possible? I have not been able to make it...
|
by: James |
last post by:
Basically I have a DataGrid that I'm binding to the results of a stored
procedure call. The recordset is fairly small. Initially I'm creating a
DataSet from the results and binding it. There's a...
|
by: am72de |
last post by:
Hi all,
I have a problem with the DataTable.Reset().
After resetting the DataTable the count of the DataView is no longer
equal with the DataTable.Rows.Count, so the second Assert fails.
...
|
by: Ronald S. Cook |
last post by:
If I add a row to a DataView, will the row automatically be added to the
underlying DataTable? If so, I'm trying to understand why anyone would add
a row to a DataView when they may as well just...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
| |