Calling this function everytime to display data via next and previous button_click() function
private void CreateTable
{
try
{
int count = 0;
startingRec = curPage * 10;
int noOfRec_to_display = startingRec + 10; ;
for (int i = startingRec; i < noOfRec_to_display; i++)
{
try
{
Image img = Image.FromFile("<complete path="">www.jpg" Bitmap result = new Bitmap(100, 100);
using (Graphics g = Graphics.FromImage((Image)result))
g.DrawImage(new Bitmap("www.jpg"), 0, 0, 100, 100);
this.dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dataGridView1.Rows.Add(m_PrimaryLotId[i], m_LotId[i], m_Title[i], result);
dataGridView1.Rows[count++].Height = 100;
dataGridView1.AllowUserToAddRows = false;
}
catch (System.IO.FileNotFoundException ex)
{
MessageBox.Show(ex.Message);
}
}
}
catch (Exception e)
{
MessageBox.Show(e.Message);
}
}