Click here to Skip to main content
15,921,351 members

Comments by Member 8655072 (Top 4 by date)

Member 8655072 9-Jul-12 7:33am View    
Thks Sandeep for answering but if i do like this
for (int row = 0; row < numRows; row++)
{
dataGridView1.Rows.Add();

recLeft = numRec - (numColumnsForWidth * row);


for (int col = 0; (col < recLeft) && (col < numColumnsForWidth); col++)
{
this.dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dataGridView1.Rows[row].Cells[col].Value= lstImage[0];
}
}

where i am adding the row everytime for row loop the putting values of each col in that row.
the problem is same.
Member 8655072 26-Jun-12 5:57am View    
sandeep this is the solution finally i implemented to view 10 records per page in datagrid.
Member 8655072 25-Jun-12 11:12am View    
Thax Sandeep, it gave me direction to implement my solution. It is working now
Member 8655072 25-Jun-12 10:56am View    
I have tried to do the paging by implementing next and prev button and on every click i tried to fill the data grid with corresponding 10 results. It displays first 10 results and then for next 10 it says

Index was out of range. Must be non-negative and less that the size of the collection

Parameter name: index

can you pls guide me...how to check this limit