This is a migrated thread and some comments may be shown as answers.

How to Show Cursor in Newly Added Record

3 Answers 56 Views
GridView
This is a migrated thread and some comments may be shown as answers.
vikas gupta
Top achievements
Rank 1
vikas gupta asked on 24 Nov 2011, 07:07 AM
i want to show cursor into 1st column when i click on the new button and
 grid contain a check box ,
When new record is added, the Active checkbox is not displayed. Please make sure it is displayed with DEFAULT: checked (active=True)

Grid html

  <Grid>       
        <UI:ModuleControl x:Name="mdUser"
                          Title="Users"
                          Margin="8,0" VerticalAlignment="Top">
            
            <UI:MaestroGridView x:Name="grdUsers" 
                                Margin="0 8 0 0" AutoGenerateColumns="False" IsReadOnly="True" 
                         Height="460"
                >
                <UI:MaestroGridView.Columns >
                    <telerik:GridViewDataColumn Header= "User Name"
                                                HeaderTextAlignment="Center"
                                                DataMemberBinding="{Binding appusers_id}"
                                                Width="220"  IsVisible="False"/>
                    <telerik:GridViewDataColumn Header= "User Name"
                                                HeaderTextAlignment="Center"
                                                DataMemberBinding="{Binding appuser_name}"
                                                Width="220" />
                    <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding approle_id}"
                                    UniqueName="Roles"
                                                    IsComboBoxEditable="True"
                                                    Header= "Roles"
                                    SelectedValueMemberPath="approle_id"
                                    DisplayMemberPath="approle_name" />
                  
                    <telerik:GridViewDataColumn Header="Active"
                                                HeaderTextAlignment="Center"
                                                DataMemberBinding="{Binding IsActive}"
                                                Width="100" />
                </UI:MaestroGridView.Columns>
            </UI:MaestroGridView>
            


        </UI:ModuleControl>
        
    </Grid>

   Private Sub tbUserManagement_ButtonNewClicked(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbUserManagement.ButtonNewClicked
        grdUsers.IsReadOnly = "False"
        Me.grdUsers.BeginInsert()
    End Sub


please reply soon

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 24 Nov 2011, 08:42 AM
Hi Vikas Gupta,

Generally, when you insert a new item, the cursor will be positioned in the column it has been previously. IF you want it to be always in the first column, you can set CurrentColumn property of the grid to Columns[0] in the Click event handler. You can take a look at this forum thread for a reference.
 

Kind regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
vikas gupta
Top achievements
Rank 1
answered on 24 Nov 2011, 08:57 AM
Thanks Maya,

please tell me how i can make check box active by default( the Active checkbox is not displayed. Please make sure it is displayed with DEFAULT: checked (active=True)
)
0
vikas gupta
Top achievements
Rank 1
answered on 24 Nov 2011, 10:13 AM
how to set default value of the column when we add new  record.
Tags
GridView
Asked by
vikas gupta
Top achievements
Rank 1
Answers by
Maya
Telerik team
vikas gupta
Top achievements
Rank 1
Share this question
or