LinkLabel

G

Guest

i'm using windowsApplication to connect to DB made by SQL
i need to Display the Data of the first table in the DB as links when click
it it openes a table
and i navigte between them using buttons

my problem is that i need to make the retrieved data as links (similar to
objectList in Mobile application)
i used LinkLabel to make an array of LinkLabels
for (int n=0 ; i<j ; i++)
{
this.linkLabel[n] = new System.Windows.Forms.LinkLabel();
linkLabel[n].Text = DSFucalities.Tables[0].Rows[n].ToString();
this.linkLabel[n].Name = "linkLabel"+i;
this.p2.Controls.Add(this.linkLabel[n]);
this.linkLabel[n].Location = new System.Drawing.Point(xLLabel,yLLabel);
yLLabel+=40;
}

but the panel was empty !!

when i tried to make it only for one label

this.linkLabel = new System.Windows.Forms.LinkLabel();
linkLabel.Text =DSFucalities.Tables[0].Rows[0].ToString();
this.linkLabel.Location = new System.Drawing.Point(30,30);
this.p2.Controls.Add(this.linkLabel);

the output was
System.Data.DataRow

not the text in the Table Of DataBase

a second thing does this way work when i click on the Link Label
i need to go to other form which contains some information Depending of the
LinkLabel that has been clicked , i mean according to the choosen LinkLabel i
need to know for example the no. of that item then select some Data From the
DataBase
is it possible to handle this
 
G

Guest

Problem appears that you have not specified the field.
DSFucalities.Tables[0].Rows[0][0].ToString() should work!
-Praveen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top