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.
Unfortunately, activation email could not send to your email. Please try again.

Need header row text to left justify

Thread ID:

Created:

Updated:

Platform:

Replies:

93431 Mar 12,2010 06:13 PM Mar 18,2010 12:35 AM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 12, 2010 06:13 PM

Using the following code I am having problems getting the cell text in the header row to left justify. Can you help please?

---

// ------------------------------
// describe StatusText column
// ------------------------------
if (pd.Name == "StatusText")
{
col.HeaderText = "Status Message";
col.MappingName = "StatusText";
col.ReadOnly = true;

// update grid styles for this column
col.StyleInfo.CellType = "TextBox";
col.StyleInfo.CellValueType = typeof(String);
col.StyleInfo.CellTipText = "Status message";
col.StyleInfo.MaxLength = 255;
col.StyleInfo.HorizontalAlignment = GridHorizontalAlignment.Left;
}

Jisha Joy [Syncfusion]
Replied On March 18, 2010 12:35 AM

Hi George,

You need to ignore ReadOnly style temporarly to apply styles to the readOnly cells. See the modifed code:

col.HeaderText = "Status Message";
col.MappingName = "StatusText";
col.ReadOnly = true;


this.gridDataBoundGrid1.Model.IgnoreReadOnly = true;

// update grid styles for this column
col.StyleInfo.CellType = "TextBox";
col.StyleInfo.CellValueType = typeof(String);
col.StyleInfo.CellTipText = "Status message";
col.StyleInfo.MaxLength = 255;
col.StyleInfo.HorizontalAlignment = GridHorizontalAlignment.Left;


this.gridDataBoundGrid1.Model.IgnoreReadOnly = false;



Regards,
Jisha

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.

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.

;