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
For my case, that can't work. On my button click function row is inserted in the database. That is why I use grid.SendCustomRequest(); and WebGrid1_InitializePostBack event handler so that datasource is refreshed with new row.
Also, your approach to expanding is top to bottom. Your code gets first group and expands it, and then expands all the children. I want to expand only groups and subgroups that lead to the new row (the one that was inserted on button click).
However, I found another way.
On the server-side in InitializeRow event handler, I first detect positions of the coresponding groups and invoke function on the client-side with those group positions.
protected void WebGrid1_InitializeRow(object sender, RowEventArgs e) { if (e.Row.Type == ISNet.WebUI.WebGrid.RowType.Record) { if (e.Row.Table.IsRootTable) { int? newSastanakID = ConvertSafeNullable.ToInt(Session["NoviSastanak"]); if (newSastanakID.HasValue && e.Row.KeyValue.ToString() == newSastanakID.Value.ToString()) { var rootRow = e.Row.GetRootRow(); bool found = false; int rootLevel = 0; int subLevel = 0; int subsublevel = 0; foreach (WebGridRow rr in rootRow.Children) { foreach (WebGridRow rr2 in rr.Children) { if (rr2.Cells[0].Text == e.Row.Parent.Cells[0].Text) { rootLevel = rootRow.Position; subLevel = rr.Position; subsublevel = rr2.Position; found = true; break; } } if (found) { break; } } WebGrid1.ClientAction.InvokeScript("ExpandToRow", new ISNet.WebUI.FunctionParameter[] { new ISNet.WebUI.FunctionParameter(rootLevel.ToString(), "int"), new ISNet.WebUI.FunctionParameter(subLevel.ToString(), "int"), new ISNet.WebUI.FunctionParameter(subsublevel.ToString(), "int") }); Session["NoviSastanak"] = null; } } } }
The client-side function looks like this:
function ExpandToRow(rootLevel, subLevel, subsubLevel) { var grid = ISGetObject("WebGrid1"); var rootRow = grid.RootTable.GetRowByGroup(0, rootLevel); rootRow.ExpandGroupRow(); var subRow = rootRow.GetGroupChildRows()[subLevel]; subRow.ExpandGroupRow(); subRow.GetGroupChildRows()[subsubLevel].ExpandGroupRow(); return; }
This way, only the groups that row is member of, are expanded.
I have attached simple web application with grid. Even with the latest hotfix it does not work.
Maybe, the problem is not with XHTML but the combination of VirtualLoad and Grouping.
I need to know how can I make grid do two things:
I set the property GroupByBoxVisible="True" in the example that I have previously uploaded and I still get the same exception.
The problem is this. When grid is loaded for the first time, there is no grouping and column Country is shown with other columns in the grid.
When "Add Group" is clicked, javascript function creates grouping and grid groups by the Country column.
When "Remove Group" is clicked, javascript function removes group and there are no more groups in the grid but the Country column is missing.
When "Add Group" is clicked again, "null or not an object" is thrown while calling grid.RootTable.UpdateUI(); in javascript function.
This is probably because column Country is missing from the Columns section of the grid. It was removed by the grid first time it was grouped by but it was not returned to it when it was removed from the GroupedColumns section.
How can this be solved?
The error happens when grid.RootTable.UpdateUI(); is called. It happens when I add group by column that has been previously removed from the Group By columns.
I have attached an example for you. I have modified your Programmatic_UI2 example from the WebGridTutorial solution. Run it, click Add Group, then click Remove Group and again Add Group and you will get the same exception.
I have found why System.OutOfMemory exception was thrown. In fact, when aspx page with grid tries to load for the first time, System.FileIOPermission is thrown. After reloading, System.OutOfMemory exception is thrown.
Since our pages are embedded in Sharepoint 2007, I raised trust level to "Full". After that, webgrid loaded without problem.
In the prior version (2009 R1, not 2009 R1 SP1), WebUI controls worked under "WSS_Medium". Because of our client security policy, trust level should stay "WSS_Medium".
How can this issue be solved?
Hi, Handy.
I have uninstalled WebUI Studio and removed all assemblies from GAC. I have then downloaded and installed latest WebUI Studio release (posted date 2009-10-26).
Licence manager, deployment manager and update manager all work fine. WebGrid Designer in Visual Studio also works.
Our project now compiles in VS .Net, but when you access deployed aspx pages it throws System.OutOfMemory exception.
I have checked & rechecked web.config and assembly versions are OK. On the other side, I have published your WebGrid Samples and they work without a problem.
Our custom aspx pages are embedded in the Sharepoint 2007.
I have attached screenshot with list of assemblies that were added to GAC during installation process. In the prior version of Web UI Studio (R1 not SP1), it seems to me there were more of them. Is this normal?
Thank you for your answer.
Maybe I was little vague with issue #1. The data in the column represents phases and may consist of 3 parts (major, medium and minor phase).
For example:
01
01.20
01.100.03
...
100
100.40
100.40.120
In database data is saved as varchar(20), in dataset DataType is string and the corresponding WebGridColumn has also DataType string.
Everything is working fine in WebGrid, it can be sorted, grouped and filtered. It seems that Excel automatically recognizes numbers in the column and converts them from string. The issue won't happen when there are multiple phases in the cell divided with comma like (01.20.01, 01.20.30).
Regarding issue #2, if <br> tag solves the newline issue, does it mean that other "special" characters like ampersand should also be replaced with equivalent html tags?
In what event handler does this need to be done (InitalizeDataSource, InitializeRow or Export)?
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