Datasource won't delete or update (but will insert)

Posts   
 
    
worldspawn avatar
worldspawn
User
Posts: 321
Joined: 26-Aug-2006
# Posted on: 12-Feb-2008 04:57:40   

Hi folks,

I have this ASPxGridView which is working fine. When I put it in a ASPxPageControl (a tab control) it will not update or delete, but will insert.

If i move it outside of the page control it work fine.

I've been debugging what's happening when I attempt to delete and followed it up to LLBLGenProDataSourceView2.ExecuteDelete

The opening if statement is returning true (source code courtesy of Lutz)

protected override int ExecuteDelete(IDictionary keys, IDictionary oldValues) { if (((this._adapterToUse == null) || (this._containedCollection == null)) || (this._containedCollection.Count <= 0)) { return 0; }

The if succeeds and zero is returned. This occurs because this._containedCollection.Count is zero.

Does anyone have an idea about why this is happening? Most likely it's state related, I have had other state problems in conjunction with callbacks but resolved them by setting the cachelocation for the datasource to Session.

I can't seem to spot where _containedCollection is supposed to be populated in the delete operation, only place I've found is LoadState... but I'm at my limit of understanding now... [disappointed ]

Love how devexpresses own controls are incompatible with one another... another day, another 4 hrs wasted on devexpress sigh

worldspawn avatar
worldspawn
User
Posts: 321
Joined: 26-Aug-2006
# Posted on: 12-Feb-2008 06:05:00   

Setting the CacheLocation back to ViewState (instead of session or cache) resolves this problem, but of course then all the other problems with the grid and callbacks come into effect...

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 12-Feb-2008 11:26:40   

Also reading the following thread leaves you no choice disappointed http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=12322

Just to confirm: Are you saying that issue only occur if you the LLBLGenProDataSource.CacheLocation is set to Session AND The ASPxGridView is in a ASPxPageControl?

worldspawn avatar
worldspawn
User
Posts: 321
Joined: 26-Aug-2006
# Posted on: 13-Feb-2008 00:44:13   

Hi Walaa,

yes the issue only appears with the cachelocation is not viewstate (session or cache) AND the aspxgridview is inside an aspxpagecontrol tab. If i take it out of the tabcontrol there is no problem at all.

I've worked around this by using AjaxControlToolkit's tab control. It's free and it works and only took me 10 minutes to make it look the same as devexpress. I think it's my goal to phase out all devexpress crap and get back to coding features instead of workarounds.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 13-Feb-2008 09:43:48   

Glad you've worked it out. I'm using AjaxToolKit Tab Control too. Nice free stuff simple_smile