I have two problems (one may be a bug).
I would like to be able to programmatically groupby two columns and then sort the results by a third column. I am able to get the two columns to do the outlook groupby when the grid loads but the results when expanded are not being sorted by the third column.
In other words, I have Clinics which contain many Doctors (PCP in my code below) which have many Patients. When the grid loads I want to groupby Clinic and then Doctor and then display the PatientIDs in order. I can get the two Outlook groupbys to work but I can't get the PatientIDs to sort. Please see my code below and let me know if I'm missing anything to specify the correct groupby and sort.
Problem #2 arises when I try to export to Excel. When I have the groupby rolled up in the webgrid by Clinic and then Doctor, the Excel spreadsheet reverses the groupby column order, displaying the groupby rolled up by Doctor and then Clinic. If I reverse the order of the groupby columns in the webgrid to Doctor first and then Clinic, the Excel spreadsheet again reverses the column order and displays the groupby as Clinic and then Doctor. So I can't get the Excel export to match what's in the webgrid when I groupby two columns programmatically. Any idea how I fix this? It only happens when I set the groupby programmatically. If I comment out the below code and manually drag the columns to do the two-column groupby, the Excel export works as expected. Thanks...
The relevant code:
// Default to Grouping by Clinic & PCP and then sort by PatientIDthis.UltraWebGrid1.DisplayLayout.ViewType = Infragistics.WebUI.UltraWebGrid.ViewType.OutlookGroupBy;int clinicIndex = getColumnIndex(ref this.UltraWebGrid1, "Clinic_value");int pcpIndex = getColumnIndex(ref this.UltraWebGrid1, "PCP_value");int patientIDIndex = getColumnIndex(ref this.UltraWebGrid1, "PatientID");UltraGridColumn clinicColumn = this.UltraWebGrid1.DisplayLayout.Bands[0].Columns[clinicIndex];UltraGridColumn pcpColumn = this.UltraWebGrid1.DisplayLayout.Bands[0].Columns[pcpIndex];UltraGridColumn patientIDColumn = this.UltraWebGrid1.DisplayLayout.Bands[0].Columns[patientIDIndex];clinicColumn.IsGroupByColumn = true;pcpColumn.IsGroupByColumn = true;this.UltraWebGrid1.Bands[0].SortedColumns.Add(clinicColumn);this.UltraWebGrid1.Bands[0].SortedColumns.Add(pcpColumn);this.UltraWebGrid1.Bands[0].SortedColumns.Add(patientIDColumn);
Hello? Is this thing on?
I'm evaluating your components and I've now been waiting 32 hours for a reply. Is this the type of support and turnaround time I can expect if we purchase? My project is on hold until I discover whether these issues can be resolved. Please respond ASAP...
56 hours and still waiting for a reply. Your support sucks.
I have a similar problem. Can you please share your solution.
Thanks.
Sarita.
I didn't follow up on this because the UltraWebGrid didn't quite do what I needed it to do, so I went with another component. Here's the reply and sample project I received from support. Hopefully it helps...
Thank you for your support submission.Based on your description I have created sample application with build version Version=8.2.20082.1000. In this sample I have programmatically set two columns to be groupBy. I then set the third column to be sorted.I created a button to export to Excel. I tested this by changing the groupBy order and the Excel spreadsheet display the correct groupBy column order.I am attaching the sample application for your reference. Please run the sample application at your end and see if the behavior persists.Just in case your mail server does not allow .zip files, I have renamed the extension to .zop. Please reset the extension back to .zip at your end before opening the archive.
Just run into this problem myself, but I have a workaround. It's not pretty, but it works. What you need to do is turn the grouping off on any grouped columns, call DataBind(), then group the columns again in reverse order, then call DataBind() again.
Pretty rank, but there you go...
However, no matter what I do, I can't seem to get the grouping back into the right order afterwards.