How to get the content of Textbox in Flexgrid's cells

Posted by: malishin on 7 January 2020, 6:12 pm EST

    • Post Options:
    • Link

    Posted 7 January 2020, 6:12 pm EST

    I want to get the text value of the textbox in flexgrid, how do I get it?

            <c1:C1FlexGrid x:Name="fg" HorizontalAlignment="Left" Margin="10,84,0,0" VerticalAlignment="Top" Height="325" Width="772">
                <c1:C1FlexGrid.Columns>
                    <c1:Column Header="Name"   Width="25*" Binding="{Binding Name}" IsReadOnly="True" HorizontalAlignment="Left" />
    
                    <c1:Column Header="Project Value" Width="25*">
                        <c1:Column.CellTemplate>
                            <DataTemplate>
                                <TextBox/>
    
                            </DataTemplate>
                        </c1:Column.CellTemplate>
                    </c1:Column>
    
                </c1:C1FlexGrid.Columns>
                <c1:C1FlexGrid.Rows>
                    <c1:Row></c1:Row>
                    <c1:Row></c1:Row>
                    <c1:Row></c1:Row>
                </c1:C1FlexGrid.Rows>
    
            </c1:C1FlexGrid>
    

    prj_FlexGridCellEditors(WPF).zip

  • Posted 7 January 2020, 6:31 pm EST

    Hi,

    You can use the C1FlexGrid indexers (that is fg[rowIndex,colIndex]) to access the cell value.

    Example: To get the cell value in second column and third row use:```

    var cellValue = fg[2,1];

    
    Thanks,
    Ruchir
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels