Posted 19 December 2023, 6:41 am EST - Updated 19 December 2023, 6:46 am EST
How to remove some locale options in locale dropdown
Posted by: loc.le on 19 December 2023, 6:41 am EST
-
-
Posted 20 December 2023, 2:14 am EST
Hi @Spreadjs team any update on this one
-
Posted 21 December 2023, 2:16 am EST
Hi,
I couldn’t find a way to remove the dropdown options using the SpreadJS APIs. I have escalated the issue to the concerned SpreadJS team for further research on how to remove the dropdown options from the locale. The internal tracking id for the same is: SJS-21976 . I will let you know when there is further info on this from the dev team.
As a workaround, you could use the following css to achieve the same:
/* Hide the ComboBox Items */ div[data-value="ja-jp"][data-text="Japanese (Japan)"], div[data-value="zh-cn"][data-text="Chinese (China)"], div[data-value="ko-kr"][data-text="Korean (Korea)"] { display: none !important; } /* Disable the ComboEditor */ .gc-format-editor .gc-combo-editor-container { pointer-events: none; /* Hide the Dropdown Button */ .dropdown-button { display: none; } }
Regards,
Ankit
-
Posted 3 January 2024, 12:49 am EST
Hi,
The devs have informed us that you could use the following internal method to remove the locale options in the format cells dialog:
// Override the getCultureInfoDict method var oldFn = GC.Spread.Common.CultureManager.getCultureInfoDict; GC.Spread.Common.CultureManager.getCultureInfoDict = function () { var cultureDic = oldFn.apply(this, arguments); return { "en-us": cultureDic['en-us'] }; }
Further, if you want do hide the dropdown button, you could use the css as mentioned in my earlier comment.
Regards,
Ankit