开发者

How to get access of a checkbox in a DataGrid.RowHeaderTemplate through datagrid object in Visual C# 2010 & WPF?

开发者 https://www.devze.com 2023-02-28 14:59 出处:网络
here is the portion of XAML --> 开发者_高级运维 </Grid> </GroupBox> <TextBox Height=\"32\" HorizontalAlignment=\"Right\" Margin=\"0,417,256,0\" Name=\"t

here is the portion of XAML --> 开发者_高级运维

        </Grid>
    </GroupBox>
    <TextBox Height="32" HorizontalAlignment="Right" Margin="0,417,256,0" Name="txtReason" VerticalAlignment="Top" Width="420" />
    <Label Content="Reason for release" HorizontalAlignment="Left" Margin="32,417,0,0" Name="label1" VerticalAlignment="Top" UseLayoutRounding="True" Width="109" />
    <Button Content="Remove" Height="23" HorizontalAlignment="Left" Margin="578,426,0,0" Name="btnRemove" VerticalAlignment="Top" Width="75" />
    <Label Content="No. of Users'" Height="28" HorizontalAlignment="Left" Margin="664,64,0,0" Name="label2" VerticalAlignment="Top" Width="83" />
    <Label Height="28" HorizontalAlignment="Left" Margin="744,64,0,0" Name="lblTotalUser" VerticalAlignment="Top" Width="72" />
    <Button Content="Count" Height="23" HorizontalAlignment="Left" Margin="666,151,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
</Grid>

I need to acess the dgCheck CheckBox through dgOnlineUsers datagrid?


I am not sure why, but i cannot seem to add a comment to your question...

My first question would be if you can post the XAML with the datagrid in it?

Second question: Why do you want to have (direct) access to your checkbox? most of the things I can think of are achievable using binding and a good implementation of a viewmodel. Can you elaborate on that?

Regards, Perry

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号