Hi Patrick,
Thank you for contacting Syncfusion support,
We
have analyzed your query. You can use IsReadOnly property in Visiblecolumn.
Please refer the below code snippet to achieve your requirement.
Code
snippet[C#]:
<syncfusion:GridDataVisibleColumn MappingName="Status" IsReadOnly="{Binding Path=IsChecked,ElementName=checkbox}" AllowSort="False" HeaderText="Status"> |
We
have prepared a sample based on your requirement and you can download it from
below location,
Sample Location: GridDataControl_checkbox_IsReadOnly.zip
Please
let us know if this sample helps you,
Regards,
Saravanan.M
Hi Patrick,
Thanks for your update,
Regarding
Query1:
We have analyzed your query. If you want to apply ReadOnly property for cell based on the business object (IsReadOnly), you need to hook QueryCellInfo event. Where you can set the ReadOnly property for cell based on your business object value. Please refer the below code snippet
Code snippet[C#]:
this.syncgrid.Model.QueryCellInfo
+= Model_QueryCellInfo; void
Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e) { . . if ((bool)value) { e.Style.GridModel[e.Style.RowIndex,e.Style.ColumnIndex].ReadOnly = true; } } |
Regarding
Query2:
If you don’t want to apply conditional format for whole row,
you need to use ApplyStyleToColumn API. Please refer the below code snippet.
<syncfusion:GridDataControl.ConditionalFormats> <syncfusion:GridDataConditionalFormat ApplyStyleToColumn="Status"> |
We have prepared a sample based on your requirements and you can download it from below location,
Sample Location: GridDataControl_checkbox_IsReadOnly_Modified.zip
Please let us know if this sample helps you,
Regards,
Saravanan.M
Hi
Patrick,
Thank
you for your update. Please let us know if you need further assistance.
Regards,
Saravanan.M