Click here to Skip to main content
16,005,241 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Qucik Record Count From DataSource Pin
Sathesh Sakthivel6-Jul-07 1:41
Sathesh Sakthivel6-Jul-07 1:41 
Questiondates in datagrid.........., Pin
HemMagesh6-Jul-07 1:23
HemMagesh6-Jul-07 1:23 
AnswerRe: dates in datagrid.........., Pin
InsDev6-Jul-07 1:53
InsDev6-Jul-07 1:53 
QuestionDatagrid bound column value in datagrid textbox..(I hope this time i will get..) [modified] Pin
Member 38798816-Jul-07 1:12
Member 38798816-Jul-07 1:12 
AnswerRe: I hope this time i will get........., Pin
Sathesh Sakthivel6-Jul-07 1:21
Sathesh Sakthivel6-Jul-07 1:21 
AnswerRe: Datagrid bound column value in datagrid textbox..(I hope this time i will get..) Pin
InsDev6-Jul-07 1:36
InsDev6-Jul-07 1:36 
GeneralRe: Datagrid bound column value in datagrid textbox..(I hope this time i will get..) Pin
Member 38798816-Jul-07 1:55
Member 38798816-Jul-07 1:55 
QuestionError in dgresult.rows Pin
n_gchaitra6-Jul-07 1:07
n_gchaitra6-Jul-07 1:07 
I am using the following code to export data from datagrid to excel. but I am geting the error in dgresult.rows which says. what is the reason for this.
Error 20 'rows' is not a member of 'System.Web.UI.WebControls.DataGrid'

Private Sub ExportGridToExcel()
Dim Excel As Object = CreateObject("Excel.Application")

If Excel Is Nothing Then
MsgBox("Excel is not installed on this machine. This operation requires MS Excel to be installed on this machine.", MsgBoxStyle.Critical)
Return
End If

'Make Excel visible
Excel.Visible = True

'Initialize Excel Sheet
With Excel
.SheetsInNewWorkbook = 1
.Workbooks.Add()
.Worksheets(1).Select()


'Add header row to Excel Sheet by copying column headers from the Datagrid

Dim Col As DataGridViewColumn
Dim i As Integer = 1
For Each Col In dgresult.Columns
.Cells(1, i).Value = Col.HeaderText
i += 1
Next

'Add data to excel sheet by looping through the rows in the datagrid

i = 2
Dim RowItem As DataGridViewRow
Dim Cell As DataGridViewCell
For Each RowItem In dgresult.rows
Dim j As Integer = 1
For Each Cell In RowItem.Cells
.Cells(i, j).Value = Cell.Value
j += 1
Next
i += 1
Next
End With

Excel.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComObject(Excel)
Excel = Nothing
MsgBox("Export to Excel Complete", MsgBoxStyle.Information)
End Sub





Chaitra N

AnswerRe: Error in dgresult.rows Pin
kubben6-Jul-07 2:02
kubben6-Jul-07 2:02 
QuestionInitializeCulture()': no suitable method found to override : only problem with master page Pin
srinandan..6-Jul-07 1:03
srinandan..6-Jul-07 1:03 
Questionrating. Pin
suparichit6-Jul-07 0:54
suparichit6-Jul-07 0:54 
AnswerRe: rating. Pin
Sathesh Sakthivel6-Jul-07 0:56
Sathesh Sakthivel6-Jul-07 0:56 
GeneralRe: rating. Pin
Christian Graus6-Jul-07 1:01
protectorChristian Graus6-Jul-07 1:01 
GeneralRe: rating. Pin
Sathesh Sakthivel6-Jul-07 1:08
Sathesh Sakthivel6-Jul-07 1:08 
AnswerRe: rating. Pin
Christian Graus6-Jul-07 1:00
protectorChristian Graus6-Jul-07 1:00 
GeneralRe: rating. Pin
suparichit6-Jul-07 1:41
suparichit6-Jul-07 1:41 
GeneralRe: rating. Pin
Sathesh Sakthivel6-Jul-07 1:45
Sathesh Sakthivel6-Jul-07 1:45 
GeneralRe: rating. Pin
suparichit6-Jul-07 2:07
suparichit6-Jul-07 2:07 
Questionhow to retrive file from database Pin
suparichit6-Jul-07 0:52
suparichit6-Jul-07 0:52 
AnswerRe: how to retrive file from database Pin
Sathesh Sakthivel6-Jul-07 0:55
Sathesh Sakthivel6-Jul-07 0:55 
AnswerRe: how to retrive file from database Pin
Tarik Guney6-Jul-07 5:20
Tarik Guney6-Jul-07 5:20 
QuestionCreate a custom control(dropdownlist populating Datagrid or Table of records) Pin
Jai Prakash Singh6-Jul-07 0:42
Jai Prakash Singh6-Jul-07 0:42 
AnswerRe: Create a custom control(dropdownlist populating Datagrid or Table of records) Pin
Parwej Ahamad6-Jul-07 0:50
professionalParwej Ahamad6-Jul-07 0:50 
GeneralRe: Create a custom control(dropdownlist populating Datagrid or Table of records) Pin
Jai Prakash Singh6-Jul-07 1:55
Jai Prakash Singh6-Jul-07 1:55 
GeneralRe: Create a custom control(dropdownlist populating Datagrid or Table of records) Pin
Parwej Ahamad9-Jul-07 0:53
professionalParwej Ahamad9-Jul-07 0:53 

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.