Click here to Skip to main content
15,889,931 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Data grid! Pin
PandemoniumPasha19-Feb-07 21:47
PandemoniumPasha19-Feb-07 21:47 
AnswerRe: Data grid! Pin
NanaAM19-Feb-07 22:19
NanaAM19-Feb-07 22:19 
GeneralRe: Data grid! Pin
nclauder19-Feb-07 22:33
nclauder19-Feb-07 22:33 
GeneralRe: Data grid! Pin
NanaAM19-Feb-07 22:50
NanaAM19-Feb-07 22:50 
GeneralRe: Data grid! Pin
nclauder19-Feb-07 22:56
nclauder19-Feb-07 22:56 
GeneralRe: Data grid! Pin
NanaAM19-Feb-07 23:03
NanaAM19-Feb-07 23:03 
GeneralRe: Data grid! Pin
nclauder20-Feb-07 0:06
nclauder20-Feb-07 0:06 
GeneralRe: Data grid! Pin
PandemoniumPasha20-Feb-07 22:46
PandemoniumPasha20-Feb-07 22:46 
when you use data adapters you do not need to open or close the connection, it does it by itselt. if the connection was already open before calling the fill command in data-adapert, it will leave it open and if it was close, it will open it get the data and then close it.
the Fill() function will get the data; so, you do not need to call the ExecuteNonQuery()
command again.

you might try the following:

private void BindDataGrid()
{
SqlCommand myCommand=new SqlCommand("SELECT * from Billing",con);
SqlDataAdapter myAdapter=new SqlDataAdapter(myCommand);
DataSet ds=new DataSet();
myAdapter.Fill(ds);
dgbilling.DataSource=ds;
dgbilling.DataBind();
}

this should give the required result.
QuestionHow to delete rows that are checked in a datagrid / [modified] Pin
Arun Hegde19-Feb-07 19:54
Arun Hegde19-Feb-07 19:54 
AnswerRe: How to delete rows that are checked in a datagrid / Pin
PandemoniumPasha19-Feb-07 20:52
PandemoniumPasha19-Feb-07 20:52 
AnswerRe: How to delete rows that are checked in a datagrid / Pin
NanaAM19-Feb-07 22:32
NanaAM19-Feb-07 22:32 
QuestionDisplay Datagrid horizontally Pin
iamdking19-Feb-07 19:47
iamdking19-Feb-07 19:47 
AnswerRe: Display Datagrid horizontally Pin
Vsree19-Feb-07 20:46
Vsree19-Feb-07 20:46 
GeneralRe: Display Datagrid horizontally Pin
iamdking19-Feb-07 21:09
iamdking19-Feb-07 21:09 
GeneralRe: Display Datagrid horizontally Pin
luckyve19-Feb-07 22:34
luckyve19-Feb-07 22:34 
GeneralRe: Display Datagrid horizontally Pin
Vsree20-Feb-07 2:01
Vsree20-Feb-07 2:01 
QuestionCrystal Report Problem Pin
Kissy1619-Feb-07 18:33
Kissy1619-Feb-07 18:33 
AnswerRe: Crystal Report Problem Pin
Sylvester george19-Feb-07 19:36
Sylvester george19-Feb-07 19:36 
QuestionFire Fox Pin
Khan.Bangash19-Feb-07 18:22
Khan.Bangash19-Feb-07 18:22 
AnswerRe: Fire Fox Pin
Blue_Boy19-Feb-07 21:45
Blue_Boy19-Feb-07 21:45 
QuestionWindows .net(C#) Pin
Member 384492619-Feb-07 17:51
Member 384492619-Feb-07 17:51 
AnswerRe: Windows .net(C#) Pin
PandemoniumPasha19-Feb-07 21:00
PandemoniumPasha19-Feb-07 21:00 
Questionbarcode on crystal report Pin
Laxmikant Lad19-Feb-07 17:49
Laxmikant Lad19-Feb-07 17:49 
Questionhow to use Filter on Dataview string like te*xt% Pin
BalasahebK19-Feb-07 17:30
BalasahebK19-Feb-07 17:30 
AnswerRe: how to use Filter on Dataview string like te*xt% Pin
Sylvester george19-Feb-07 19:52
Sylvester george19-Feb-07 19:52 

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.