WebBusinessBindingSource and method add


Author
Message
Olivier
Olivier
StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)
Group: StrataFrame Users
Posts: 96, Visits: 806
Hello,

I use the Telerik RadGrid for a long times , only readonly view.

I have a question about a good way, my grid is link with WebBusinessBindingsource
and it's work very well.

I have a button in my WebForm to Add a record, when i start
This.MyBo.Add()
This.MyRadGrid.Databind();

The grid contain my old Fill Data on my Businessobject.

How can i get a empty grid when i want to add a record.

i hope to be explain.

Thanks
Olivier,

==============================================
Asp.net C# - Strataframe - telerik
==============================================
Edited 12 Years Ago by Olivier
Replies
Olivier
Olivier
StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)StrataFrame User (430 reputation)
Group: StrataFrame Users
Posts: 96, Visits: 806
Hello Ben,

It's really strange, cause i fill
in the page_load and i use ! Page.IsPostBack

if (! Page.IsPostBack) {
   LoadDetail(Convert.ToInt32(cMAN_ID));
   this.SetButtonState();
}


in my button New i had already clear before add()

and before add i same put this :  this.MyBo.MyCustomFillData("myfield","man_id=-1");
to get no record.

Have you an another idea ?

thanks
Olivier,

==============================================
Asp.net C# - Strataframe - telerik
==============================================
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
If the business object is on the ApplicationBasePage, then it's stored in a session variable, so as soon as possible during the load, the business object is pulled from the session variable, so it's not a new business object on each page load.  If you put a clear at the top of the load, then do an Add() in an event handler, then it's possible you're clearing the business object, then it's set back to the one stored in the session variable, then the event handler is called.  

You might have to put Clear() at the very top of the event handler that is calling your Add().
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search