Welcome to Dream.In.Code
Become an Expert!

Join 150,199 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,989 people online right now. Registration is fast and FREE... Join Now!




grid view

 
Reply to this topicStart new topic

grid view, it should retrive data from oracle database

kumaraba
16 Sep, 2008 - 05:39 AM
Post #1

New D.I.C Head
*

Joined: 16 Sep, 2008
Posts: 1

csharp

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace CourierMgmt
{
public partial class WebForm2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//string str = "select consignmentno,t_add,t_ph,t_pin,status,prasent from aba";
//DataSet ds = DataManager.GeneralDataSet(str, "aba");
//GridView1.DataSource = ds.Tables[0];
//GridView1.DataBind();


}



protected void GridView1_SelectedIndexChanged1(object sender, EventArgs e)
{
string str = "select consignmentno,t_add,t_ph,t_pin,status,prasent from aba";
DataSet ds = DataManager.GeneralDataSet(str, "aba");
GridView1.DataSource = ds.Tables[0];

//string strSQL = "select consignmentno,t_add,t_ph,t_pin,status,prasent from aba";
//string TableName = "aba";





}
}
}



It is not showing any error but it did not dispaly anything please do needfull, i am a begineer

Mod Edit: Please use code tags when posting your code. Code tags are used like so => code.gif

Thanks,
PsychoCoder smile.gif
User is offlineProfile CardPM
+Quote Post

Jayman
RE: Grid View
16 Sep, 2008 - 09:13 AM
Post #2

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,319



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
You need to DataBind the GridView to the datasource.

CODE

            DataSet ds = DataManager.GeneralDataSet(str, "aba");
            GridView1.DataSource = ds.Tables[0];
            GridView1.DataBind();

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 04:54AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month