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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid formating problem

Thread ID:

Created:

Updated:

Platform:

Replies:

91061 Nov 2,2009 08:22 PM UTC Nov 24,2009 04:54 AM UTC ASP.NET Web Forms (Classic) 5
loading
Tags: GridGroupingControl
Martin Kappl
Asked On November 2, 2009 08:22 PM UTC

Hi all,

we are using the grid to display dynamic data returned from database with datasets. After having trouble to get the foreignkeys to display as combobox in edit-mode (relation is manually added via code), we have one minor problem left:

Where can we format the controls used in edit mode? Text-align of edit boxes, color of the datetime picker and mainly the grid displaying the foreign key relationship? Is there a way to style these controls? We are NOT using autoformat.

Thanks for your help :-)

Rekha P [Syncfusion]
Replied On November 4, 2009 12:30 PM UTC

Hi Martin,

Thank you for your interest in Syncfusion Products.

Yes, this is possible to disable the inline textboxes when the Grid is in edit mode. This can be achieved using RowDataBound event handler which will bound for each grid row. Please refer the simple code snippet below to achieve this for AddNew record row.

void GridGroupingControl1_RowDataBound(object sender, RowDataBoundEventArgs e)
{
//// Gets the Current Record Row Element Bound.
if (e.Element.Kind == DisplayElementKind.AddNewRecord)
{
for (int i = 0; i < e.Row.Cells.Count; i++)
{
/////// Check for column name.
//if (((Syncfusion.Web.UI.WebControls.Grid.Grouping.GridCell)(e.Row.Cells[i])).ColumnDescriptor.Name == "Name")
//{
TextBox txtbox = null;
foreach (Control ctrl in e.Row.Cells[i].Controls)
{
if (ctrl is TextBox)
{
txtbox = ctrl as TextBox;
txtbox.Enabled = false;
break;
}
}
//}
}
}
}

http://files.syncfusion.com/support/GGC.Web/7.3.0.20/60272/main.htm

Please try removing AutoFormat to none from the above sample and let me know if you have any concerns.

Thanks,
Rekha

Martin Kappl
Replied On November 11, 2009 10:17 AM UTC

Thanks for your answer. I will try this asap and give you feedback about it.

Gowri Manohari D [Syncfusion]
Replied On November 12, 2009 03:39 AM UTC

Hi Martin,

Thank you for the update.

Regards,
Gowri

Martin Kappl
Replied On November 20, 2009 10:57 AM UTC

I checked it and it works, but one little problem stays open.

I use this code to format the dropdown:

Dim objDropDown As MultiColumnDropDownCombo = CType(objCell.Controls(0), MultiColumnDropDownCombo)

objDropDown.AutoFormat = "none"
objDropDown.ButtonCssClass = "SFDropDownButton"
objDropDown.ButtonHoverCssClass = "SFDropDownButton"
objDropDown.ContainerHoverCSSClass = "SFDropDownContainer"
objDropDown.ContainerTableCssClass = "SFDropDownContainer"
objDropDown.ControlRootCSSClass = "SFDropDownDefault"
objDropDown.PopupCssClass = "SFDropDownPopup"
objDropDown.TextBoxCssClass = "SFDropDownTextBox"
objDropDown.TextBoxHoverCssClass = "SFDropDownTextBox"
objDropDown.HeaderStyle.CssClass = "SFDropDownHeaderStyle"
objDropDown.ItemStyle.CssClass = "SFDropDownItemStyle"
objDropDown.HoverItemStyle.CssClass = "SFDropDownItemStyleHover"
objDropDown.ShowHeader = False
objDropDown.PopupHeight = 200
objDropDown.Columns(1).ItemStyle.CssClass = "SFDropDownItemStyle"
objDropDown.Columns(1).ItemStyle.Width = 200

Everything works, except the "HoverItemStyle". There is no property for it at the boundcolumn und the setting at dropdown level does not make any effect.

Gowri Manohari D [Syncfusion]
Replied On November 24, 2009 04:54 AM UTC

Hi Martin,

Please send me the sample which you have used for this issue. It will be useful to proceed further.

Regards,
Gowri

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

;