|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Changing column order in typed datasetI create a typed dataset based upon a table, using the VS2005 designer. I
then add a query to the table adapter with a select statement, changing the order of some columns, and removing others. When I select preview data, I see the columns in the original order of the dataset, with the columns I removed now showing up as empty. This can't be by design, can it? And if so, how can I order the columns? Since I am using stored procedures, I can drop the select stored procedure in the TDS and the resulting column order is correct, but I am now using a different table adapter. Are there any other options? Thanks, David R David,
A strongly typed dataset is simple a class for yourself (your organisation) that is build by inheriting a DataSet. In that class are rules build in. In Net we have now 3 different ones for that: The Version 1.x which are the same for Web and windowforms The Versions 2.0 where the windowform and the webform have a different approach. In those classes are no options to relocate the columns at run time. In a non typed dataset (datatable) by the way is it as well a hell of a job to do what your ask. Because the column is only a description of the items used in the datatypes. Therefore do you have to copy the table, remove the columns from original and by looping insert the rows again with the new sequence of the columns. And than the only reason is to not use styles in datagrid, what is much simpler to do than all I wrote above. I hope this gives an idea, Cor Cor,
Thanks for the response. I decided to turn the autogenerate property of the datagridview to false, and add the columns manually, in the order I wanted. You mentioned that you have found the TDS to be implemented differently in NET 2.0 for Windows forms vs ASP.NET. Could you list some of the differences you have found? Thanks, -- Show quoteDavid R "Cor Ligthert [MVP]" wrote: > David, > > A strongly typed dataset is simple a class for yourself (your organisation) > that is build by inheriting a DataSet. In that class are rules build in. In > Net we have now 3 different ones for that: > The Version 1.x which are the same for Web and windowforms > The Versions 2.0 where the windowform and the webform have a different > approach. > > In those classes are no options to relocate the columns at run time. > > In a non typed dataset (datatable) by the way is it as well a hell of a job > to do what your ask. Because the column is only a description of the items > used in the datatypes. Therefore do you have to copy the table, remove the > columns from original and by looping insert the rows again with the new > sequence of the columns. > > And than the only reason is to not use styles in datagrid, what is much > simpler to do than all I wrote above. > > I hope this gives an idea, > > Cor > > > David,
> Would be the same as writing the differences between a Ford and a Boeing> Thanks for the response. I decided to turn the autogenerate property of > the > datagridview to false, and add the columns manually, in the order I > wanted. > > You mentioned that you have found the TDS to be implemented differently in > NET 2.0 for Windows forms vs ASP.NET. Could you list some of the > differences you have found? > I hope you don't mind that I don't do that. Cor No problem. I'll be seeing that soon enough, as the project that I am
developing has both Win forms and ASP.NET portions, all feeding from some of the same datasets. -- Show quoteDavid R "Cor Ligthert [MVP]" wrote: > David, > > > > Thanks for the response. I decided to turn the autogenerate property of > > the > > datagridview to false, and add the columns manually, in the order I > > wanted. > > > > You mentioned that you have found the TDS to be implemented differently in > > NET 2.0 for Windows forms vs ASP.NET. Could you list some of the > > differences you have found? > > > Would be the same as writing the differences between a Ford and a Boeing > > I hope you don't mind that I don't do that. > > Cor > > > Excuse me, what is TDS? What does that stand for? Forgive my emptiness,
please:) I looked up from some SQL Server related documentation, and I found a definition for TDS is 'Tabular Data Stream' protocol, although I'm not sure about it. How to use TDS in the .net programming then? Any replies would be appreciated! Show quote "David R" <Dav***@discussions.microsoft.com> wrote in message news:5A8A9903-3507-4C31-B939-2B8EA3969E90@microsoft.com... > Cor, > > Thanks for the response. I decided to turn the autogenerate property of > the > datagridview to false, and add the columns manually, in the order I > wanted. > > You mentioned that you have found the TDS to be implemented differently in > NET 2.0 for Windows forms vs ASP.NET. Could you list some of the > differences you have found? > > Thanks, > -- > David R > > > "Cor Ligthert [MVP]" wrote: > >> David, >> >> A strongly typed dataset is simple a class for yourself (your >> organisation) >> that is build by inheriting a DataSet. In that class are rules build in. >> In >> Net we have now 3 different ones for that: >> The Version 1.x which are the same for Web and windowforms >> The Versions 2.0 where the windowform and the webform have a different >> approach. >> >> In those classes are no options to relocate the columns at run time. >> >> In a non typed dataset (datatable) by the way is it as well a hell of a >> job >> to do what your ask. Because the column is only a description of the >> items >> used in the datatypes. Therefore do you have to copy the table, remove >> the >> columns from original and by looping insert the rows again with the new >> sequence of the columns. >> >> And than the only reason is to not use styles in datagrid, what is much >> simpler to do than all I wrote above. >> >> I hope this gives an idea, >> >> Cor >> >> >> No problem. TDS, as I use it, is short for Typed Data Set.
-- Show quoteDavid R "Laser Lu" wrote: > Excuse me, what is TDS? What does that stand for? Forgive my emptiness, > please:) > I looked up from some SQL Server related documentation, and I found a > definition for TDS is 'Tabular Data Stream' protocol, although I'm not sure > about it. > How to use TDS in the .net programming then? Any replies would be > appreciated! > > "David R" <Dav***@discussions.microsoft.com> wrote in message > news:5A8A9903-3507-4C31-B939-2B8EA3969E90@microsoft.com... > > Cor, > > > > Thanks for the response. I decided to turn the autogenerate property of > > the > > datagridview to false, and add the columns manually, in the order I > > wanted. > > > > You mentioned that you have found the TDS to be implemented differently in > > NET 2.0 for Windows forms vs ASP.NET. Could you list some of the > > differences you have found? > > > > Thanks, > > -- > > David R > > > > > > "Cor Ligthert [MVP]" wrote: > > > >> David, > >> > >> A strongly typed dataset is simple a class for yourself (your > >> organisation) > >> that is build by inheriting a DataSet. In that class are rules build in. > >> In > >> Net we have now 3 different ones for that: > >> The Version 1.x which are the same for Web and windowforms > >> The Versions 2.0 where the windowform and the webform have a different > >> approach. > >> > >> In those classes are no options to relocate the columns at run time. > >> > >> In a non typed dataset (datatable) by the way is it as well a hell of a > >> job > >> to do what your ask. Because the column is only a description of the > >> items > >> used in the datatypes. Therefore do you have to copy the table, remove > >> the > >> columns from original and by looping insert the rows again with the new > >> sequence of the columns. > >> > >> And than the only reason is to not use styles in datagrid, what is much > >> simpler to do than all I wrote above. > >> > >> I hope this gives an idea, > >> > >> Cor > >> > >> > >> > > > Thanks£¬I've got it.:)
Show quote "David R" <Dav***@discussions.microsoft.com> wrote in message news:3ED3B2B4-66DF-48F7-BD1A-4D3D3721BFF4@microsoft.com... > No problem. TDS, as I use it, is short for Typed Data Set. > -- > David R > > > "Laser Lu" wrote: > >> Excuse me, what is TDS? What does that stand for? Forgive my emptiness, >> please:) >> I looked up from some SQL Server related documentation, and I found a >> definition for TDS is 'Tabular Data Stream' protocol, although I'm not >> sure >> about it. >> How to use TDS in the .net programming then? Any replies would be >> appreciated! >> >> "David R" <Dav***@discussions.microsoft.com> wrote in message >> news:5A8A9903-3507-4C31-B939-2B8EA3969E90@microsoft.com... >> > Cor, >> > >> > Thanks for the response. I decided to turn the autogenerate property >> > of >> > the >> > datagridview to false, and add the columns manually, in the order I >> > wanted. >> > >> > You mentioned that you have found the TDS to be implemented differently >> > in >> > NET 2.0 for Windows forms vs ASP.NET. Could you list some of the >> > differences you have found? >> > >> > Thanks, >> > -- >> > David R >> > >> > >> > "Cor Ligthert [MVP]" wrote: >> > >> >> David, >> >> >> >> A strongly typed dataset is simple a class for yourself (your >> >> organisation) >> >> that is build by inheriting a DataSet. In that class are rules build >> >> in. >> >> In >> >> Net we have now 3 different ones for that: >> >> The Version 1.x which are the same for Web and windowforms >> >> The Versions 2.0 where the windowform and the webform have a different >> >> approach. >> >> >> >> In those classes are no options to relocate the columns at run time. >> >> >> >> In a non typed dataset (datatable) by the way is it as well a hell of >> >> a >> >> job >> >> to do what your ask. Because the column is only a description of the >> >> items >> >> used in the datatypes. Therefore do you have to copy the table, remove >> >> the >> >> columns from original and by looping insert the rows again with the >> >> new >> >> sequence of the columns. >> >> >> >> And than the only reason is to not use styles in datagrid, what is >> >> much >> >> simpler to do than all I wrote above. >> >> >> >> I hope this gives an idea, >> >> >> >> Cor >> >> >> >> >> >> >> >> >> |
|||||||||||||||||||||||