桔子皮SkinFMXItemGrid控件基本操作
作者:互联网
1 Self.WeihuFrame1.pcWeihu.Prop.ActivePageIndex :=1; 2 Self.WeihuFrame1.SkinFMXItemGrid1.Prop.Columns.Clear; 3 Self.WeihuFrame1.SkinFMXItemGrid2.Prop.Columns.Clear; 4 //首先生成[列] 5 for J:=0 to 6 do 6 begin 7 //配件信息表 8 sGridCol:=Self.WeihuFrame1.SkinFMXItemGrid2.Prop.Columns.Add; 9 sGridCol.Caption := aTitle1[J]; //此处给列表头标题赋值 10 sGridCol.Width := 70; 11 if (J=2) or (J=6) then sGridCol.Width :=(WeihuFrame1.SkinFMXPanel2.Width-350)/2-2; 12 sGridCol.BindItemFieldName:=aFName[J]; 13 //销售属性表 14 sGridCol:=Self.WeihuFrame1.SkinFMXItemGrid1.Prop.Columns.Add; 15 sGridCol.Caption := aTitle2[J]; //此处给列表头标题赋值 16 sGridCol.Width := 100; 17 sGridCol.BindItemFieldName:=aFName[J]; 18 end; 19 20 pSQL:= 'select * from csmscb' ; 21 OpenQuery(DataM.FireQuery1,pSQL); 22 DataM.FireQuery1.First; 23 while not DataM.FireQuery1.Eof do begin 24 sGridRow:=Self.WeihuFrame1.SkinFMXItemGrid2.Prop.Items.Add; 25 sGridRow.Caption:=DataM.FireQuery1.FieldByName('leibie').AsString; 26 sGridRow.Detail:=DataM.FireQuery1.FieldByName('bianhao').AsString; 27 sGridRow.Detail1:=DataM.FireQuery1.FieldByName('mingcheng').AsString; 28 sGridRow.Detail2:=DataM.FireQuery1.FieldByName('guige').AsString; 29 sGridRow.Detail3:=DataM.FireQuery1.FieldByName('jianshuliang').AsString; 30 sGridRow.Detail4:=DataM.FireQuery1.FieldByName('kucun').AsString; 31 sGridRow.Detail5:=DataM.FireQuery1.FieldByName('memo').AsString; 32 // sGridRow.Detail6:=IntToStr(DataM.FireQuery1.RecNo);// 序号 33 DataM.FireQuery1.Next; 34 end;
标签:DataM,控件,sGridRow,桔子皮,FireQuery1,sGridCol,基本操作,WeihuFrame1,FieldByName 来源: https://www.cnblogs.com/motomsc/p/14400842.html