Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,673 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,179 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
post 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

Go to the top of the page

Jayman
post 16 Sep, 2008 - 09:13 AM
Post #2


Student of Life

Group Icon
Joined: 26 Dec, 2005
Posts: 6,839



Thanked 38 times

Dream Kudos: 500

Expert In: C#, VB.NET, Java

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

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/23/08 06:20AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month