iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
I have a question regarding the export on the webgrid. I group the rows by a column, the groupings contains the default message eg Document Type : Invoice. I want to change this to be a different value. The issue is the same as the issue in this link.
http://www.intersoftpt.com/Community/WebGrid/Remove-column-name-and-ID-from-grouped-column-on-export/
I have done everything mentioned in the thread as far as I can see. I have added the following code
protected void wgDocuments_InitializePostBack(object sender, ISNet.WebUI.WebGrid.PostbackEventArgs e)
{
if (wgDocuments.RootTable.GroupedColumns[0] != null)
wgDocuments.RootTable.GroupedColumns[0].GroupRowValueFormatString = "[value]";
}
I took this to be the solution from what I have read. This does not solve the issue for me. Am I doing something wrong. If so can you tell me what is wrong? Please read the whole thread as it continues past the checked answer.
Thanks,
Dermot
Hello,
Yes, I have tested in here and both of your scenario are using Sum aggregate. I also can see the issue now. After dicussed with our developer teams, it seems our export have not supported aggregate info yet except, count. If you want, you can post this as a feature request.
Regards,Handy
What value does GroupRowValueFormatString = "[value]"; refer to?
If ["value"] itself is "Invoice, of course it will not change. Please let me know more detail about what values that you want to use for replacing the current GroupRowValueFormatString.
Hi Handy,
In the example metioned in the link that I attached in the the previous post. The person asking the question wanted to display the value only eg Invoice instead of Document Type : Invoice. The way of acheivng this in the grid is through the following line of code.
wgDocuments.RootTable.Columns.GetNamedItem("DocumentTypeName").GroupRowInfoFormat = "[value]";
But this did not carry through to the export. The person was prompted to put in the following code and they responded at the end of the thread by saying
In my VB code I added:
WebGrid1.RootTable.GroupedColumns(0).GroupRowValueFormatString = "[value]"and it works!It looks like there are bugs regarding doing this any other way.
What I wish to acheive is something like this, to set subtotals in my export.
I can set the sub totals in the grid to be displayed with the following line of code
wgDocuments.RootTable.Columns.GetNamedItem("DocumentTypeName").GroupRowInfoFormat = "Document Type: [value] - Total: [sum(Amount)]";
An example of the output in the grid is
Document Type : Invoice - 1000.53
What I want is to set this to be part of the export. The code that I took to be correct from the previous thread is
protected void wgDocuments_InitializePostBack(object sender, ISNet.WebUI.WebGrid.PostbackEventArgs e) { if (wgDocuments.RootTable.GroupedColumns[0] != null) { wgDocuments.RootTable.Columns.GetNamedItem("DocumentTypeName").GroupRowInfoFormat = "Document Type: [value] - Total: [sum(Amount)]"; wgDocuments.RootTable.GroupedColumns[0].GroupRowValueFormatString = "Document Type: [value] - Total: [sum(Amount)]"; } }
But this does not work. Can you explain what I am doing wrong. I hope this brings clarity to what I am asking you.
Hi Dermot,
It seems the [sum(Amount)]" could not be recognized because it is the value from the other column. I think you will need to calculate sum(amount) and fill into GroupRowValueFormatString. Please look into my attached sample. I filled with the correct GroupRowValueFormatString, and it is recognized when exported.
Thanks for your reply. I downloaded your example and ran it but it still produces the same output. I have attached a html version of the output and as you can see the CategoryID : 1 is displayed instead of the expected CategoryID : 1 and Total : CountValue.
The version of the WebGrid.dll that we are using is 6.0.7200.209
Any further help with this would be greatly appreciated.
Regards,
I tested in WebGrid 6, 6.0.7200.219. It was running well. Please see my html export. I suggest you to use the latest hotfix (WebGrid and WebUIFramework) by using UpdateManager.
Hi
I have the same issue. I would like to when exporting include the total of a different column in the group header i.e in your attached sample have CategoryID : 1 Total Units on Order : 60
I have tried
WebGrid1.RootTable.GroupedColumns[0].GroupRowValueFormatString = "CategoryID : [value] and Total Units on Order : [sum(TotalUnitsonOrder)]
This doesn't work. It just prints out Total Units on Order : [sum(TotalUnitsonOrder)]
The value we want is from another column. You say previously that we need to calculate sum(amount) and fill into GroupRowValueFormatString. How would we do this? Any help would be greatly appreciated. We have a client who can't understand why we can get the total displayed in group headers on grid but not when exporting to Excel
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname