Click here to Skip to main content
14,668,434 members
Rate this:
Please Sign up or sign in to vote.
See more:
private void Form1_Load(object sender, EventArgs e)
            axMSFlexGrid1.FixedCols = 0;
            axMSFlexGrid1.FixedRows = 0;
            axMSFlexGrid1.Rows = 5;
            axMSFlexGrid1.Cols = 5;
            for (int i = 1; i <= 5; i++)
                for (int j = 1; j <= 5; j++)
                    axMSFlexGrid1.set_ColWidth(j-1, 600);
                    axMSFlexGrid1.set_RowHeight(i-1, 600);
                    axMSFlexGrid1.Col = j - 1;
                    axMSFlexGrid1.Row = i - 1;
                    axMSFlexGrid1.Text = j.ToString();

Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

I install MSFlexGrid as follow:

In your project's solution explorer:

Right-click on References
Select Add Reference
Select the COM tab
Scroll down to and select Microsoft FlexGrid Control, click OK

In your Toolbox:

Right-click anywhere & select Choose Items...
Select the Comm Components tab
Check the checkbox next to Microsoft FlexGrid Control, click OK

You can now use it like any other control in your project, find it in the General section of your Toolbox.

Thanks for answer
Updated 19-Apr-12 1:47am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

have registered MSFlexGrid control.

Try it using regsvr32.exe
Amir-Mar2012 19-Apr-12 7:52am
Excuse me Can you explain how to register MSFlexGrid with regsvr32.exe
Lakamraju Raghuram 19-Apr-12 9:06am
On the Visual studio command prompt, type regsvr32.exe FULL_PATH_OF_MSFlexGrid.dll"
That's it

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100