Kevin Lingofelter
|
|
Group: Forum Members
Posts: 77,
Visits: 804
|
Hello, I am beating my brain trying to figure out what I did wrong. I am using an infragistics grid. I am setting the isListSource property to true in the BO and binding the BO to the grid. In the AfterRowUpdate event of the grid, I am calling BO.Save(); This works fine on another form. Records are added, deleted and modified just peachy, but on this one form, the save method gives me this error: "The CurrentRow could not be evaluated because the CurrentRowIndex is out of range. Business object record count: 1. CurrentRowIndex: -1." Does this error give you any clues as what I'm missing? Thanks!
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
Vince, Did you use an SF masked textbox for the telephone? If you did, make sure the BindingField property is set. I am sure that you already know this, but just in case, there are properties on a masked text box to determine whether or not you want to include the making characters in the save. This isn't your problem, just thought I would metion it. So check to make sure that you have the BindingField and BusinessObject properties set for the telephone. If you don't see those properties, then it is not an SF control . Let me know.
|
|
|
vblain
|
|
Group: Forum Members
Posts: 12,
Visits: 31
|
html>
1
|
2006-06-06 11:44:20.453
|
General Command Settings
|
Text
|
System.Data.SqlClient.SqlCommand
|
Data Source=SVRSQL1;Initial Catalog=DiscoverSuccess;User ID=**;Asynchronous Processing=True
|
False
|
Command Settings
|
INSERT INTO [dbo].[Location] ([LocationName], [Address1], [Address2], [City], [State], [Zip], [Telephone]) VALUES (@LocationName, @Address1, @Address2, @City, @State, @Zip, @Telephone);
SELECT [id] FROM [dbo].[Location] WHERE id = SCOPE_IDENTITY();
|
Command Parameters
|
'test' [DbType: String | Size: 100 | Direction: Input | SourceColumn: LocationName | SourceVersion: Current]
|
'test' [DbType: String | Size: 100 | Direction: Input | SourceColumn: Address1 | SourceVersion: Current]
|
'test' [DbType: String | Size: 100 | Direction: Input | SourceColumn: Address2 | SourceVersion: Current]
|
'test' [DbType: String | Size: 100 | Direction: Input | SourceColumn: City | SourceVersion: Current]
|
'te' [DbType: AnsiString | Size: 2 | Direction: Input | SourceColumn: State | SourceVersion: Current]
|
'12345-1234' [DbType: AnsiString | Size: 10 | Direction: Input | SourceColumn: Zip | SourceVersion: Current]
|
'(123) 123-1234' [DbType: AnsiString | Size: 14 | Direction: Input | SourceColumn: Telephone | SourceVersion: Current]
|
well the telephone is being passed now, but it's still hanging, the masked textbox are the SF MaskedTextBox. it just seems that the business object is not executing the statement. But i can even step through once i click save the app become unresponsive.
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
Hrm... what version do you have installed, Vince? 1.4.1 pre-release or 1.4? There could be an issue with the ListChanged event firing during the save (which causes the app to lock because the main thread is sleeping)... Do you have the business object on a grid using the BusinessBindingSource?
|
|
|
vblain
|
|
Group: Forum Members
Posts: 12,
Visits: 31
|
i'm using 1.4.1 currently, the form is just a basic maintenance form no grid, i dropped SF textbox for each fields
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
I'm checking right now, Vince to see if I can reproduce it.
|
|
|
vblain
|
|
Group: Forum Members
Posts: 12,
Visits: 31
|
in the sampl project provided, the Customer Maintenance Form does the exact same thing, when saving it just hangs
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
Does it only hang when you add a new record, or does it hang when you edit an existing record and save it?
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
I found it, Vince. I'm fixing it right now and I'll get you the install once I get it built.
|
|
|
vblain
|
|
Group: Forum Members
Posts: 12,
Visits: 31
|
you guys are awesome, can't get any better service then here
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
OK, Vince, fixed the problem and re-created the install. The latest version is available within the MyAccount area of the website and from https://www.strataframe.net/downloads/StrataFrame.zip. Basically, when the new PK was retrieved after an insert, the internal DataTable would raise its ListChanged event, and the business object would try to raise its property descriptor changed event (for 2-way binding) and the binding would try to refresh its value. But, the binding resides on the main thread, and the main thread is blocked while the update threads push the data to SQL Server, so the whole thing froze. Give that new install a shot
|
|
|
vblain
|
|
Group: Forum Members
Posts: 12,
Visits: 31
|
everything working 100%. Thank you again for your top of the line support.
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
That's what we're here for
|
|
|