HOW to use commandargument in data

xiaoxiao2021-03-06  78

Commandargument = '<% # databinder.eval (container.DataItem, "Title_ID")%>' />

This Primary Key Field Information Could The Be Extracted in The Itemmand Event Handler, Which Would Look Like

Sub DGTIS_ItemCommad (Sender As Object, E AS DataGridCommandeventArgs)

If E.CommandName = "SELECT" THEN

'The details button has been clicked, Find Out the PK Field Value

DIM STRTITLEID AS STRING = E.commandargument

'Display the Book's Details

DGbookDetails.DataSource = getBookDetails (StrtitleID)

DGBOOKDETAILS.DATABIND ()

'Make Sure The DGbookDetails DataGrid Is Visible

DGBOOKDETAILS.VISIBLE = TRUE

END IF

End Sub

转载请注明原文地址:https://www.9cbs.com/read-107618.html

New Post(0)