Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error running SP with string parameter
Message
From
19/05/2008 09:36:46
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01317461
Message ID:
01318105
Views:
8
Kevin,

The DataGridView binding is ok. I checked it carefully and did somne tests and found this:

I have the DataGridView object bound to the Biz object, and after Initialize I can call the "GetAllRows" method and it works fine so I get the grid populated with all rows form the databasse table.

But if after that I call the same metodo again (let's say using a any event like a combo SelectedIndexChanged and call the same "GetAllRows" method) I get the error that I reported earlier:

Please notice that I am using the same object method on the already bind grid that worked well just before.

So in order to be more cleara let me show you the code I used to run my test:

public CellDevicesListForm()
{
this.oCellDevice = (CellDevice)this.RegisterBizObj(new CellDevice());
InitializeComponent();
this.oCellDevice.GetAllCellDevices();
this.dgvCellDevices.AutoGenerateColumns = false;
}

private void tscTCellDeviceTypeName_SelectedIndexChanged(object sender, EventArgs e)
{
this.oCellDevice.GetAllCellDevices();
}

Note: When I run the application the form shows the grid with all my rows. After that I change the selection in the combo box just to generate the event.

When the combo event code run I get the following error:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

and the stack trace is the one I already sent you.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform