Login  
Search All Forums
Dart Home | PowerWEB LiveControls for ASP.NET | Custom Development Reply | PowerWEB LiveControls for ASP.NET Topics | Forums   
AuthorForum: PowerWEB LiveControls for ASP.NET
Topic: LiveGrid Example Disappears
matlihan
mehmet.atlihan@cmich.edu

From: Mount Pleasant, MI USA
Posts: 4
Member Since: 03/27/06
posted March 27, 2006 12:39 PM

Hello
I have just downloaded the power web controls and I am on VS 2003 EE. I walked through the LiveGrid Example that uses the Northwind database and I simply copied and pasted the provided code on a web form I created.
Then I run the application but when I click on the Edit button on the LiveGrid it disappears and the webform becomes unresponsive. Any ideas what is going on ?
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted March 27, 2006 7:04 PM

Hi,
It looks like the help is out-of-date.
You actually need to data bind each time an Edit button is pressed.

You could call DataBind("", ""), but that will cause a DB query each time.

Instead, you could persist the data server-side, like in a session variable.

For example, add the following line to the DataBind() function:
Session["myData"] = view;

Then add these two lines to the EditCommand event handler:
this.LiveDataGrid1.DataSource = (DataView)Session["myData"];
this.LiveDataGrid1.DataBind();

and it should work as expected.
Let me know if you still see problems.
Sorry for the confusion,
-ken
atlihanm
matlihan@gmail.com

From: Mount Pleasant, MI USA
Posts: 1
Member Since: 03/27/06
posted March 27, 2006 8:47 PM

Ken, thank you for your response , I later on realized the DataBind was missing in the code and I have it worked. Yet, like you sugggested, keeping the data in the memory seems to be a much better solution as opposed to roundtripping to database everytime.
For your information the help is outdated with regarding the way to set up the LiveGrid columns too. None of the stuff mentioned exists like LiveColumnEditor, LiveBoundColumn in the visual editor. Instead you set the column names by right clicking on the grid and selecting the property builder or using the property builder link under the property window just like you would normally do in a ASP.NET grid control. The column names are also same with the Data Column Names that are provided in the standard control with the exceptions of the additional columns (checkbox, dropdown). The reason that I am mentioning this is because the outdated information confused me at first, I have spent some time looking for a LiveColumnEditor and Special Column Names (LiveBoundColumn, LiveSelect, LiveDelete etc) under the property builder list until I looked in the generated HTML code.
Regards
Mehmet
 
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted March 29, 2006 5:38 PM

Hi Mehmet,
Thanks for the information,
-ken
Reply | PowerWEB LiveControls for ASP.NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX