We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Save to Sqlserver Database

1. I need to save edited values to sqlserver database on save button onclick event (Not meaning submit button in the command bar at the bottom) its the server side button outside the grid control

2. How to hide command bar at the bottom of grid completely.

Hi,

We think you are using GridWeb control.

1) We think if you want to save the data / updated data, you can use:
GridWeb1.WebWorksheets.SaveToExcelFile([Memory Stream])
So, the WebWorksheets can store data to a Stream. Now, you have to use your own code to update the data on the back end after saving the Excel workbook to Streams.

E.g

First you will create an Asp.NEt "button",
for the button's click event, store data to memory stream by calling the method: this.GridWeb1.WebWorksheets.SaveToExcelFile([Memory Stream])
then, store memory stream to database by using your own .NET code.
Also if you use your own Asp.Net button, then you have to add a line for the button to sink GridWeb's updated data/events, for example, you may add this line for the button into the Form_Load event:

if (!IsPostBack)

{

Button1.Attributes["onclick"] = "GridWeb1.updateData(); return GridWeb1.validateAll();";
}

2) You may try the methods of GridWeb, e.g

GridWeb1.ShowSaveButton = "false";
GridWeb1.ShowBottomBar = "false";
etc...


Thank you.