473,387 Members | 1,374 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,387 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 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

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...
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:
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...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
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...
0
Oralloy
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,...
0
jinu1996
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...

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.