Click here to Skip to main content
15,895,557 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionvb.net 3003 draw tool Pin
yorickthefirst15-Feb-06 23:43
yorickthefirst15-Feb-06 23:43 
AnswerRe: vb.net 3003 draw tool Pin
Dave Kreskowiak16-Feb-06 1:30
mveDave Kreskowiak16-Feb-06 1:30 
QuestionHow to get path to the CD drive Pin
Chatura Dilan15-Feb-06 23:17
Chatura Dilan15-Feb-06 23:17 
AnswerRe: How to get path to the CD drive Pin
alien viper15-Feb-06 23:42
alien viper15-Feb-06 23:42 
GeneralRe: How to get path to the CD drive Pin
Chatura Dilan16-Feb-06 15:33
Chatura Dilan16-Feb-06 15:33 
GeneralRe: How to get path to the CD drive Pin
alien viper16-Feb-06 16:14
alien viper16-Feb-06 16:14 
QuestionCrystal Reports Pin
microuser_200015-Feb-06 22:29
microuser_200015-Feb-06 22:29 
QuestionDatagrid > DataTable > Excel Pin
RichardBerry15-Feb-06 22:02
RichardBerry15-Feb-06 22:02 
Hi
I have a form with 7 Datagrids. I populate DataTables from a database. I create a Dataview of the tables, and apply various filters based on user selections. I then use the DataVeiw as the Datagrid DataSource. I have also used Tablestyles to give the Datagrid Columns 'Readable' columnnames, and have adjusted the width of certain columns and set the columnwidth to 0 on some columns in order to hide them. This all works great.

Now I want to add the option to Export what displayed by the datgrids to Excel.
This is easy with a Datatable, since I can use the Column Names as headings, and then use a loop
For Each Col as Datacoumn in dtMyTable.Columns<br />
<br />
   For each Row as datarow in dtMyTable.Rows<br />
     cells(Row,Col) = ...<br />
   Next 'Row<br />
<br />
Next 'Col


I'm battling to get the datagrid back into a table format - and cannot Ctype(Datagrid, DataTable) directly.

Any ideas how I can do this. (I'd like to be able to use the column headings and column widths of the datagrid to format the Excel sheet)

Thanx

Richard
AnswerRe: Datagrid > DataTable > Excel Pin
KreativeKai17-Feb-06 4:08
professionalKreativeKai17-Feb-06 4:08 
AnswerRe: Datagrid > DataTable > Excel Pin
Dean_SF17-Feb-06 7:44
Dean_SF17-Feb-06 7:44 
GeneralRe: Datagrid > DataTable > Excel Pin
RichardBerry21-Feb-06 3:35
RichardBerry21-Feb-06 3:35 
GeneralRe: Datagrid > DataTable > Excel Pin
Dean_SF21-Feb-06 4:13
Dean_SF21-Feb-06 4:13 
Questionproduct security Pin
brindhavijay15-Feb-06 19:49
brindhavijay15-Feb-06 19:49 
AnswerRe: product security Pin
Joshua Quick15-Feb-06 20:56
Joshua Quick15-Feb-06 20:56 
Questioncan't find keycodeV.dll Pin
shekhar8115-Feb-06 19:47
shekhar8115-Feb-06 19:47 
AnswerRe: can't find keycodeV.dll Pin
nguyenvhn15-Feb-06 20:35
nguyenvhn15-Feb-06 20:35 
AnswerRe: can't find keycodeV.dll Pin
Rana Muhammad Javed Khan15-Feb-06 21:38
Rana Muhammad Javed Khan15-Feb-06 21:38 
AnswerRe: can't find keycodeV.dll Pin
KreativeKai16-Feb-06 5:04
professionalKreativeKai16-Feb-06 5:04 
AnswerRe: can't find keycodeV.dll Pin
malharone16-Feb-06 7:28
malharone16-Feb-06 7:28 
QuestionKeeping Exe On Server and Placing Short Cut on Clients Pin
Rana Muhammad Javed Khan15-Feb-06 19:41
Rana Muhammad Javed Khan15-Feb-06 19:41 
AnswerRe: Keeping Exe On Server and Placing Short Cut on Clients Pin
Joshua Quick15-Feb-06 20:46
Joshua Quick15-Feb-06 20:46 
AnswerRe: Keeping Exe On Server and Placing Short Cut on Clients Pin
Dave Kreskowiak16-Feb-06 1:25
mveDave Kreskowiak16-Feb-06 1:25 
AnswerRe: Keeping Exe On Server and Placing Short Cut on Clients Pin
KreativeKai16-Feb-06 2:31
professionalKreativeKai16-Feb-06 2:31 
QuestionHow to implement Delay? Pin
Rajesh R Subramanian15-Feb-06 19:08
professionalRajesh R Subramanian15-Feb-06 19:08 
AnswerRe: How to implement Delay? Pin
alien viper15-Feb-06 19:47
alien viper15-Feb-06 19:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.