function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Subhrajyoti NathSubhrajyoti Nath 

Make lightning datatable inline edit field mandatory

How to make lightning datatable inline edit field mandatory ?
Or
How to make a field mandatory in lightning data table?
Nisar AhmadNisar Ahmad
You can trigger an error on a cell or multiple cells, which then turns the cell border red and displays a tooltip on the number column. The error messages appear when you hover over the tooltip. You must make the column editable. By making a column editable, the show-row-number-column attribute is always true and the number column is displayed.

Based on the first example on this page, add the errors attribute to your component.
Your lightning-datatable component should look like this.

HTML
<template>
    <lightning-datatable
        key-field="id"
        data={data}
        columns={columns}
        errors={errors}>
    </lightning-datatable>
    <lightning-button
        label="Trigger error"
        onclick={triggerError}>
    </lightning-button>
</template>
In this example, we are triggering the error with a lightning-button component.
Finally, define the errors and map them to fieldNames. When the error is triggered, the borders for the amount and contact cells turn red to represent the error state.

JavaScript
triggerError(event) {
           this.errors = {
                rows: {
                    b: {
                        title: 'We found 2 errors.',
                        messages: [
                            'Enter a valid amount.',
                            'Verify the email address and try again.'
                        ],
                        fieldNames: ['amount', 'contact']
                    }
                },
                table: {
                    title: 'Your entry cannot be saved. Fix the errors and try again.',
                    messages: [
                        'Row 2 amount must be number',
                        'Row 2 email is invalid'
                    ]
                }
            };
        }

More Detail: Click Me (https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation)

Thank You
- Nisar Ahmad

 
 
madhav sharma 1madhav sharma 1
租用自助式存储单元之前应了解的事项

从看不见您的Beanie Baby系列到缩小尺寸后再存储额外的家具,有很多原因可以租用自助存储单元。
但是,如果这是您第一次租用,那么您可能不知道存储业务的来龙去脉。我们在这里为您提供帮助。从单价到使用规则,我们将告诉您在虚线上签名之前需要了解的所有信息。
租用存储单元之前应了解的内容
自助存储设施提供短期和长期选择,以确保家庭,个人和商业商品的安全。
论您是在夏季存放东西的大学生,存储文件的小企业主还是正在等待施工的新房主,您都可以使用自助存储单元来存放自己的物品(无需诉诸诉求)到父母的地下室)。
在搬入所有物品之前,请在我们的初学者指南中回答您的自存储单元问题。

如何确定 迷你倉单位的成本?
为存储单元支付的费用将根据存储单元的大小以及计划存储物料的时间而有所不同。许多自存储设施提供按月合同,但是您可以通过签订更长的合同来获得折扣。
定价还取决于您的设备是在室内还是室外,是否可以开车入内以及是否需要气候控制。位置也是一个巨大的因素。预计华顿特区和纽约市等大城市的价格会上涨,而忙碌的小伙子们会获得更多预算友好的价格。
您如何将您的东西送到存储单元?
虽然您可以最大程度地利用马自达的后备箱空间,但我们建议您利用精选的自存储公司提供的免费卡车租赁服务。卡车租赁可让您一次装载大件物品,从而减少了进出单位的时间(和麻烦)。
您是否需要一个恒温存储单元?
虽然您所有的物品都可以从气候控制中受益,但对于服装和家具等物品而言,防止霉菌和霉菌的生长尤为重要。配备气候控制的存储单元,可保护您最珍贵的财产免受极端高温,寒冷和潮湿的影响,该存储单元全年可保持5580度的温度。

受气候控制的设备通常比标准存储要贵,但是额外的成本值得确保温度和湿度不会急剧上升或下降到足以损坏您的商品。
您可以在存储单元中工作吗?
使用柴灣迷你倉单位作为办公室可能很诱人,请不要使用。在存储单元中生活或工作是违法的,并且违反了租赁条款。
但是,您可以使用自己的设备存储文件并存储任何其他与业务相关的商品。此外,许多存储设施都设有现场商务中心,您可以在其中工作,打印文档和邮寄包裹。这是在黑暗,无窗的洞穴中进行的一项重大升级!
您需要为存储单元购买保险吗?
不太好玩的事实:存储公司不对您单位的内容负责。因此,如果发生闯入,洪水或上帝之举,公司无需支付或更换您的物品。因此,我们强烈建议您选择存储保险。
但是,在您购买存储设施提供的保险之前,请先与房主或房客保险核对,看看是否可以在保单中增加存储空间-甚至可以免费包括存储空间!
对于小型存储服务,您可以考虑- http://www.sunshinestorage.com.hk/ (http://www.sunshinestorage.com.hk/" style="color:#0563c1; text-decoration:underline)