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

K

karunakar

Hi All

I am getting this error

When i clcik the some link button same time i clicked 2,3 times
this Link button redirect to to the some another page

that page i was populate the 44580 this amount of records in DATAGRID

When ever click the that link buton at time we click 2,3 time that time it
is giving error

ERROR : Index was out of range. Must be non-negative and less than the size
of the collection. Parameter name: count
their i am calculted records
in BindGrid() function

output this code 1 - 20 of 44580

if (int.Parse(lblGC.Text) > (((dgdOpenWorkOrder.CurrentPageIndex + 1 /
dgdOpenWorkOrder.PageSize) + 1) * dgdOpenWorkOrder.PageSize))
{
lblGdt.Text = (dgdOpenWorkOrder.CurrentPageIndex *
dgdOpenWorkOrder.PageSize) + 1 + " - " + ((dgdOpenWorkOrder.CurrentPageIndex
+ 1 / dgdOpenWorkOrder.PageSize) + 1) * dgdOpenWorkOrder.PageSize + " of
";
}
else
{
if (lblGC.Text == "0" )
{
lblGC.Text = "0";
lblGC.Text = "";
}
else
{
lblGdt.Text = (dgdOpenWorkOrder.CurrentPageIndex *
dgdOpenWorkOrder.PageSize) + 1 + " - " + lblGC.Text + " of ";
}
}




Regards
Karunakara Rao
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,049
Members
48,769
Latest member
Clifft

Latest Threads

Top