Add text columns to briskdatagrid

Source: Internet
Author: User

Add text columns to briskdatagrid

To add a datagridtextcolumn to the briskdatagrid, you must use the addtextcolumn () method of the briskdatagrid. The method is prototype as follows:

Public sub addtextcolumn (_

Byval textcolumn as datagridtextcolumn ,_

Byval mappingname as string ,_

Optional byval headertext as string = "",_

Optional byval [readonly] as Boolean = false ,_

Optional byval alignment as horizontalalignment = horizontalalignment. Center ,_

Optional byval nulltext as string = "",_

Optional byval width as integer = 75)

Textcolumn

This parameter requires a datagridtextcolum class object, which will be added to the briskdatagrid table style.

Mappingname

This parameter is used to map columns to data member names. This parameter is used to accept a string.

Headertext

This parameter accepts a string used to set the header text. This parameter is an optional parameter. The default value is "".

Readonly

This parameter accepts a Boolean value indicating whether the column is read-only. True, read-only; false, not read-only. This parameter is an optional parameter. The default value is false.

Alignment

This parameter is used to set the text alignment in cells. This parameter is optional and the default value is horizontalalignment. Center.

Nulltext

This parameter is used to set the text displayed when the column contains a null reference. Optional parameter default value "".

Width

Set the column width. Optional. The default value is 75.

The following program snippet shows how to add the datagridtextcolumn to the briskdatagrid:

Private sub initbriskdatagrid ()

Dim dvemployee as new dataview (Me. dshr. Tables ("employees "))

Me. briskdatagrid. setdatabinding (dvemployee)

Me. briskdatagrid. begintablestyle ("employees ")

Dim colemployeename as datagridtextcolumn

Me. briskdatagrid. addtextcolumn (colemployeename, "emp_name", "employee name ")

Me. briskdatagrid. endtablestyle ()

End sub

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.