>>
>>Specified argument was out of the range of valid values. Parameter name: value
>>
>
>Which line does this fail on?
>
>>The weird thing is that I *always* reload the data the same way. So if the data was changed should have absolutely no effect on the databinding. The method does this:
>>
>
>Strange. It kind of sounds like you're attempting to retrieve the value you just deleted at some point. But, if you're refreshing the data before binding, that shouldn't happen, should it? Could something be firing in a different order than expected?
Not really. The code is in a single method, so I can see it all happening. In the debugger I check all the values - it's all fine, but it fails on DataBind().
I ended up not databinding but rather just Adding the items manually and that worked fine.
I hate stuff like this and it seems to be happening with some regularity. These bugs that rae buried deep in the ASP.Net runtime somewhere with no clue what's failing. Costs soooooo much wasted time...
+++ Rick ---
>
>Could it be weird data?
>
>
>>
>>private void btnAdd_Click(object sender, System.EventArgs e)
>>{
>> int SortOrder = 0;
>> try
>> {
>> Int32.Parse(this.txtSortOrder.Text);
>>
>This probably has nothing to do with your problem, but shouldn't you be assigning the result of the above line to SortOrder?
>
>eg.
>
>
> {
> SortOrder = Int32.Parse(this.txtSortOrder.Text);
> }
>