Skip to Content
0

The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))

May 16, 2017 at 05:45 AM

350

avatar image
Former Member

Dear Sir,

When i am trying to type cast the sCol to combo type then its throws exception.

its working fine when sCol Value is upto 40 Charcter.

But more than that its not. And i want more than that.

if there is any solution please reply me asap.

its very urgent.

Code is attached below.

 public void Fill_Grid()
        {
            try
            {
                for (int i = 0; i < 5; i++)                 {                     string sCol = "aaaAbcaaaaaaaaaaaaaaaaaaaaaaaaaaggggggggggggggggggggggggggggggggaaaa";
                    string sColL = "[" + sCol + i + "]";                     oGrid.DataTable.Columns.Add(sColL, SAPbouiCOM.BoFieldsType.ft_AlphaNumeric, 200);                     if (i % 2 == 0)                     {                         SAPbouiCOM.GridColumn oColumn;
                        SAPbouiCOM.ComboBoxColumn oComboBoxColumn;
                        oColumn = (SAPbouiCOM.GridColumn)this.oGrid.Columns.Item(i);
                        oColumn.Width = 100;                         this.oGrid.Columns.Item(i).Type = SAPbouiCOM.BoGridColumnType.gct_ComboBox;                         try
                        {                             oComboBoxColumn = (SAPbouiCOM.ComboBoxColumn)this.oGrid.Columns.Item(i);
                            oComboBoxColumn.ValidValues.Add("A", "A");
                            oComboBoxColumn.ValidValues.Add("B", "B");                             oComboBoxColumn.DisplayType = SAPbouiCOM.BoComboDisplayType.cdt_Description;
                        }
                        catch { }
                    }
                    else { oGrid.Columns.Item(i).Type =SAPbouiCOM.BoGridColumnType.gct_EditText; }  
                }
            }
            catch (Exception e) { }
        }


untitled.png (20.3 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers