Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Infragistics WebGrid Updating
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
ASP.NET
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01030174
Message ID:
01071443
Views:
19
Darren,

>Kevin, a question for you. The problem i am having now, is when a Business rule is broken when attempting to save data from the data grid. I have traced the problem through to the mmWebDataHelper.cs class Line 568. When the BrokenRulesWarning is being added to the BrokenRules collection the WebDataHelper is attempted to cast the UltraWebGrid as a DataGrid and generating a Specified Cast is not valid error message. Some help here would be greatly appreciated Kevin. :)

This is definitely a problem. Try changing the code in the last case of mmUltraWebGrid.StateChangeHandler() to the following:
case (mmBusinessState.BrokenRulesWarnings):

	mmErrorProviderArgs epArgs = (mmErrorProviderArgs)e.PrimaryKeyValue;

	// Get the binding source information for this control
	mmBusinessObject BusinessObject = bizObj as mmBusinessObject;
	if (BusinessObject != null)
	{
		string TableName, ViewName;
		mmWebBindingStrategyDataGrid.GetBindingSource(BusinessObject,
			this.BindingSourceMember,
			out TableName, out ViewName);

		if (epArgs.TableName.ToLower() == TableName.ToLower())
		{
			foreach (UltraGridColumn Col in this.Columns)
			{
				if (Col.IsBound && Col.BaseColumnName.ToLower() == epArgs.ColumnName.ToLower())
				{
					mmWebDataHelper.SetControlErrorMessage(this, epArgs.ErrorText);
					break;
				}
			}
		}
	}
	break;
Just recompile the project afterwards, add the new assembly to the GAC, reboot your computer and try it again.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform