hierachal grid CommandCellClick?

6 posts, 0 answers
  1. Tim
    Tim avatar
    54 posts
    Member since:
    Apr 2007

    Posted 08 May 2008 Link to this post

    Scenario:
    I have a grid that shows student names etc. It has a child grid that lists all the tests for that particular student.  The parent grid has CommandCellColumn where the user can launch a report that has a summary of all the students tests, the child grid has a CommandCellColumn that launches a report for the individual test.

    Problem:
    You click on the 'Print Summary' button on the parent grid, it launches the report, view the report, close the report window. Everything is fine. Click on the 'Print Results' button in the child grid, view the report, close the window. It will close the window, the will open the same window again.  You close the newly opened window, and after closing that one, it won't happen again.  I'm guessing that since I'm usign the Form.ShowDialog() to open the report windows, its holding the sencond window back for whatever reason.  I don't know why, but the child grid always opens a second form.

    I tried to put some flags in the event the stop the code from executing twice, but it didn't work.

    The Code:

    private

    void grvStudentTestResults_CommandCellClick(object sender, EventArgs e)
    {
            if (stop == 0)
            {
                stop = 1;
                
    GridCommandCellElement element = sender as GridCommandCellElement;
                if (element.ColumnInfo.HeaderText == "Testing Summaries")
                {
                        frmResults frm = new frmResults(Convert.ToInt32(element.RowInfo.Cells["StudentID"].Value));
                    frm.ShowDialog();
                    stop = 0;
                 }
                 else if (element.ColumnInfo.HeaderText == "Print Results")
                 {
                        frmResults frm = new frmResults(Convert.ToInt32(element.RowInfo.Cells["StudentID"].Value), element.RowInfo.Cells["TestCode"].Value.ToString());
                        frm.ShowDialog();
                        stop = 0;
                    }
            }
    }

  2. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 10 May 2008 Link to this post

    Hello Tim,

    Thank you for the detailed description.

    Unfortunately, I have not managed to reproduce the issue locally. Please send me a small example project that demonstrates this behavior. It will help me address any potential issue faster.

    I'm looking forward to your response.

    Greetings,
    Martin Vasilev
    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. Susanna
    Susanna avatar
    7 posts
    Member since:
    Jun 2012

    Posted 26 Mar 2010 Link to this post

    Hello, I have the same problem running the Q1 2010 version.

    In a child grid I have a command column that launches a separate form with ShowDialog. When i close that dialog the CommandCellClick-event fires a second time and the dialog opens up a second time.
  5. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 31 Mar 2010 Link to this post

    Hi Carl,

    Thank you for contacting us.

    I tried a similar scenario with the latest release Q1 2010, but I am still not able to reproduce the described issue. This makes me think that it could be caused by something specific in your project. Please, open a new support ticket and send me a small sample application which demonstrates it. This will help me to investigate the issue and provide you with further assistance.

    Regards,
    Martin Vasilev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Wade Ballance
    Wade Ballance avatar
    2 posts
    Member since:
    Feb 2010

    Posted 24 Jul 2010 Link to this post

    This is a major source of my frustration with Telerik. Too much "I can reproduce it, it must be you fault" There are many instances where the GridView fires events twice. Unless some actually codes calls the CommandCellClick() event in their code, how is it possible that is our fault if a user clicks just once and the event fires twice. I have always having to find crazy ways to set flags to prevent this type of stuff from happening. Unlike other vendors, Telerik does not seem to ever want to interface directly with the users and actually see this stuff go on. I have very unhappy clients because of GridView bugs. I take the time to carefully isolate them to be sure it not my code so I know it is not me doing this. It is the grid. They were released before they were ready from prime time at the detrimient of the people you sold them too.

    For the record, here is how I do that.

    int command_row= -1;

     

    void GridViewCurrency_CommandCellClick(object sender, EventArgs e)

     

    {

     

        GridCommandCellElement cell = (GridCommandCellElement)sender;

     

     

        int i = cell.RowIndex;

     

     

        if (command_row == i)

     

     

            return;
        else

     

            command_row = i;

     

    }

    Unfortunately, if you have a need to click the button a second time on the row, you will have a problem. I am doing with a delete button in each row that validates if a row can be deleted. The message box was show twice because of the gridview bug so this is a limited workaround.

     

  7. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 29 Jul 2010 Link to this post

    Hello Wade,

    Thank you for contacting us.

    I am sorry to hear your negative feedback. I would like to share some information with you on how things are working and what we actually mean to say when you see "I can't reproduce it. Please send a sample project".

    When we receive a ticket we do what is necessary to prepare a test case following the supplied information. However, not all issues can be reproduced under all the possible scenarios where a certain functionality should be used. Therefore, we may miss the case where the issue occurs. When we say that an issue can be caused by something specific in your project, we do not actually mean that the issue is caused by wrong implementation in your project. We just want to say that your specific user case (consider it a test case) is the context which we need to locate and address the issue that we have in our code. Without the information which a sample project gives, we may not be able to create the appropriate test conditions. That said, a sample project is the fastest way for us to detect, trace and solve the possible issues. Since such a project is worth a thousand words, it will save both sides time which otherwise will be spent in replies explaining what has been done and what should be done in order to reproduce an issue.

    In regards to the current case, I am attaching a sample project which I created while trying to reproduce the described issue. Despite my efforts, the behavior that I got was correct. Please also find attached a movie which I shot to demonstrates the behavior on my side.

    I hope you find this information useful. Should your problem still persists, please provide us with additional details about your case.

    Greetings,
    Stefan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for WinForms is Visual Studio 2017 Ready