string firstNameValue;
string lastNameValue;
int iCount,iCyc;
iCount = datagrid.items.count;
for (iCyc=0;iCyc<iCount;iCyc++)
{
System.web.ui.webcontrols.label lblName;
lblName = (System.web.ui.webcontrols.label)datagrid.items[iCyc].findControls
("lblDatagridName");
if (iCyc==0) firstNameValue = lblName.text;
if (iCyc==iCount-1) lastNameValue = lblName.text;
}我没有做过测试,这是凭感觉写的,你需要做测试的,估计查不多!
string lastNameValue;
int iCount,iCyc;
iCount = datagrid.items.count;
for (iCyc=0;iCyc<iCount;iCyc++)
{
System.web.ui.webcontrols.label lblName;
lblName = (System.web.ui.webcontrols.label)datagrid.items[iCyc].findControls
("lblDatagridName");
if (iCyc==0) firstNameValue = lblName.text;
if (iCyc==iCount-1) lastNameValue = lblName.text;
}我没有做过测试,这是凭感觉写的,你需要做测试的,估计查不多!
datagrid.items(0).cells(x).text
datagrid.items(datagrid.items.count).cells(x).text
datagrid.items(0).cells("name").text
最后一条:
datagrid.items(datagrid.items.count).cells("name").text就是它