Click here to Skip to main content
15,905,322 members
Home / Discussions / C#
   

C#

 
QuestionDateTime comparision Pin
_tasleem7-Jul-06 15:05
_tasleem7-Jul-06 15:05 
AnswerRe: DateTime comparision Pin
Ashwani Mahotra7-Jul-06 19:05
Ashwani Mahotra7-Jul-06 19:05 
GeneralRe: DateTime comparision Pin
_tasleem8-Jul-06 1:41
_tasleem8-Jul-06 1:41 
AnswerWrite a stored procedure Pin
Ennis Ray Lynch, Jr.7-Jul-06 20:57
Ennis Ray Lynch, Jr.7-Jul-06 20:57 
GeneralRe: Write a stored procedure Pin
Paul Conrad7-Jul-06 21:24
professionalPaul Conrad7-Jul-06 21:24 
QuestionGet Mouse Message [modified] Pin
İsmail Durmaz7-Jul-06 14:43
İsmail Durmaz7-Jul-06 14:43 
AnswerRe: Get Mouse Message Pin
Stefan Troschuetz7-Jul-06 22:03
Stefan Troschuetz7-Jul-06 22:03 
QuestionRead data from datagrid Pin
ujupanmester7-Jul-06 13:37
ujupanmester7-Jul-06 13:37 
Hy,

I have a problemns. I want to read data from datagrid, but i have few problemns, that i can't.

Let me explain:

Datagrid looks : <asp:datagrid id="dgcam" style="Z-INDEX: 104; LEFT: 856px; POSITION: absolute; TOP: 288px" runat="server"
="" cellpadding="0" gridlines="None" showheader="False">

Function how fill this grid is:

private void cam()
{
string conn = ConfigurationSettings.AppSettings["conn"];
SqlConnection objConnection = new SqlConnection(conn);

DataSet ds = new DataSet();

string user = "select utilizator from furnizori where id_client =" + lbluser.Text;
string listcamion = "select count(id_camion) from add_camion join furnizori on (add_camion.id_user = furnizori.id_client)where id_user=" + lbluser.Text;
SqlDataAdapter da = new SqlDataAdapter(listcamion,conn);
da.Fill(ds, "add_camion");
da.Fill(ds, "furnizori");

dgcam.DataSource = ds;
dgcam.DataMember = "add_camion";
dgcam.DataBind();

try
{
objConnection.Open();
}
finally
{
if(objConnection.State == ConnectionState.Open)
{
objConnection.Close();
}
}


In Page Load i have this code, where i had problemns:

if(dgcam.Items != null)
{
listcamionuser();
}
else
{
lblmesaj.Text = "Nu aveti adaugat nici un camion in baza de date";
}

Here i have problemns because i try to read data from grid. In grid count function works very good. In my page load i try to read grid who i fill this function cam(). This i don't knows how to put the cod(function is if(dgcam.Itemns != null) )

Pls help me.

Thanks for all
Questioncode Form within a code Form Pin
Glen Harvy7-Jul-06 12:55
Glen Harvy7-Jul-06 12:55 
AnswerRe: code Form within a code Form Pin
Not Active7-Jul-06 13:31
mentorNot Active7-Jul-06 13:31 
AnswerRe: code Form within a code Form Pin
Robert Rohde8-Jul-06 12:27
Robert Rohde8-Jul-06 12:27 
GeneralRe: code Form within a code Form Pin
Glen Harvy8-Jul-06 16:30
Glen Harvy8-Jul-06 16:30 
QuestionHow to catch a security exception within Remoting.Config(...) Pin
2bee 7-Jul-06 11:17
2bee 7-Jul-06 11:17 
AnswerLook at the stack trace in the exception? Pin
Ennis Ray Lynch, Jr.7-Jul-06 11:24
Ennis Ray Lynch, Jr.7-Jul-06 11:24 
GeneralRe: Look at the stack trace in the exception? [modified] Pin
2bee 7-Jul-06 11:36
2bee 7-Jul-06 11:36 
GeneralThe app config file you posted isn't valid Pin
Ennis Ray Lynch, Jr.7-Jul-06 11:58
Ennis Ray Lynch, Jr.7-Jul-06 11:58 
GeneralRe: The app config file you posted isn't valid Pin
2bee 7-Jul-06 13:04
2bee 7-Jul-06 13:04 
QuestionHow to change the toolbar background color? Pin
Rogenator7-Jul-06 9:17
Rogenator7-Jul-06 9:17 
QuestionPassing variable Pin
Chris McGlothen7-Jul-06 8:23
Chris McGlothen7-Jul-06 8:23 
AnswerRe: Passing variable Pin
Ennis Ray Lynch, Jr.7-Jul-06 8:52
Ennis Ray Lynch, Jr.7-Jul-06 8:52 
GeneralRe: Passing variable Pin
Chris McGlothen7-Jul-06 11:16
Chris McGlothen7-Jul-06 11:16 
AnswerRe: Passing variable Pin
Guffa7-Jul-06 10:59
Guffa7-Jul-06 10:59 
GeneralRe: Passing variable Pin
Chris McGlothen7-Jul-06 11:19
Chris McGlothen7-Jul-06 11:19 
QuestionSent SMTP message via Resent-To headers Pin
mube.co.uk7-Jul-06 7:39
mube.co.uk7-Jul-06 7:39 
QuestionNo update of ListBox after DataSourceChanged Pin
Csharper20067-Jul-06 7:14
Csharper20067-Jul-06 7:14 

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.