Visual Basic .NET » Smart Device Application
insert linklabel in datagridview -- priyapraveen --


Hi all,
i'm fresher to .net.i'm try to inseert a linklabel in cell in datagridview during the form load .can anyone help me with the code.

i have tried the following but it does not link the form whereas the form is loaded rather.
LinkLabel link = new LinkLabel();
frmadminedit edit = new frmadminedit();
edit.Show();

link.Text = "Update";
link.LinkVisited = true;

dgvadminuser.Rows
.Value =link.Text;

-- ParagYerawar --


hi try below code for link lable in grid..
'top of the code Friend WithEvents LnkCel As DataGridViewLinkCell
'''
'type this code where u r filling u r grid ..
LnkCel = New DataGridViewLinkCell
LnkCel.Value = "Cur.Ref."
.Item(iCol, iRow + 4) = LnkCel
'
''''''''''''''''''''''''''''''''''''''''''''''''''
above i written with events bcoz after u can write ur own events for that perticular link cell is still u r facing problem let me know...

-- ParagYerawar --


'top of the code Friend WithEvents LnkCel As DataGridViewLinkCell
'''
'type this code where u r filling u r grid ..
LnkCel = New DataGridViewLinkCell
LnkCel.Value = "Cur.Ref."
.Item(iCol, iRow + 4) = LnkCel
'
''''''''''''''''''''''''''''''''''''''''''''''''''
above i written with events bcoz after u can write ur own events for that perticular link cell is still u r facing problem let me know...

-- andyb --


Why do during form load rather than in your asp.net markup?

<asp:DataGrid>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkLabel />
</ItemTemplate>
</asp:TemplateField>
</asp:DataGrid>

[Submit Comment]Home