国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

.Net語言Smobiler開發利用Gridview控件設計較復雜的表單

2024-07-10 12:46:38
字體:
來源:轉載
供稿:網友

最前面的話:Smobiler是一個在VS環境中使用.Net語言來開發APP的開發平臺,也許比Xamarin更方便。

一、目標樣式

我們要實現上圖中的效果,需要如下的操作:

1.從工具欄上的”Smobiler Components”拖動一個GridView控件到窗體界面上

2.修改GridView控件的屬性

a.load事件代碼
 VB:

  Private Sub TestGridView3_Load(senderAs Object, e As EventArgs)Handles MyBase.Load    Dim matTable As New DataTable    With matTable     .Columns.Add("MAT_IMG", GetType(String))    .Columns.Add("MAT_DESC1", GetType(String))    .Columns.Add("MAT_DESC2", GetType(String))    .Columns.Add("MAT_DESC3", GetType(String))    .Rows.Add()    .Rows(0)("MAT_IMG") = "img97"    .Rows(0)("MAT_DESC1") = "¥69.00"    .Rows(0)("MAT_DESC2") = "2015/07/08"    .Rows(0)("MAT_DESC3") = "1張發票"    .Rows.Add()    .Rows(1)("MAT_IMG") = "img96"    .Rows(1)("MAT_DESC1") = "¥39.00"    .Rows(1)("MAT_DESC2") = "2015/07/08"    .Rows(1)("MAT_DESC3") = "1張發票"    .Rows.Add()    .Rows(2)("MAT_IMG") = "img95"    .Rows(2)("MAT_DESC1") = "¥280.00"    .Rows(2)("MAT_DESC2") = "2015/07/08"    .Rows(2)("MAT_DESC3") = "1張發票"    End With    Me.GridView1.DataSource = matTable    Me.GridView1.DataBind()  End Sub C#:  private void TestGridView3_Load(object sender, EventArgs e)  {    DataTable matTable = new DataTable();    matTable.Columns.Add("MAT_IMG", typeof(string));    matTable.Columns.Add("MAT_DESC1", typeof(string));    matTable.Columns.Add("MAT_DESC2", typeof(string));    matTable.Columns.Add("MAT_DESC3", typeof(string));    matTable.Rows.Add();    matTable.Rows[0]["MAT_IMG"] = "img97";    matTable.Rows[0]["MAT_DESC1"] = "¥69.00";    matTable.Rows[0]["MAT_DESC2"] = "2015/07/08";    matTable.Rows[0]["MAT_DESC3"] = "1張發票";    matTable.Rows.Add();    matTable.Rows[1]["MAT_IMG"] = "img96";    matTable.Rows[1]["MAT_DESC1"] = "¥39.00";    matTable.Rows[1]["MAT_DESC2"] = "2015/07/08";    matTable.Rows[1]["MAT_DESC3"] = "1張發票";    matTable.Rows.Add();    matTable.Rows[2]["MAT_IMG"] = "img95";    matTable.Rows[2]["MAT_DESC1"] = "¥280.00";    matTable.Rows[2]["MAT_DESC2"] = "2015/07/08";    matTable.Rows[2]["MAT_DESC3"] = "1張發票";    this.GridView1.DataSource = matTable;    this.GridView1.DataBind();  }

b.Layout屬性

新創建MobileForm項,并命名為MessageShow3,并拖入一個Label控件,如圖1

GridView的Layout屬性,綁定新建的窗體MessageShow3,如圖2

3.Smobiler窗體設計界面顯示效果

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 和林格尔县| 盐山县| 九龙县| 屯留县| 北宁市| 景宁| 金阳县| 卢氏县| 普兰县| 怀安县| 新郑市| 蓬莱市| 山阴县| 天津市| 皋兰县| 康马县| 无为县| 宜黄县| 奎屯市| 息烽县| 漳浦县| 错那县| 陈巴尔虎旗| 肥西县| 涿州市| 惠水县| 岗巴县| 山丹县| 通化县| 黑水县| 寿阳县| 安国市| 台湾省| 陆良县| 涪陵区| 翁牛特旗| 兴海县| 汾西县| 中方县| 砀山县| 宝鸡市|