Hi,
In v10.3, we've been setting the caption (depending on the language selected) at runtime as suggested in one of the posts I've seen on this website.
Been thinking if we could ditch this way of doing things.
I am trying out v22.2 but the column name still changes randomly in the designer. In my case:
but the resulting change does not get updated in the resx file automatically :
Hence, my question, what is the best practice to localize ultragrids? Can we not just put the relevant caption in the language's resX file and let the magic be done by itself as is the case with other controls?
Changing the form language and inserting the captions is not really an option, since we are using the Multilingual App Toolkit to manage the translations. The captions get written over on each build.
Thanks,
Veevek
Hello Veevek,
Thank you for contacting . In the WinGrid Columns keep on changing name in the designers file after reset the datasource is expected . It has a reason , we cant restore the old name, as we are not using the old objects. The DataSource property is being reset which removes the existing UltraGridColumns and then assigned to the BindingSource again, which creates new UltraGridColumns. Since these are new columns and dont match the existing cached columns, the serializer must come up with new names for each column.
Said that , in order to localize the grid column header you would have to give column some caption and use that caption as a resource string . and If the column.Header.Caption is blank (not set), then the control falls back to displaying the Key.
Refer to this post discussing the same matter:
https://ko.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/69046/how-do-i-localize-bound-grid-headers
Hi Divya,
Thanks for your response.
Just to be clear, no manipulation was done on the bindingsource once it was set. At times even opening and closing the designer of the form makes a change in column's variable name. Like in this case, no intervention was done on the binding source and yet:
I was wondering whether there is a way for the designer to generate something like [UltraGridName] + _ + [Column Key] e.g.: 'MyUltraGrid_Age' instead of 'ultraGridColumn + [Random number]' ?
Also, is there any best practice for binding data to an Ultragrid?
I am having issues attaching the ZIP file. Here is alink to it:
https://we.tl/t-BFFoigSeSo
Steps to reproduce the behaviour:
Set Dock Style from Fill to none (and vice versa)
Hello,
You can delete the bin folder from the zip file and try to attach again.
Also make sure to provide the steps to reproduce the issue.
Infra22.2Test.rar
I followed your instruction and in my sample i set grid dock to fill to none and i am not able to reproduce the behavior you described. attached a small video of my testing.
May i know which version of control you are using ?
Although that is not the point ,if for some reason grid column name changed ,its expected and for the reason i explained above. I had this issue logged long back into our internal bug tracking system and developer explained that its due to serialization.
Here the point is you shouldnt relies on it to set the resource string.
Not able to attach the video here , tried multiple time.
Recording #72.zip