1
Reply

Want to fetch data from Gridview to varible for Update event

milan dhore

milan dhore

Aug 24 2010 12:02 PM
2.2k
hi
I want to fetch  different data  parameters from Gridview  to following varible ,and use

int rptId = Int32.Parse(GridView1.DataKeys[e.RowIndex].Value.ToString());
            
            string client = GridView1.DataKeys[e.RowIndex].Value.ToString();
           
            string counterparty = GridView1.DataKeys[e.RowIndex].Value.ToString();

           DateTime scheduledate = DateTime.Parse(GridView1.DataKeys[e.RowIndex].Value.ToString());

           DateTime scheduletime = DateTime.Parse(GridView1.DataKeys[e.RowIndex].Value.ToString());

such code to implement above cited condition ,but getting exception like "Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index".
Can you help me out.

Answers (1)