Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Freddy #1
DataGrid Woes
I have a datagrid that I created and fill a dataset using a stored proc.
and bind it. The first column( a linkbutton button column) in the DG
contains a number, the second a name. When the user presses the button I
need the number displayed on the link. The number is a field from the
database. I got the code to trap the button press to work, but I cant get
the number displayed.. (vb.net)
Sub Gridclick( byval sender as object, byval e as datagridcommandeventargs)
handles datagrid1.ItemCommand
I've tried different variations of casting such as
CType(e.Item.Cells(0).Controls(0), ButtonColumn) or LinkButton and other
variations
I also tried to use the e.item.cell(0).text and other variations of the
e.item....
I CAN READ the NAME part of the row with e.item.cells(1).text.
WHAT GIVES..?
I tried many different commands till I am frustrated.
A code sample to read the first col link would be great.
Thank You
F
Freddy Guest
-
XML encoding woes
Hi there, i need to load xml files from a lot of different sources where the encoding varies from iso to utf 8 (not my data, so I cannot reformat... -
WSE 2 woes
I have created the Hello World web service and implemented WSE 2 tokens to validate against a database. I am using VS 2003 and installed the... -
PHP installation woes
Hi there, Could someone please give the low down on installing and configuring php on freebsd? I am running the 4.10 release as our development... -
PDF woes
EPS files are intended to be placed on a page in a page-layout program, and thus contain no page orientation or page size information. If you are... -
Font Woes
Sorry... not a regular member of this forum.... just cruising through, trying to decide whether to upgrade or not.... Anyway.... Description... -
Elton Wang #2
Re: DataGrid Woes
Hi Freddy,
If the linkbutton button is in the first column, following code should work:
Dim linkNumber As String = CType(e.Item.Cells(0).Controls(0),
LinkButton).Text
HTH
"Freddy" <fred@tim.com> wrote in message
news:uqqjv#HlFHA.3436@tk2msftngp13.phx.gbl...datagridcommandeventargs)> I have a datagrid that I created and fill a dataset using a stored proc.
> and bind it. The first column( a linkbutton button column) in the DG
> contains a number, the second a name. When the user presses the button I
> need the number displayed on the link. The number is a field from the
> database. I got the code to trap the button press to work, but I cant get
> the number displayed.. (vb.net)
>
> Sub Gridclick( byval sender as object, byval e as> handles datagrid1.ItemCommand
>
> I've tried different variations of casting such as
> CType(e.Item.Cells(0).Controls(0), ButtonColumn) or LinkButton and other
> variations
> I also tried to use the e.item.cell(0).text and other variations of the
> e.item....
> I CAN READ the NAME part of the row with e.item.cells(1).text.
> WHAT GIVES..?
> I tried many different commands till I am frustrated.
> A code sample to read the first col link would be great.
> Thank You
> F
>
>
>
Elton Wang Guest



Reply With Quote

