We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DataGridTableStyle for Syncfusion Grid.

Thread ID:

Created:

Updated:

Platform:

Replies:

60795 May 11,2007 02:54 PM UTC May 11,2007 04:59 PM UTC WinForms 1
loading
Tags: GridControl
jogesh
Asked On May 11, 2007 02:54 PM UTC

Hi,

I have just started working with Syncfusion Grids. In one of my projects I am using the GridDataBoundGrid. I bind an Arraylist of my business Objects to the Grid. By default all the public properties are displayed in the column.

I wanted to know if there is something simmilar to "DataGridTableStyle" for the syncfusion datagrid to control how the properties are displayed in columns.

http://www.akadia.com/services/dotnet_arraylist_datagrid.html

If you could revert to me, that would be great.

Thanks,
Jogesh.

Administrator [Syncfusion]
Replied On May 11, 2007 04:59 PM UTC

In that sample, drop a GridDataBoundGrid on the form next to the DataGrid. Then add a

using Syncfusion.Windows.Forms.Grid;

at the top of the form1.cs file. Then replace the Form.Load with this new Form.Load.

private void DataGridArrayList_Load(object sender, System.EventArgs e)
{
CreateArrayList();
BindArrayListToGrid();

GridBoundColumn gbc = new GridBoundColumn();
gbc.MappingName = "RandomValue";
gbc.HeaderText = "Random Number";
gbc.StyleInfo.Format = "F4";
gbc.StyleInfo.BackColor = Color.Red;
this.gridDataBoundGrid1.GridBoundColumns.Add(gbc);

gbc = new GridBoundColumn();
gbc.MappingName = "SqrtValue";
gbc.HeaderText = "Square Root";
gbc.StyleInfo.Format = "F4";
this.gridDataBoundGrid1.GridBoundColumns.Add(gbc);

this.gridDataBoundGrid1.DataSource = this.arrayList1;
}


You use the GridBoundColumns collection to set the properties on columns in a GridDataBoundGrid.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;