The parameter value selected in row 1 should be displayed in the pop-up window.

patrick

Well-known member
Joined
Dec 5, 2021
Messages
248
Programming Experience
1-3
Hello.

C#.NET

1. I clicked on Row1.
2. The parameter value selected in row 1 should be displayed in the pop-up window.
===> How should I code? Example source please. I need an example code.

pro1.png


pro2.png
 
Row 1 of what?
Hello.
Thank you for your interest in my question and for responding.
Row1 of what?


Below is an MFC example.
C#:
            CTestDlg mDlg;
            mDlg.m_iValue = 5;
            mDlg.m_lValue = 481231273;
            mDlg.m_strValue = "Test";
            mDlg.DoModal();

C# should implement the same.
C#:
            CTestDlg mDlg = new CTestDlg();
            Col-1 Value = ABC;
            Col-2 Value = TEST;
            Col-3 Value = Popup;
            mDlg.ShowDialog();


Is it grammatical to change MFC to C#?
 
Last edited by a moderator:
You know this: post code in code tags. I've fixed up your post above.

The C# should look like the MFC but without the Hungarian naming convention. Also with some syntatic sugar to cut down on the verboseness:
C#:
var dialog = new TestDialog()
{
    IntegerValue = 5,
    LongValue = 481231273,
    StringValue = "Test"
};
dialog.ShowDialog();

without all that syntactic sugar and renaming the code would look just like the MFC code:
C#:
CTestDlg mDlg = new CTestDlg();
mDlg.m_iValue = 5;
mDlg.m_lValue = 481231273;
mDlg.m_strValue = "Test";
mDlg.ShowDialog();
 
Back
Top Bottom