Delphi Dünyası Facebook'ta

Kodbank İndir

! CODEBANK 2012 !

İNDİRMEK&DETAYLI BİLGİ ALMAK İÇİN BURAYI TIKLAYINIZ.

Gönderen Konu: UpdateCommand  (Okunma sayısı 1597 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı kamuran48

  • Delphi 1 Level 5
  • *****
  • İleti: 48
  • Rep: +1/-1
UpdateCommand
« : 05 Mayıs 2006 15:54:01 »
selam,
datagridle ilgili örnekte verdiğiniz kodu updatecommand bölümüne yazdığımda aşağıdaki hatayı alıyorum.
Kod: [Seç]
Server Error in '/Yazıcı2/veremsavas' Application.
--------------------------------------------------------------------------------

Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

Source Error:


Line 84: txt2:=TextBox.Create;
Line 85:
Line 86: TXT1.Text :=(dataGrid1.DataKeys[e.Item.ItemIndex]).ToString;
Line 87: txt2 := (e.Item.Cells[2].Controls[0]) as TextBox;
Line 88:
 

Source File: C:\Inetpub\wwwroot\veremsavas\cevap.pas    Line: 86

Stack Trace:


[ArgumentOutOfRangeException: Index was out of range.  Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.Collections.ArrayList.get_Item(Int32 index) +91
   System.Web.UI.WebControls.DataKeyCollection.get_Item(Int32 index) +10
   cevap.TWebForm2.DataGrid1_UpdateCommand(Object source, DataGridCommandEventArgs e) in C:\Inetpub\wwwroot\veremsavas\cevap.pas:86
   System.Web.UI.WebControls.DataGrid.OnUpdateCommand(DataGridCommandEventArgs e) +109
   System.Web.UI.WebControls.DataGrid.OnBubbleEvent(Object source, EventArgs e) +507
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
   System.Web.UI.WebControls.DataGridItem.OnBubbleEvent(Object source, EventArgs e) +106
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +121
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +115
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain() +1277

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
iyi çalışmalr.

Çevrimdışı kamuran48

  • Delphi 1 Level 5
  • *****
  • İleti: 48
  • Rep: +1/-1
Ynt: UpdateCommand
« Yanıtla #1 : 05 Mayıs 2006 16:03:35 »
çözdüm sorunu.cevap vermnize gerek kalmadı.iyi çalışmalr.