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 Glenn
I use default sample from SP1 and I have also tested with your attached sample, but it does not work unfortunately.
I am quite sure that I use the current dll, because I use the following new scenario:
WebGrid now supports various foreign column name in child and parent table when Hierarchical feature is enabled.
What could be the problem?
Regards
Michael
Hi Handy
I have installed SP1, but it doesn't work in my development environment.
Operating System Windows 2008 Server
Dev Environment: Microsoft Visual Studio.NET 2008
.NET Version: .NET Framework 3.5
UnitID.ValueList.DataSource = ds;
Importent:
I set cellstyle programmatically in PrepareDataBinding Event.
I suspect the column losts HorizontalAlign because it is coded in Page.IsPostBack .
protected void grd_PrepareDataBinding(object sender, DataSourceEventArgs e) { if (!Page.IsPostBack) { WebGridColumn eID = grd.RootTable.Columns[0]; eID.Caption = "ID"; eID.Width = Unit.Pixel(250); eID.EditType = EditType.NoEdit; eID.Visible = QS.Roles.isQSAdmin; eID.IsAutoIncrement = true; WebGridColumn eName = grd.RootTable.Columns[1]; eName.Caption = "Bezeichnung"; eName.Width = Unit.Pixel(500); WebGridColumn eHide = grd.RootTable.Columns[2]; eHide.Caption = "Ausblenden"; eHide.Width = Unit.Pixel(80); eHide.CellStyle.HorizontalAlign = ISNet.WebUI.HorizontalAlign.Center; eHide.ColumnType = ColumnType.CheckBox; eHide.EditType = EditType.Checkbox; WebGridColumn eManuallyErrorDependencies = grd.RootTable.Columns[3]; eManuallyErrorDependencies.Caption = "MED"; eManuallyErrorDependencies.Width = Unit.Pixel(50); eManuallyErrorDependencies.EditType = EditType.NoEdit; eManuallyErrorDependencies.DefaultValue = "0"; eManuallyErrorDependencies.Visible = QS.Roles.isQSAdmin; WebGridColumn eDependencies = new WebGridColumn("Dependencies", "Ref"); eDependencies.ColumnType = ColumnType.Text; eDependencies.EditType = EditType.NoEdit; eDependencies.Width = Unit.Pixel(30); eDependencies.NewRowEditType = NewRowEditType.NoEdit; eDependencies.CellStyle.HorizontalAlign = ISNet.WebUI.HorizontalAlign.Center; eDependencies.CellStyle.VerticalAlign = ISNet.WebUI.VerticalAlign.Middle; grd.RootTable.Columns.Insert(0, eDependencies); } }
So I have change Code to this:
protected void grd_PrepareDataBinding(object sender, DataSourceEventArgs e) { if (!Page.IsPostBack) { grd.ClearCachedDataSource(); grd.RetrieveHierarchicalStructure(); lblTitle.Text = "Fehlerliste"; imgTitle.ImageUrl = "~/Image/Icon/24/document_error.png"; WebGridColumn eRef = new WebGridColumn("Dependencies", "Ref"); grd.RootTable.Columns.Insert(0, eRef); } WebGridColumn eDependencies = grd.RootTable.Columns[0]; eDependencies.ColumnType = ColumnType.Text; eDependencies.EditType = EditType.NoEdit; eDependencies.Width = Unit.Pixel(30); eDependencies.NewRowEditType = NewRowEditType.NoEdit; eDependencies.CellStyle.HorizontalAlign = ISNet.WebUI.HorizontalAlign.Center; eDependencies.CellStyle.VerticalAlign = ISNet.WebUI.VerticalAlign.Middle; WebGridColumn eID = grd.RootTable.Columns[1]; eID.Caption = "ID"; eID.Width = Unit.Pixel(250); eID.EditType = EditType.NoEdit; eID.Visible = QS.Roles.isQSAdmin; eID.IsAutoIncrement = true; WebGridColumn eName = grd.RootTable.Columns[2]; eName.Caption = "Bezeichnung"; eName.Width = Unit.Pixel(500); WebGridColumn eHide = grd.RootTable.Columns[3]; eHide.Caption = "Ausblenden"; eHide.Width = Unit.Pixel(80); eHide.CellStyle.HorizontalAlign = ISNet.WebUI.HorizontalAlign.Center; eHide.ColumnType = ColumnType.CheckBox; eHide.EditType = EditType.Checkbox; WebGridColumn eManuallyErrorDependencies = grd.RootTable.Columns[4]; eManuallyErrorDependencies.Caption = "MED"; eManuallyErrorDependencies.Width = Unit.Pixel(50); eManuallyErrorDependencies.EditType = EditType.NoEdit; eManuallyErrorDependencies.DefaultValue = "0"; eManuallyErrorDependencies.Visible = QS.Roles.isQSAdmin; }
Now Columnwith (Columnheader and Column) are not match. Please see attached file.
How can I do this?
Great
Thanks James!
Hi James
I want refresh date before I check Dependencies. I have add grd.Refresh()
Now I get sometimes following Message:
Please wait while WebGrid is in progress processing request...
Is refresh performed asynchronously? Is there a way to refresh data first?
function grd_OnAcceptAllChanges(controlId) { var grd = ISGetObject(controlId); grd.Refresh(); var DelChanges = grd.GetChanges("Deleted"); for (var i in DelChanges) { if (DelChanges[i].Row.GetCell("Dependencies").Value != "0") { DelChanges[i].Row.UndoChanges(); alert("Row can't be deleted: " + DelChanges[i].Row.GetCell("Name").Value); } } return true; }
The user should not be able to delete some rows.
I will check this before the data is sent to the database. Has User deleted a row which has Dependencies (e.g. foreign key constraint), I will undo changes (for this row only).
With ClientSideEvent "OnBeforeDelete" I could inform User by realtime. But this Event is not fired in Batch Update mode. Therefore, I inform the user on OnAcceptAllChanges Event.
'Vertical line' issue is only visible on DefaultStyleMode = DefaultStyleKind.Elegant
Now, I use ClientSideEvent OnAcceptAllChanges. Perhaps, somebody knows a better way
function grd_OnAcceptAllChanges(controlId) { var grd = ISGetObject(controlId); var DelChanges = grd.GetChanges("Deleted"); for (var i in DelChanges) { if (DelChanges[i].Row.GetCell("Dependencies").Value != "0") { DelChanges[i].Row.UndoChanges(); } } return true; }
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