Hi, I want to change the GroupAreaText in the code behind similar like grid.GroupingSettings.EmptyGroupAreaText = "123".
How can I do this? I use the "BoundDataField" object and when I group a column I want to display the "Header.Text" value inside the "GroupAreaText"!
BR
Hello,
Thank you for posting in the Infragistics community !
I will prepare a sample for your reference that demonstrates how this can be achieved and upload it in this thread.
Please find the attached sample below. It handles the GroupedRowInitialize event to modify the default GroupedRow text. Please let me know if this meets your requirement.
Using this code I get the header text set for each column written in the buttons. For example you have set
col5.Header.Text = "InjuryDate";
and if I group by this column then the text I receive in the marked place on your screenshot is "InjuryDate". As mentioned this value is taken from the Header.Text property of the given column.
Please let me know if you have further questions on the issue.
Hi, here is my result:
Thank you for the screen, I have noticed the first time you attached it. I am currently working on this to see why this happens. I will keep you posted with my findings.
Hi,
I have investigated this issue, and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 188060. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
I will leave this case open and update you with any new information after the review. You can also continue to send updates to this case at any time.
You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.
Our engineering team reviewed this issue and stated it as a correct behavior of the grid. Actually when you add columns in code behind you should add them to the WebHierarchicalDataGrid, rather than the WHDG.GridView:
BoundDataField col1 = new BoundDataField(); col1.DataFieldName = "ClaimNumber"; col1.Key = "ClaimNumber"; col1.Header.Text = "Claim Number"; this.WebHierarchicalDataGrid1.GridView.Columns.Add(col1); this.WebHierarchicalDataGrid1.Columns.Add(col1);
When the text for the element is set the code look for the columns collection of WebHierarchicalDataGrid1. However since columns were added to WebHierarchicalDataGrid1.GridView the first was empty and the Header.Text of the columns was not available, which was causing this issue.
Please correct this in your code and let me know if you have any further questions on the matter, I will be glad to help.
Hi, as you suggested I opened a new post ("Data binding") in the Forum. BR
I'm just following up to see if you need any further assistance with this issue. If so please let me know.
Again I do not see any issues with the text displayed in the buttons rendered after grouping. The other issue you are experiencing is not related to the one discusses in this thread. I had a look at your code and it seems that you are defining columns that are not valid for the current dataSource that the grid is bound to.
I assume this is causing other issues. Please try to refactor your code so that you are defining columns valid for the current dataSource. If issue still persists please do not hesitate to contact us.
However I would like to ask you to open a new thread/case for every different issue you are facing, so if you need further assistance you can go and post a new thread regarding the current matter. This is Infragistics' policy and is intended to enable better searching and tracking and also helps us to provide better support.
Please let me know if you have further questions regarding the text in buttons after grouping.
Hi, please switch between Data A and Data B and you will see that the View-State is corrupt and the displayed data are wrong! If you only push one button everything is working fine. But if you Switch between A and B it is not working corrclty!
I was able to run your sample and could not understand what is not working. After I do grouping the Header Text of the given column is displayed, as was your demand. Please see the screenshot below: