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

RadGridView not inserting a new row in the underlying datasource

1 Answer 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
John Seifert
Top achievements
Rank 1
John Seifert asked on 31 May 2011, 03:22 PM
Hi,

I am using netTiers as my data access layer and am on the April 2011 version of the Telerik controls.

After upgrading to the latest version of Telerik the update of the underlying datasource no longer works properly.  When I attempt to insert a new record into my grid the last row of the grid gets updated instead of a new row being created.

The grid has two columns which are drop down lists when editing.
 

 // Here is the only setting up of the grid that is done
 // the grid is bound to the object m_GroupAssignList

 public frmUserSecurity()
 {
     InitializeComponent();
     // Get business objects
     // Not shown
           
     (UserGrid.Columns["UserName"] as GridViewComboBoxColumn).DataSource = m_UserList;
     (UserGrid.Columns["UserName"] as GridViewComboBoxColumn).ValueMember = "UserName";
     (UserGrid.Columns["UserName"] as GridViewComboBoxColumn).DisplayMember = "UserName";

     (UserGrid.Columns["SecurityGroup"] as GridViewComboBoxColumn).DataSource = m_GroupList;
     (UserGrid.Columns["SecurityGroup"] as GridViewComboBoxColumn).ValueMember = "SecurityGroupId";
     (UserGrid.Columns["SecurityGroup"] as GridViewComboBoxColumn).DisplayMember = "Description";

     UserGrid.DataSource = m_GroupAssignList;
 }

 I have also tried to manually add the row to the grid but the same issue exists:

 
private void UserGrid_UserAddingRow(object sender, GridViewRowCancelEventArgs e)
{
    e.Cancel = true;
    UserGrid.Rows.Add(Id, UserName, SecurityGroupId);
}

Any advice?

 

1 Answer, 1 is accepted

Sort by
0
Svett
Telerik team
answered on 03 Jun 2011, 08:34 AM
Hello John,

Please find the answer of your forum post in the support ticket: "GridView update of the underlying datasource no longer works properly".

All the best,
Svett
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
Tags
GridView
Asked by
John Seifert
Top achievements
Rank 1
Answers by
Svett
Telerik team
Share this question
or