Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
20415 | Oct 17,2004 09:43 PM UTC | Oct 19,2004 05:33 AM UTC | WinForms | 3 |
![]() |
Tags: Grouping |
private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) { if(e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell || e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell) { GridTableDescriptor td = this.gridGroupingControl1.TableDescriptor; GridRecordRow rec = e.TableCellIdentity.DisplayElement as GridRecordRow; if(rec != null) { DataRowView drv = rec.GetData() as DataRowView; if(drv != null && drv["AAs"].ToString() == "AA4") { e.Style.ReadOnly = true; } } } }
Private Sub gridGroupingControl1_QueryCellStyleInfo(sender As Object, e As GridTableCellStyleInfoEventArgs) If e.TableCellIdentity.TableCellType = GridTableCellType.RecordFieldCell Or e.TableCellIdentity.TableCellType = GridTableCellType.AlternateRecordFieldCell Then Dim td As GridTableDescriptor = Me.gridGroupingControl1.TableDescriptor Dim rec As GridRecordRow = e.TableCellIdentity.DisplayElement '' If Not (rec Is Nothing) Then Dim drv As DataRowView = rec.GetData() '' If Not (drv Is Nothing) And drv("AAs").ToString() = "AA4" Then e.Style.ReadOnly = True End If End If End If End Sub ''gridGroupingControl1_QueryCellStyleInfo
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.