Another confusion of DataGrid

xiaoxiao2021-03-06  145

These days are busy doing a platform, once again used DataGrid, but this time I have high requirements, I want to display any of the Dynamic tables it displayed (query results) display On the same leaf. Of course, you can edit the various items of the detailed information displayed. Below is the original code when the button is shocked by the SELECT.

DataGrid1.SelectedIndex = e.Item.ItemIndex 'leaf surfaces value 0 ~ pagesize-1 Dim itemIndex As Integer itemIndex = DataGrid1.SelectedIndex DataGrid1.CurrentPageIndex * DataGrid1.PageSize' take in the current data datagrid index If itemIndex <0 Then ITEMINDEX = 0 end if if E.commandname.tolower = "SELECT" THEN DIM TA AS DATATABLE TA = getmember () 'Binding Data getmember () is an Item I defined from the database to meet the condition of the condition

If not isdbnull (TA.ROWS (ITEMINDEX)) Then displays the details of any day record you want to see Index.Text = CSTR (TA.ROWS (ITEMINDEX)) Endiff

IF not isdbnull ("UserID") ")") "" UserID ") End if if not isdbnull (TA.ROWS (ItemIndex) (" Password) ")) The password.text = cstr (TA.ROWS (ItemIndex)) End if if not isdbnull (TA.ROWS (ITEMINDEX) (" Country ")) Then Country.Text = CSTR (ta.rows ("Country")) end if if not isdbnull (TA.ROWS (ITEMINDEX)) Then Address.text = CSTR (TA.ROWS (ITEMINDEX)) End ififf ISDBNULL (TA.ROWS (ItemIndex)) "))") ")) End if if not isdbnull (TA.ROWS (ItemIndex) (" TEL1 ") ) Tel1.Text = CSTR (TA.ROWS (ItemIndex)) end if if not isdbnull (TA.ROWS (ItemIndex)) Tel2.Text = CSTR (TA.ROWS (ItemIndex ("tel2")) End IF if not isdbnull ("Mobile") ")") "))")) End if if not isdbnull (ta.rows (itemindex) ("ir dx) (" ipil ") Email ")) THEN Email.Text = CSTR (TA.ROWS (ItemIndex)) End if if not isdbnull (" Contract_Person ") The Contracter.Text = CSTR (TA. Rows (itemindex) ("Contact_Person")) End if if not isdbnull (TA.ROWS (ItemIndex) ("Website"

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

New Post(0)