FIX: ?? ???? ????? ??? "IndexOutOfRangeException" ??? ??????? ?????? ???????? SHIFT + ????? ??? ?????? ?? ???? ???? DataGrid ?? Visual Studio .NET 2002

?????? ????????? ?????? ?????????
???? ???????: 825031 - ??? ???????? ???? ????? ????? ??? ???????.
??? ????? ??? ???????. ????? "??? ??" ??? ??? ??????? ??? ????.
????? ???? | ?? ????

?? ??? ??????

???????

??? ??????? ?????? ???????? SHIFT + ????? ??? ?????? ?? ???? ???? DataGrid ?? ???? ?????. ??? ???? ??? ???????? ??? ????? ??? ??????? ' ReadOnly ' ?? ?????? ????? ?????? DataGrid ??? true. ???? ????? ???? ?????? ?? ????? ???? DataGrid.

?? ????? ????? ????? ???????:
System.IndexOutOfRangeException: ??? ?????? ???? ???? ??????.
?? System.Windows.Forms.DataGrid.ProcessGridKey (KeyEventArgs ke)
?? System.Windows.Forms.DataGrid.ProcessDialogKey (keyData ????????)
?? System.Windows.Forms.Control.PreProcessMessage (????? & msg)
?? System.Windows.Forms.ThreadContext.System.Windows.Forms.
UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage (MSG & msg)

????

??? ??? ???????? ??? ?????? ??? ???? ???? ???? ??????? Microsoft .NET Framework 1.0.????? ????? ?????? ??????? ?? "???? ??????? ?? Microsoft":

Microsoft .NET Framework 1.0 Service Pack 3

?????

???? Microsoft ?? ??? ????? ?? ?????? Microsoft ??????? ?? ??? "????? ???". ?? ????? ??? ??????? ???? ??? ?? Microsoft .NET Framework 1.0 Service Pack 3.

??????? ????

????? ????? ????? ???????

  1. ??? ????? Microsoft Visual Studio .NET.
  2. ?? ??????? ???? ??? ??? ???? ?? ???? ??? ???????.

    ???? ???? ?????? ????? ????.
  3. ??? ????? Project ? ???? ??? ?????? Visual Basic.
  4. ??? ????? ? ???? ??? Windows ?????.
  5. ?? ?????? ?????? ???? WindowsApplication1 ???? ???????.
  6. ???? ??? ?????.

    ???? ???????? ??? ????? ??? ????? Form1.vb ??? ??????? ??? ??? ?????? Visual Basic .NET.

    ???? ???????? ??? ????? ??? ????? Form1.cs ??? ??????? ??? ??? ?????? Microsoft Visual C# .NET.
  7. ???? ????? ??????? ??? DataGrid ?????? ???? ???? DataGrid ??? ??????? ???? ???? Form1.

    ?????????? ??? ????? ???? ?????? DataGrid ?????? DataGrid ??? ??????? ?????? Form1.
  8. ?? ????? ????? "?????" Form1 ???? ????? ??????? ??? ??????? ???? ???? Form1 ?? ?? ?????? ???????? ???????? ??????? ??? ????? Form1_Load:

    ????????? ???????? Visual Basic .NETdataTable DataTable ???? dataTable
    Dim dataTable As DataTable
    dataTable = New DataTable("TABLE")
    
    Dim col As New DataColumn()
    col.DataType = Type.GetType("System.String")
    col.ColumnName = "col1"
    col.DefaultValue = "000"
    'Add columns.  
    dataTable.Columns.Add(New DataColumn("Col1"))
    dataTable.Columns.Add(New DataColumn("Col2"))
    dataTable.Columns.Add(New DataColumn("Col3"))
    
    Dim myDataRow As DataRow = dataTable.NewRow()
    myDataRow(0) = "11111"
    myDataRow(1) = "22222"
    myDataRow(2) = "33333"
    dataTable.Rows.Add(myDataRow)
    
    DataGrid1.DataSource = dataTable.DefaultView
    DataColumn("Col2")) ???? (
    ????????? ???????? Visual C# .NETdataTable
    DataTable dataTable;
    dataTable = new DataTable("TABLE");
    
    DataColumn col = new DataColumn();
    col.DataType = Type.GetType("System.String");
    col.ColumnName = "col1";
    col.DefaultValue = "000";
    //Add columns.  
    dataTable.Columns.Add(new DataColumn("Col1"));
    dataTable.Columns.Add(new DataColumn("Col2"));
    dataTable.Columns.Add(new DataColumn("Col3"));
    
    DataRow myDataRow = dataTable.NewRow();
    myDataRow[0] = "11111";
    myDataRow[1] = "22222";
    myDataRow[2] = "33333";
    dataTable.Rows.Add(myDataRow);
    
    dataGrid1.DataSource = dataTable.DefaultView;
  9. ?? ??????? ????? ? ???? ??? ???? ????.
  10. ?? ??????? ????? ? ???? ??? ????.

    ???? ????? ???? Form1.
  11. ?? ?????? ?? ?? ???? ?? ???? ?????? ?? ???? ?????? DataGrid.
  12. ????? ???? ??????? ?? ???? ?????? DataGrid ???????? ?????? ???????? CTRL + A.
  13. ???? ?????? ???????? SHIFT + ????? ??? ??????.

    ?? ???? ????? ????? ???????? ?? ??? "?????? ?????" ??????.

?????

?????? ??? ???? ?? ?????????? ?? ?????? ???? ?????? Microsoft Network (MSDN) ?????? ??? ?????:

DataGrid ????? Windows
http://msdn2.microsoft.com/en-us/vbasic/ms789159.aspx
?????? ??? ??????? ??????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
320584?????? ?? ????? ????? ??? ??? ???????? ?? .NET ???????? Visual C# .NET

???????

???? ???????: 825031 - ????? ??? ??????: 02/???? ??????/1435 - ??????: 1.6
????? ???
  • Microsoft .NET Framework 1.0 Service Pack 2
  • Microsoft .NET Framework 1.0 Service Pack 1
  • Microsoft .NET Framework 1.0
????? ??????: 
kbnosurvey kbarchive kbmt kbnetframe100presp3fix kbctrl kbcontrol kbqfe kbhotfixserver kbfix kbbug KB825031 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????825031

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com