Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
Unbound field radio button select when calling InitializeRecord
posted

I have a XamDataGrid with several bound columns and one unbound column, a radio button column.  What I want to do when calling InitializeRecord is to set the radiobutton as selected for the first record added ( so there is at least one radiobutton selected ).  Here is the style template for the radiobutton:

<Style x:Key="rbInCellStyle" TargetType="{x:Type igDP:CellValuePresenter}">

<Setter Property="Template">             

<Setter.Value>   
<ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}" >             
<RadioButton GroupName="CellButton" HorizontalAlignment="Center" VerticalAlignment="Center" IsChecked="False" Click="RB_Click" />

</ControlTemplate>

</Setter.Value>

</Setter>

</Style>

Inside InitializeRecord, I do this for the other bound columns:

object typeValue = (e.Record as Infragistics.Windows.DataPresenter.DataRecord).Cells["PeakDefType"].Value;

        

string tempstr = typeValue.ToString();

            (e.Record as Infragistics.Windows.DataPresenter.DataRecord).Cells["TypeAsString"].Value = typeValue;

 

How do I do something similar for an unbound column?

 

Parents Reply Children
No Data