Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Grid Tech Support » Cell Text Alignment and Related Issues Collapse All
Subject Author Date
Entity Dev May 16, 2016 - 8:38 AM

Hello, I am still evaluting Elegant Grid.

I am quite impressed with the control so far. It is very rare that I evaluate a databound control which works the first time I set a DataSource and run the program. Yours worked the first time, with one line of code.

Some thoughts:

It would be nice to retrieve columns for data sources other than DataTable. I use Object binding (IList, IBindingList, etc.). I was able to work around this by creating a DataSet and temporarily using it as a DataSource. I retrieved the columns, then changed to an object data source. I was presented with a prompt which asked me if I wanted to remove all columns. I answered No and the columns remained. I am very happy to note that your column naming pattern suffixes the DataPropertyName with "Column", instead of using an antique prefix such as "col". Just wondering if this behavior may be customized, although I am very happy with it as is. I think it would also be very good if, when columns are retrieved, the HeaderText property would splt on Camel case to build that string, rather than using the DataPropertyName. For example, the HeaderText for property LastName would be generated as "Last Name".

I find some genuine problems with the product, however:

1.  I note that the text alignment for all cell types is TopLeft by default. The defaults should all be MiddleLeft. Please consider this a feature request. I consider it a bug, though not in the strictest sense of the word; it is more a poor decision. It is difficult for me to imagine why TopLeft became the default. Is there a workaround? I don’t want to be forced to create a new CellStyle for every cell type in every grid. A code workaround in VB.Net will be appreciated which sets all cell text alignment to MiddleLeft. Can I derive from ElegantGrid, making MiddleLeft the default for all cell types?

2.  When I resize a column to something narrower than the length of a visible cell’s content, the text in the cell is moved upward. Is there a property setting available to stop this? If not, will it be fixed? If so, please let me know when.

3. When I double-click the margin/separator between columns, the column is not resized to fit the width or length of content in cells contained in that column? Is there a property setting for this? If not, please let me know when it will be fixed.

Many thanks.

Entity Dev May 16, 2016 - 11:33 AM

Ok, thanks very much. Cell Styles can be handled in this manner:

CType(Me.BoundGridControl1.CellStyles(GetType(TextCellStyle)), TextCellStyle).TextAlignment = ContentAlignment.MiddleLeft
CType(Me.BoundGridControl1.CellStyles(GetType(NumericCellStyle)), NumericCellStyle).TextAlignment = ContentAlignment.MiddleLeft
CType(Me.BoundGridControl1.CellStyles(GetType(DateTimeCellStyle)), DateTimeCellStyle).TextAlignment = ContentAlignment.MiddleLeft
CType(Me.BoundGridControl1.CellStyles(GetType(ComboBoxCellStyle)), ComboBoxCellStyle).TextAlignment = ContentAlignment.MiddleLeft

Regarding the section of the documentation regarding themes - I had already read it and it mentions nothing about custom themes. However, I saw support’s response to a similar question in another thread, which indicated that custom themes were not supported. This was, however, quite an old thread. Is it still the case that you have not added such support?

I look forward to your comments on Issues 2 and 3 above, when you have the time.

Thanks again.


TSELLC Support May 16, 2016 - 9:12 AM
Entity Dev May 16, 2016 - 11:35 AM

My apologies for getting the thread out of order. I understand how it happened and will ensure I reply correctly in the future.