Hi,
If the row is matching a specific condition (datacell value to some constant value) then these row should be selected otherwise not.
Please let me know, how to achieve this?
Thanks,
Ganesh.
Hey Ganesh,
Lets take a step back so I can understand exactly what you are trying to achieve. Your initial post (and perhaps Trausti's response may have skewed my interpretation), seemed to indicate that you wanted the header checkbox to select all the rows that matched a particular value. Based on that understanding, I recommended setting the HeaderCheckBoxSynchronization to None to keep the cell values from being automatically synchronized to match the state of the header checkbox.
Since you are looking for synchronization, it seems that my initial understanding was incorrect.
In regards to the expansion indicator, you can change the grid.DisplayLayout.Override.ExpansionIndicator property to 'CheckOnDisplay' so the grid checks for child rows when it displays the parent row.
Chris
And also how to take off the expand(+) button for those who don't have the child records.
Ganesh
Thanks Trausti, that done the trick to make rows data readonly with enabling checkbox column.
coming back to checkbox stuff.
The header checkbox is not working on first click and also not getting sinchronized with checkboxes in column.
I had refered the below post but still no success.
http://forums.infragistics.com/forums/p/55436/285084.aspx
Can you please advice?
I may be not understanding your question correctly, but I think you want to enable one field while all other are disabled. If this is correct, then you can set the CellActivation on column level:
Private Sub grd_InitializeLayout(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles grd.InitializeLayout Dim band As UltraWinGrid.UltraGridBand Dim col As UltraWinGrid.UltraGridColumn
band = e.Layout.Bands(0)
For Each col In band.Columns If col.Key = "MyCol" Then col.CellActivation = UltraWinGrid.Activation.AllowEdit Else col.CellActivation = UltraWinGrid.Activation.Disabled End If Next End Sub
If you then want to enable\disable the cell based on a value in the row, then you can do that in InitializeRow:
Private Sub grd_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles grd.InitializeRow If e.Row.Cells("MyCol").Value = "1" Then 'Disable based on a value e.Row.Cells("MyCol").Activation = UltraWinGrid.Activation.Disabled End If End Sub
Trausti
Many Thanks Trausti and Chris.
It worked for me.
Having one more problem
How to enable checkboxes with readonly datarow.
I have tried with allowupdate but it is enabling the data on row editable.
Please let me know any other precise solution for it.