How to make the gridweb cell is editable only when we double click on it

Hi Aspose,

I want to restrict the user to edit any Gridweb’s cell only when he double clicks on a particular cell.
But currently, When we select any cell and start editing it is accepting.

Please let me know which property I should set to disable this feature.

Hi,


We follow MS Excel’s standards and I think the behavior is same as MS Excel. When I select a cell in Ms Excel, I can start editing the cell.

In the current model of Aspose.Cells.GridWeb control, you may select a cell (first mouse click), then after a while, you may click on the active cell again and then you can start writing/editing the cell.

Thank you.

Hi Aspose,

Please let me know how to identify only the updated cells when the save button event is fired?

Thanks,
Mahesh

Hi,


If you want to save the data to database on the fly, you may use the data binding feature that GridWeb supports if it fits your needs, see the demos for reference:

Also the article(s):


Moreover, I think you may try to use and handle events like onCellUpdated event and perform whatever you want like , e.g retrieving cell value, authenticating validation errors or else etc. For further ref. please check the source code of "Client Side Scripting" demos in our online demos:

Related server-side, I am afraid there is no specific direct options or event which is directly fired after a cell is updated, The event like CellDoubleClick is there but you can use it to some extent.
See the topic for reference about server side events:

Thank you.

Hi Aspose,

Thanks for the reply and I’m using OnCellUpdated event to find out the updated cells and it worked well.

Currently I have a requirement “to set selected columns to readonly in GridWeb”. Please suggest me some idea on this.

Thanks
Mahesh

Hi,

Please see the code below how to make selected cells readonly.

C#


//Accessing the reference of the worksheet that is currently active

WebWorksheet sheet = GridWeb1.WebWorksheets[GridWeb1.ActiveSheetIndex];


//Setting all cells of the worksheet to Editable first

sheet.SetAllCellsEditable();


//Finally, Setting selected cells of the worksheet to Readonly

sheet.SetReadonlyRange(3, 2, 4, 1);


Please see the following document for your reference:

  1. Protecting Cells

Hi Aspose,

Thanks for the quick reply.

I have restricted the selected cells to ready only.

I need to implement an SQL paging to the ASPOSE Webgrid and I am unable to find any demo on this in your site. Please let me know if you have demo or article on this?


Thanks,
mahesh

Hi,


Regarding Paging, Aspose.Cells.GridWeb has its own Paging feature, you need to use GridWeb’s EnablePaging boolean property to set to “True”. See the sample featured demo:


Thank you.

Hi Aspose Team,

Thanks for the link. But, I don’t want to use the default paging provided by Aspose as I have already stated I need to implement SQL Paging.

Our current aspose web grid needs to fetch millions of records from DB. So If I go for default paging millions of records are fetched at a time from DB,cached and paging will be provided which will have impact on the performance.

Hence, to increase the performance our idea is to implement SQL paging, In which only specified set of records will be fetched and loaded in to the grid and when the next page is clicked then next set of records will be fetched from DB and displayed.

But the problem is, the default paging dropdown provided by aspose web grid will not be displayed when there are no records fetched required for more than one page.

Please provide me some idea on this.

When we fetch only limited records in the initial load of the grid, Please let me know how to calculate and set the paging dropdown for all the records which we will be fetching from the DB. So that when the next page is selected and I can fecth next set of records.

Thanks,
Mahesh



Hi,

We think you may try to use Data Binding feature provided by Aspose.Cells.GridWeb, refer to the demos in the section:
Moreover we recommend you to kindly try to use custom buttons and bind data from the db. We think you can customize your operation like the follow way:
e.g
1) Use custom buttons feature, the button should supply paging logic as well.
2) Once a button is called, rebind data to GridWeb accordingly.

Also, the control can provide a feature called GridWeb's form view feature that you may try to use:

Hi Aspose,

As suggested I have used the custom buttons to implement SQL paging in WebGrid.

But, When I move to the 2nd or 3rd page, I am getting below error message. Any idea on this?

"Item has already been added. Key in dictionary: ‘43008’ Key being added: ‘43008’
"



Thanks,
Mahesh

Hi,


Could you give us a sample project, zip it and attach it here to show the issue, we will check it soon.

Thank you.

Hi Amjad Sahi,

Our GridWeb is loading around 550 columns and 20 rows per page. But When I try to select any cell it is taking approximately 5 seconds to select the cell.

After selecting the cell, If I click on the cell to make it editable again this will take approximately 5 seconds to display the cursor on the cell.

Is this normal behavior when loaded so many column to the gridweb?
If not, Please let me know how to increase this performance or am I missing some settings.

Thanks
Mahesh

Hi,


Please create a sample project, zip and post it here to show the issue, we will check it soon.

Also, use our latest version v2.7.4.xxxx, you may download the latest version v7.1.2 (Aspose.Cells for .NET package) and install it.

Thank you.