I am creating a table object inside a dataset and attaching that to the
datagrid.
DataGrid1.DataSource = myDataset.Tables("myTable")
DataGrid1.DataBind()
Is there anyway before I bind the data to the grid can I sort the data
defining a column.
Like order by criteria in SQL.
Thanks,
Smith 7 1270
dim dv as DataView = myDataSet.Tables("myTable")
dv.Sort = "MyColumn ASC"
DataGrid1.DataSource = dv
DataGrid1.DataBind()
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/
"Smith John" <Jo*********@hotmail.com> wrote in message
news:O5**************@TK2MSFTNGP15.phx.gbl... I am creating a table object inside a dataset and attaching that to the
datagrid. DataGrid1.DataSource = myDataset.Tables("myTable")
DataGrid1.DataBind() Is there anyway before I bind the data to the grid can I sort the data defining a column.
Like order by criteria in SQL.
Thanks,
Smith
Thank you Karl for the soultion.
This step involves converting the data to dataview which involves few CPU
cycles.
Before implementing this I want to make sure there is no other method which
is build in the dataset or dataset table is available.
Thanks,
Smith
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uu**************@TK2MSFTNGP12.phx.gbl... dim dv as DataView = myDataSet.Tables("myTable") dv.Sort = "MyColumn ASC" DataGrid1.DataSource = dv DataGrid1.DataBind()
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/
"Smith John" <Jo*********@hotmail.com> wrote in message news:O5**************@TK2MSFTNGP15.phx.gbl... I am creating a table object inside a dataset and attaching that to the
datagrid. DataGrid1.DataSource = myDataset.Tables("myTable")
DataGrid1.DataBind() Is there anyway before I bind the data to the grid can I sort the data defining a column.
Like order by criteria in SQL.
Thanks,
Smith
I have set Option Explicit On
I am getting the error for the below line.
dim dv as DataView = myDataSet.Tables("myTable")
I am using .Net Framework 1.1.
Please advice.
Thanks
Smith
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uu**************@TK2MSFTNGP12.phx.gbl... dim dv as DataView = myDataSet.Tables("myTable") dv.Sort = "MyColumn ASC" DataGrid1.DataSource = dv DataGrid1.DataBind()
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/
"Smith John" <Jo*********@hotmail.com> wrote in message news:O5**************@TK2MSFTNGP15.phx.gbl... I am creating a table object inside a dataset and attaching that to the
datagrid. DataGrid1.DataSource = myDataset.Tables("myTable")
DataGrid1.DataBind() Is there anyway before I bind the data to the grid can I sort the data defining a column.
Like order by criteria in SQL.
Thanks,
Smith
Oopss...
dim dv as dataview = myDataSet.TAbles("myTable").DefaultView
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/
"Smith John" <Jo*********@hotmail.com> wrote in message
news:OE**************@TK2MSFTNGP15.phx.gbl... I have set Option Explicit On I am getting the error for the below line. dim dv as DataView = myDataSet.Tables("myTable")
I am using .Net Framework 1.1. Please advice. Thanks Smith
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in message news:uu**************@TK2MSFTNGP12.phx.gbl... dim dv as DataView = myDataSet.Tables("myTable") dv.Sort = "MyColumn ASC" DataGrid1.DataSource = dv DataGrid1.DataBind()
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/
"Smith John" <Jo*********@hotmail.com> wrote in message news:O5**************@TK2MSFTNGP15.phx.gbl... I am creating a table object inside a dataset and attaching that to
the datagrid. DataGrid1.DataSource = myDataset.Tables("myTable")
DataGrid1.DataBind() Is there anyway before I bind the data to the grid can I sort the data defining a column.
Like order by criteria in SQL.
Thanks,
Smith
heh..cpu cycles....those couple milliseconds will really come back to haunt
you....well, rest assured, when you do XXXXX.DataSource = DataSet/DataTable,
it automatically fetches the DefaultView from those (ie, you are always
binding to a DataView), so there is no performance penalty. Frankly, you
want things to be ordered but don't expect to spend any cpu cycles doing it?
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/
"Smith John" <Jo*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl... Thank you Karl for the soultion. This step involves converting the data to dataview which involves few CPU cycles. Before implementing this I want to make sure there is no other method
which is build in the dataset or dataset table is available. Thanks, Smith
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in message news:uu**************@TK2MSFTNGP12.phx.gbl... dim dv as DataView = myDataSet.Tables("myTable") dv.Sort = "MyColumn ASC" DataGrid1.DataSource = dv DataGrid1.DataBind()
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/
"Smith John" <Jo*********@hotmail.com> wrote in message news:O5**************@TK2MSFTNGP15.phx.gbl... I am creating a table object inside a dataset and attaching that to
the datagrid. DataGrid1.DataSource = myDataset.Tables("myTable")
DataGrid1.DataBind() Is there anyway before I bind the data to the grid can I sort the data defining a column.
Like order by criteria in SQL.
Thanks,
Smith
Karl,
Thanks for the answer.
Smith
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:#I**************@TK2MSFTNGP10.phx.gbl... heh..cpu cycles....those couple milliseconds will really come back to
haunt you....well, rest assured, when you do XXXXX.DataSource =
DataSet/DataTable, it automatically fetches the DefaultView from those (ie, you are always binding to a DataView), so there is no performance penalty. Frankly, you want things to be ordered but don't expect to spend any cpu cycles doing
it? Karl
-- MY ASP.Net tutorials http://www.openmymind.net/
"Smith John" <Jo*********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl... Thank you Karl for the soultion. This step involves converting the data to dataview which involves few
CPU cycles. Before implementing this I want to make sure there is no other method which is build in the dataset or dataset table is available. Thanks, Smith
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in message news:uu**************@TK2MSFTNGP12.phx.gbl... dim dv as DataView = myDataSet.Tables("myTable") dv.Sort = "MyColumn ASC" DataGrid1.DataSource = dv DataGrid1.DataBind()
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/
"Smith John" <Jo*********@hotmail.com> wrote in message news:O5**************@TK2MSFTNGP15.phx.gbl... > I am creating a table object inside a dataset and attaching that to the > > datagrid. > > > > DataGrid1.DataSource = myDataset.Tables("myTable") > > DataGrid1.DataBind() > > > > Is there anyway before I bind the data to the grid can I sort the
data > defining a column. > > Like order by criteria in SQL. > > Thanks, > > Smith > >
Karl,
This worked well for me.
Thanks.
Smith
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:ei**************@TK2MSFTNGP09.phx.gbl... Oopss...
dim dv as dataview = myDataSet.TAbles("myTable").DefaultView
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/
"Smith John" <Jo*********@hotmail.com> wrote in message news:OE**************@TK2MSFTNGP15.phx.gbl... I have set Option Explicit On I am getting the error for the below line. dim dv as DataView = myDataSet.Tables("myTable")
I am using .Net Framework 1.1. Please advice. Thanks Smith
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in message news:uu**************@TK2MSFTNGP12.phx.gbl... dim dv as DataView = myDataSet.Tables("myTable") dv.Sort = "MyColumn ASC" DataGrid1.DataSource = dv DataGrid1.DataBind()
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/
"Smith John" <Jo*********@hotmail.com> wrote in message news:O5**************@TK2MSFTNGP15.phx.gbl... > I am creating a table object inside a dataset and attaching that to the > > datagrid. > > > > DataGrid1.DataSource = myDataset.Tables("myTable") > > DataGrid1.DataBind() > > > > Is there anyway before I bind the data to the grid can I sort the
data > defining a column. > > Like order by criteria in SQL. > > Thanks, > > Smith > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: M Wells |
last post by:
Hi all,
Just wondering if anyone can tell me if an order by clause on a select
query would have any impact on the time it takes to retrieve results?
Essentially I'm selecting Top 1 out of a...
|
by: Blake Caraway |
last post by:
All,
I've seen several posts regarding using UNION or UNION ALL to mash
together two or more resultsets into a single result set, but can't
seem to find enough info here to help me answer my...
|
by: JJ_377 |
last post by:
Can someone tell me why SQL seems to ignore my order by clause?
I tried to run through the debugger, but the debugger stops at the
select statement line and then returns the result set; so, I have...
|
by: mailar |
last post by:
Hi,
Can I use ORDER BY clause in my sql UDF that returns a table and has
the folloing body. (trial_udf.sql)
drop function aa@
create function aa()
returns TABLE(empno varchar(20))
language...
|
by: Jozef |
last post by:
Hello,
Does anyone here know for sure, when you do a For Each loop on a forms
controls collection, does Access cycle through them in Alphabetical order or
control ID or ???.
Any ideas?
...
|
by: GreatAlterEgo |
last post by:
Hi,
This is my query which is embedded in a COBOL program.
EXEC SQL
SELECT DATE, AGE, DURATION, AMT
INTO :LDATE, :L.AGE, :L.DURATION, :L.AMT
FROM TAB1
WHERE CODE = :KEY.CODE
AND...
|
by: Beowulf |
last post by:
I have the view below and if I use vwRouteReference as the rowsource
for a combo box in an MS Access form or run "SELECT * FROM
vwRouteReference" in SQL Query Analyzer, the rows don't come through...
|
by: mandible |
last post by:
Hello I'm trying to have some control on how my data is ordered
depending on an input parameter
my question is
in a stored procedure how can I do something like this at the end of my...
|
by: Yobbo |
last post by:
Hi All
My query is as follows:
SELECT STRINGTEXT, TOKENID
FROM WEBSTRINGS
WHERE TOKENID IN (6,20,234,19,32,4,800,177)
All I want is my resultset to come back in the order that I have...
|
by: 28490 |
last post by:
Hi,
In 10.2 when a query is run with GROUP BY it does not order the output by the grouped columns. In
earlier versions the output was always sorted by the the grouped columns even though there...
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |