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 1090
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: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
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: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
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:
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: 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...
| |