Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get grid's column widths
Message
From
19/11/2004 17:44:52
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00962477
Message ID:
00963100
Views:
8
It works for me both in code and using designer. You also filled the MappingName (tableName) for DataGridTableStyle (in collection editor), right?
Do you want me to post a sample c# code?
Cetin

>Cetin,
>I had not set the MappingName, but it still did not work even after I set the MappingName property for each item in the DataGridColumnStyle collection through the designer.
>Using the code in your example I now see that I have the MappingName but the Width stays the same even if I adjust the column width at run time.
>
>Are you using the designer or are you doing things through code?
>
>Einar
>
>>Einar,
>>You set the width properties but did you also set MappingName ? Probably that style is not used at all. If in use you should get the widths as you resize:
>>
>>
>>foreach(DataGridColumnStyle dcs in dataGrid1.TableStyles[0].GridColumnStyles)
>>{
>>	MessageBox.Show( String.Format (
>>       "Column header:{0}\nColumn source:{1}\nColumn width:{2}",
>>	dcs.HeaderText,dcs.MappingName,dcs.Width));
>>}
>>
>>Check if mappingname (Column Source) is empty or not.
>>Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform