- Home
- Forum
- ASP.NET Web Forms
- Spreadsheet control queries
Spreadsheet control queries
Hello,
I have the following queries about the Spreadsheet control:
1. Disable menu
2. Add columns and rows disable
3. CRUD Database
4. Validations (allow some characters), validation of mandatory fields
5. Read only (Records), Lock cells read only
6. Print sheet
SIGN IN To post a reply.
1 Reply
JS
Janakiraman Sakthivel
Syncfusion Team
July 26, 2021 08:33 AM UTC
Hi Hector Mamani,
Thank you for contacting Syncfusion support.
Thank you for contacting Syncfusion support.
Query 1: Disable menu
We have checked your reported query. We can achieve your requirement using CSS style and added disabled property in File menu. Please refer below code snippets.
CODE SNIPPETS:
CODE SNIPPETS:
|
document.getElementsByClassName("e-apptabanchor")[0].classList.add("e-disabled");
<style> .e-spreadsheet .e-apptab {
pointer-events: none;
}
</style>
|
Query 2: Add columns and rows disable
We can achieve your requirement using RowCount and ColumnCount property. We set the row count to 20 and the column count to 10 in Spreadsheet. Please find the below code example.
CODE SNIPPETS:
|
<ej:Spreadsheet ID="Spreadsheet" RowCount="20" ColumnCount="10" AllowLockCell="true" runat="server">
<ClientSideEvents LoadComplete="loadComplete" />
<ScrollSettings Width="100%" Height="100%" IsResponsive="true" ScrollMode="Normal"/> |
Refer our UG documentation for your reference
Query 3: CRUD Database
We have CRUD option in spreadsheet. For more details, please refer the below link.
UG: https://help.syncfusion.com/aspnet/spreadsheet/open-and-save
UG: https://help.syncfusion.com/aspnet/spreadsheet/open-and-save
Query 4: Validations (allow some characters), validation of mandatory fields
In our spreadseet, we have support for data validation. And we added validation for the range A1: A4 in the sample. Please find the below code example.
CODE SNIPPETS:
CODE SNIPPETS:
|
this.XLValidate.applyDVRules("D2:D12", ["Greater", 15], "number", true, true); |
Query 5: Read only (Records), Lock cells read only
In our spreadsheet, You can restrict/prevent the editing in the specified range. You can use AllowLockCell property to enable/disable the lock cell. For more details, please refer the below link. In the sample, we locked cells in the range A1:A5.
CODE SNIPPETS:
|
this.lockCells("A1:A5", true);
this.protectSheet(true);
|
Refer our UG documentation for your reference
Query 6: Print sheet
In our spreadsheet, You can use AllowPrinting property in PrintSettings to enable/disable the print operation. Using this option, you can print the entire sheet or a specific section.
Refer our UG documentation for your reference
UG: https://help.syncfusion.com/aspnet/spreadsheet/print
UG: https://help.syncfusion.com/aspnet/spreadsheet/print
For your reference, we have prepared sample based on your queries. Please find the sample link below.
Sample link: https://www.syncfusion.com/downloads/support/forum/167473/ze/SyncfusionASPNETApplication1-903441393-1912695525
Could you please check the above link and get back to us, if you need any further assistance on this.
Regards,
Janakiraman S.
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
HM Hector Mamani
- Jul 21, 2021 01:24 PM UTC
- Jul 26, 2021 08:33 AM UTC