Click here to Skip to main content
15,896,269 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: INHERITED FORM Pin
Greeky30-Mar-06 1:39
Greeky30-Mar-06 1:39 
Questionscan folder in visual basic 6.0 Pin
bony_baba30-Mar-06 0:21
bony_baba30-Mar-06 0:21 
AnswerRe: scan folder in visual basic 6.0 Pin
Joshua Quick30-Mar-06 13:57
Joshua Quick30-Mar-06 13:57 
Questionexport the dataset to excel using vb.net Pin
kewalkkhanna29-Mar-06 23:26
kewalkkhanna29-Mar-06 23:26 
AnswerRe: export the dataset to excel using vb.net Pin
RolandPheasant30-Mar-06 21:03
RolandPheasant30-Mar-06 21:03 
QuestionHow to take grand total on fields from database which has text as datatype Pin
Ash. R.29-Mar-06 22:06
Ash. R.29-Mar-06 22:06 
Questionexporting datagrid to excel in vb.net Pin
joshunleashed29-Mar-06 21:52
joshunleashed29-Mar-06 21:52 
AnswerRe: exporting datagrid to excel in vb.net Pin
albCode29-Mar-06 22:15
albCode29-Mar-06 22:15 
<%@ Import Namespace="System.Data.OleDb" %><br />
<%@ Import Namespace="System.Data" %><br />
<HTML><br />
<script language="VB" runat="server"><br />
Dim MyConnection As OleDbConnection<br />
Public Sub Page_Load(ByVal Sender As System.Object, ByVal E As System.EventArgs) Handles MyBase.Load<br />
  MyConnection = New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0; Data Source=" & Server.MapPath("database/utenti.mdb"))<br />
  BindGrid("id")<br />
End Sub<br />
<br />
Sub BindGrid(ByVal SortField As String)<br />
  Dim DS As DataSet<br />
  Dim MyCommand As OleDbDataAdapter<br />
  MyCommand = New OleDbDataAdapter("select * from utenti", MyConnection)<br />
  DS = New DataSet<br />
  MyCommand.Fill(DS, "utenti")<br />
  Dim Source As DataView = DS.Tables("utenti").DefaultView<br />
  Source.Sort = SortField<br />
  MyDataGrid.DataSource = Source<br />
  MyDataGrid.DataBind()<br />
End Sub<br />
<br />
Sub ToExcel(sender As Object, e As System.EventArgs)<br />
  Response.ContentType = "application/vnd.ms-excel"<br />
  Response.Charset = ""<br />
  Me.EnableViewState = False<br />
  Dim tw As New System.IO.StringWriter<br />
  Dim hw As New System.Web.UI.HtmlTextWriter(tw)<br />
  MyDataGrid.RenderControl(hw)<br />
  Response.Write(tw.ToString())<br />
  Response.End()<br />
End Sub<br />
</script><br />
<body><br />
<form runat="server" ID="Form1"><br />
<asp:Button id="Button1" runat="server" Text="Excel" OnClick="ToExcel"></asp:Button><br />
<br><br />
<br><br />
<ASP:DataGrid id="MyDataGrid" runat="server" Width="700px" BackColor="White" BorderColor="#CCCCCC"<br />
CellPadding="3" Font-Name="Verdana" Font-Size="8pt" HeaderStyle-BackColor="#aaaadd" BorderStyle="None"<br />
BorderWidth="1px" Font-Names="Verdana" EnableViewState="False"><br />
<ItemStyle ForeColor="#000066"></ItemStyle><br />
<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#006699"></HeaderStyle><br />
</ASP:DataGrid><BR><br />
</form><br />
</body><br />
</HTML>


_____________________

Proud to be Albanian
_____________________
GeneralRe: exporting datagrid to excel in vb.net Pin
Greeky29-Mar-06 23:25
Greeky29-Mar-06 23:25 
GeneralRe: exporting datagrid to excel in vb.net Pin
Dean_SF30-Mar-06 5:14
Dean_SF30-Mar-06 5:14 
QuestionDoes anybody know others IDE for write and debug vb code? (for replace VB6) Pin
CooperWu29-Mar-06 21:22
CooperWu29-Mar-06 21:22 
AnswerRe: Does anybody know others IDE for write and debug vb code? (for replace VB6) Pin
CooperWu30-Mar-06 19:36
CooperWu30-Mar-06 19:36 
Questionhelp: datareport in vb6 using 8.5 X 14 papaer size Pin
jherome29-Mar-06 21:03
jherome29-Mar-06 21:03 
Questionhow to toggle context menu Pin
wilde29-Mar-06 21:02
wilde29-Mar-06 21:02 
AnswerRe: how to toggle context menu Pin
Chatura Dilan30-Mar-06 16:18
Chatura Dilan30-Mar-06 16:18 
GeneralRe: thanks a lot(how to toggle context menu) Pin
wilde30-Mar-06 16:33
wilde30-Mar-06 16:33 
GeneralRe: thanks a lot(how to toggle context menu) Pin
Chatura Dilan30-Mar-06 16:58
Chatura Dilan30-Mar-06 16:58 
AnswerRe: ASP.net Projects Integeration. Pin
CWIZO29-Mar-06 21:00
CWIZO29-Mar-06 21:00 
Questionsent message Pin
vivayor kong29-Mar-06 20:20
vivayor kong29-Mar-06 20:20 
Questionvb.net 2005 Pin
vivayor kong29-Mar-06 19:51
vivayor kong29-Mar-06 19:51 
AnswerRe: vb.net 2005 Pin
J4amieC30-Mar-06 3:24
J4amieC30-Mar-06 3:24 
Questionrepeater Pin
manisahmuhamed29-Mar-06 17:06
manisahmuhamed29-Mar-06 17:06 
AnswerRe: repeater Pin
J4amieC30-Mar-06 3:23
J4amieC30-Mar-06 3:23 
Questioncombo box Pin
cupid_nex29-Mar-06 16:10
cupid_nex29-Mar-06 16:10 
AnswerRe: combo box Pin
Christian Graus29-Mar-06 17:24
protectorChristian Graus29-Mar-06 17:24 

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.