User (Old forums)MemberJuly 24, 2009 at 1:51 pmPost count: 23064
Just a quick question hoping for a quick answer 🙂 I searched the forum but couldn’t find the solution I was looking for.
I had a grid that I databind to a DataTable. I would like to have it resize the column Headers to fit the header text in them. Column.GetFittedWidth is not what I need since that resizes the columns based on the data in them. I am looking to resize the Headers to fit the titles they contain.
How do I do that?
Imported from legacy forums. Posted by Nazeeh (had 1151 views)User (Old forums)MemberJuly 27, 2009 at 6:54 pmPost count: 23064
hmm…does anyone from Xceed look at these forums anymore? Where can I get support for this product?
Imported from legacy forums. Posted by Nazeeh (had 660 views)User (Old forums)MemberAugust 4, 2009 at 4:36 pmPost count: 23064
All of Microsoft employees share the Vanguard subscription bought by Microsoft since it’s license site. This means that you should always address your question to email@example.com . Actually, I can see that you sent your question (at firstname.lastname@example.org) on Tue, 28 Jul 2009 16:18:43. You got your response on Wed, 29 Jul 2009 11:37:13.
If, as a Vanguard user, you decide to use the forums to ask a question, you should always send a notification at email@example.com referring to the thread you have created. Otherwise, the forum posts are answered as soon as we have some spare time (so to speak, because we don’t really have any).
To this day, the forums are still not linked to our CRM (Custormer Relationship Management) so it makes it impossible for us to know who is Vanguard on the forums and who is not. This is supposed to change in the (not so distant) future but we are not there yet.
This being said, the answer to your original question is:
foreach (Row row in gridControl1.FixedHeaderRows)
if (row is ColumnManagerRow)
foreach (Cell cell in (row as ColumnManagerRow).Cells)
cell.ParentColumn.Width = cell.GetFittedWidth();
This is not what I have sent you. (A GroupByRow row could be at index 0 of the FixedHeaderRows.) You should use this version.
Imported from legacy forums. Posted by Ghislain (had 812 views)
- You must be logged in to reply to this topic.