. NET language Smobiler exploitation of GridView control design more complex forms _ Practical tips

Source: Internet
Author: User

First of all: Smobiler is a development platform that uses. NET language in the VS environment to develop the app, perhaps more easily than Xamarin.

One, the target style

To achieve the effect shown in the above illustration, we need to do the following:

1. Drag a GridView control to the form interface from "Smobiler components" on the toolbar

2. Modify the properties of the GridView control

A.load event code
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 Invoices". 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 Invoices". 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 Invoice" end and 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 Invoice";
    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 Invoice";
    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 Invoice"; This.
    Gridview1.datasource = mattable; This.
  Gridview1.databind (); }

B.layout Property

The new Mobileform item is created, named MessageShow3, and dragged into a label control, as shown in Figure 1

The layout property of the GridView, binding the new Form MESSAGESHOW3, as shown in Figure 2

3.Smobiler Form Design Interface Display effect

Second, the mobile phone effect display

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.