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

Q: DataView or DataTable

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
Nov 21 '05 #1
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

Nov 21 '05 #2
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

Nov 21 '05 #3
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


Nov 21 '05 #4
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


Nov 21 '05 #5
>
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
Nov 21 '05 #6
>
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
Nov 21 '05 #7

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

Similar topics

2
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...
3
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...
1
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
2
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...
36
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...
13
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...
5
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...
4
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...
2
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. ...
1
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...
1
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...
0
isladogs
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...
0
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...
0
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
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
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...
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...

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.