NDDataGrid class properties

CanUserAddRow property

Gets or sets a flag indicating whether users can add rows.

Syntax

public bool CanUserAddRow { get; set; }

Property Value

Type:                    System.Boolean

Default value:   false

 

 

CanUserDeleteRow

Gets or sets a flag indicating whether users can delete rows.

Syntax

public bool CanUserDeleteRow { get; set; }

Property Value

Type:                    System.Boolean

Default value:   false

 

 

DataSource

Gets or sets data of the grid in XML format.

Syntax

public bool CanUserDeleteRow { get; set; }

Property Value

Type:                    System.String

Default value:   false

Remarks

In this example assume that an NDDataGrid exists with five columns defined. Here is an example of XML data format of the property:

<DataSource>
	<row>
		<column name="Id" value="0" />
		<column name="CheckBoxColumnSelected" value="true" />
		<column name="TextColumnStreet" value="1st Street" />
		<column name="TextColumnStreetNo" value="1234" />
		<column name="TextColumnTown" value="Capital City" />
		<column name="TextColumnZipCode" value="99999" />
	</row>
	<row>
		<column name="Id" value="1" />
		<column name="CheckBoxColumnSelected" value="false" />
		<column name="TextColumnStreet " value="Qtr 2" />
		<column name="TextColumnStreetNo" value="RegistrationNo2" />
		<column name="TextColumnTown" value="" />
		<column name="TextColumnZipCode" value="" />
	</row>
</DataSource>

Every element <row/> represents one row in the grid. Attributes name of the <column/> elements contain “name” of the column (i.e. the value of SortMemberPath property of the column!) and attributes value contain the value of appropriate cell of the grid.

 

RowsCount property

Gets the number of rows in this grid.

Syntax

public bool CanUserDeleteRow { get; set; }

Property Value

Type:                    System.Boolean

Default value:   false