Crash with SP2

4 posts, 0 answers
  1. johns
    johns avatar
    20 posts
    Member since:
    Jul 2007

    Posted 24 Oct 2007 Link to this post

    This thread seems to have disappeared.  Is there a fix as the work around you posted does not prevent the crash.

    From: telerik
    Date: 10/17/2007 10:31:13 AM
    Hello John,

    Thank you for contacting us. This behavior will be corrected for the upcoming release.

    The issue you are experiencing is caused when items are added in a BeginUpdate / EndUpdate block. In your case that happens when the datasource is changed. For the time being, please, move the line:

    radGridView1.DataSource = m_dataTable;

    after the following line:

    radGridView1.GridElement.EndUpdate();

    If you have any additional questions, please do not hesitate to contact us.

    Sincerely yours,
    Evtim
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center




    From: johns
    Date: 10/17/2007 9:54:37 AM

    I've had some code that binds a grid to a DataTable.  Periodically the DataTable is rebuilt and fields are added or removed based on what is available from a query.  I've distilled the crash to the following code.  This used to work fine prior to upgrading to SP2.  Is there somthing I am overlooking or is there a bug in the new RadGridView.

    public partial class Form1 : Form

     

    {

    public Form1()

    {

    InitializeComponent();

    }

    private void radButton1_Click(object sender, EventArgs e)

    {

    radGridView1.GridElement.BeginUpdate();

    radGridView1.DataSource = null;

    radGridView1.MasterGridViewTemplate.Columns.Clear();

    radGridView1.Rows.Clear();

     

    // Rebuild DataTable and Grid based on changes

     

    GridViewTextBoxColumn column1 = new GridViewTextBoxColumn("C1 Text");

    column1.DataField = "C1 Text";

    column1.Width = 90;

    GridViewTextBoxColumn column2 = new GridViewTextBoxColumn("C2 Text");

    column2.DataField = "C2 Text";

    column2.Width = 130;

    column2.DataType = typeof(DateTime);

     

    radGridView1.MasterGridViewTemplate.Columns.Add(column1);

    radGridView1.MasterGridViewTemplate.Columns.Add(column2);

    /*

    *..... Add other Fields to Table and Grid based on available Data.

    */

     

    m_dataTable.Clear();

    m_dataTable.Columns.Clear();

    m_dataTable.Columns.Add("C1 Text", typeof(String));

    m_dataTable.Columns.Add("C2 Text", typeof(DateTime));

     

    radGridView1.DataSource = m_dataTable;

    radGridView1.GridElement.EndUpdate();

    radGridView1.Update();

     

    }

    DataTable m_dataTable = new DataTable("TheData");

    }





  2. Vassil Petev
    Admin
    Vassil Petev avatar
    1765 posts

    Posted 24 Oct 2007 Link to this post

    Hello johns,

    In your first ticket you mention that the problems are in the SP2. I suppose you mean Q1 SP2? There are some issues in this version and that is why we suggest you to upgrade to Q2 SP1 version. If you still have troubles after upgrading, please, create a simple project and send it to us for analysis.

    Your previous post was been moved to the support area to enable attachments. Feel free to use it for sending the files.


    Best wishes,
    Rob
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. johns
    johns avatar
    20 posts
    Member since:
    Jul 2007

    Posted 24 Oct 2007 Link to this post

    Sorry, this applies to the very latest version Q2, SP1.
    The code in the first post reproduces the problem.  If you still need a project I will put one together.
  5. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 28 Oct 2007 Link to this post

    Yes, johns, we would prefer to see your project. We did fix a similar issue with Q2 SP1, but we would like to check whether you have not stumbled on something else. 

    Thanks in advance.
     

    Sincerely yours,
    Evtim
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top