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
I'm grouping my WebGrid 6.0.216 on this column:<
Hi,
I am really sorry but it's the default behaviour for exporting in WebGrid, the export result will shows the value instead of the text.
Best Regards,
Gordon Tumewu
That's very sad because the built-in exporting functionality can't be used in a real world scenario then.Is it possible to only show the value and not the column name and value as it does right now?// Staffan E.
Staffan,
It's actually possible to show the text during exporting instead of the value. You can set the EnableValueList property of the export's argument to true during Export event.
Here's the sample codes:
protected void Page_Load(object sender, EventArgs e) { WebGrid1.Export += new ISNet.WebUI.WebGrid.ExportEventHandler(WebGrid1_Export); } void WebGrid1_Export(object sender, ISNet.WebUI.WebGrid.ExportEventArgs e) { e.ReportInfo.EnableValueList = true; }
For the group info format, yes, you can customize that one as well in the Export event. Try setting the GroupRowInfoFormatDefault property to "[value]" (without the double quote). The property is available in global level (LayoutSettings), table level and column level, so you can choose which suits you the best.
Hope this helps,James.
In the Export event I've added this code:
Unfortunately it still shows "AccountGroupText: x" when exporting. Have I done anything wrong?// Staffan
Okay, it seems like initializing the column property during Export event is too late. I guess that's because the data source is already populated and bound in that event.
Try to set the column property in InitializePostBack event. See the code below.
void WebGrid1_InitializePostBack(object sender, ISNet.WebUI.WebGrid.PostbackEventArgs e) { if (e.Action == PostBackAction.Export) { WebGrid1.RootTable.Columns.GetNamedItem("AccountGroupText").GroupRowInfoFormat = "[value]" } }
Hope this helps,
James.
I've tried both:
But it makes no difference. The WebGrid on the screen looks correct but when exporting to pdf for some reason it shows "AccountGroupText: x" on each group header and it's not acceptable for user friendly reasons.Isn't it possible to loop through each row in the DataDynamics object model and remove the first x characters if it's a group header row?
// Staffan
Staffan, one more thing worth to try.
It seems somehow the exporting process disregards the properties set at column and table level. So you can shoot directly at the group column level. For instance,
grid.RootTable.GroupedColumns[0].GroupRowValueFormatString = "[value]";
Let me know if that does the trick.
Anyhow, if that works, I'll still assume this issue is a bug since the exporting should have take account the other two level of properties (column and table).
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.// Staffan
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