.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

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

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :ASP.Net
 

I received the error in data grid.  here I'm copying my code, i coudnt able to find the error. plz help me

----------------------------------------------------

 

<asp:DataGrid ID=" datagridTEST " runat="server" PagerStyle-NextPageText="" PagerStyle-PrevPageText=""

SelectedItemStyle-Wrap="false" CellPadding="5" CellSpacing="0" HeaderStyle-Wrap="false"

ItemStyle-Wrap="false" AutoGenerateColumns="false" PageSize="100" OnItemDataBound="datagridTEST_ItemDataBound"

 OnItemCommand="Grid_ItemCommand" AllowPaging="true" >

----------------------------------------------------------------------------

Sub Grid_ItemCommand(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)

        Try

            If e.CommandName = "Edit" Then

                datagridTEST.EditItemIndex = e.Item.ItemIndex

                BindMyDataGrid()

         &nb


View Complete Post


More Related Resource Links

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

  

Keep getting this error when positioning to the last page of a report.

Using Server 2003...SqlRpt Svcs 2000 sp2

Detail error msg:

  • Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown. (rrRenderingError) Get Online Help
    • Exception of type Microsoft.ReportingServices.ReportRendering.ReportRenderingException was thrown.
      • Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

Anyone have any suggestions?  Any way to find out what collection is blowing?...or where parameter name: index comes from?


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

  

this is may code

help me

i have erro in this code

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


Asp.net  control gridview



using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

namespace WebApplication2
{
    public partial class _Default : System.Web.UI.Page
    {
        string query, strcn;
                public SqlConnection cn;
        public SqlDataAdapter da;
        public DataSet ds;

       private void fill()
        {
            string strc = "Data source =V_v_S-PC;  initial catalog=Entry; User

An error occured during local report processing. Index was out of the range. Must be non-negative an

  

Hi folks,

I'm getting the following error in my report:

'An error occured during local report processing. Index was out of the range. Must be non-negative and less than the size of the collection. Parameter name: index'

I checked all the datasets and they are working fine in query designer.

Could you plese let me know what might be the issue ?

Thanks in advance.


site collection size

  
what is the solution of a site collection if its size grows beyond 100GB?  There is no way we can split it into two site collections and the content database will be large than 100GB even if it contains a signal site collection. Thanks in advance, Peter  

How do I get an item of a collection by index?

  
Hello, I have a StackPanel whose children are all Expander controls. I can Add an Expander control to the StackPanel. I can Insert an Expander control into the StackPanel at specific location. I can Remove an Expander control from the StackPanel at a specific location. But, I cannot find a way to get one Expander control from the StackPanel. There is a CopyTo, but that is for copying to an array, I only need to look an one Expander control at a specific location. Since I can Insert into a specific location and Remove from a specific location, you'd think I'd be able to look at a specific location. The following does not work, where "s" is the StackPanel, p (an int) is the position, and there is an Expander control at that location: Expander x = s[p]; // [] is not allowed on collections. How do I get an item of a collection by index?  Regards, Robert Note: I work on various aspects or one or more programs, working on what is most important at the time. Some questions I ask are on aspects of the program that are not important right now or I'm using a workaround for now. I'll eventually get back to those answers received and respond. Those that are high priority get responses very soon. Thanks for your input, it is appreciated.

Package Migration Wizard error -- Index was out of range

  
I am unable to migrate any DTS packages, from a SQL Server 2000 package, from a structured storage file, or from a DTS package imported into SQL2005 (Developer Edition, 32 bit).  Running the Package Migration Wizard, every time I get to the List Package screen, i get the error below.  I haven't found any other mention of this so far.  Anyone else seen this error or have suggestions?"Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index (mscorlib) ------------------------------Program Location:    at System.Collections.ArrayList.get_Item(Int32 index)   at WizardUI.ListPackages.UniquePackagewithCurrentVersion(PackageInfoCollection m_pInfoCol)   at WizardUI.ListPackages.OnEnterPage(EventArgs e)   at Microsoft.SqlServer.Management.UI.WizardPage.RaiseEnterPage()   at Microsoft.SqlServer.Management.UI.WizardForm.NextPage(WizardPage nextPage)   at Microsoft.SqlServer.Management.UI.WizardForm.Next_Click(Object sender, EventArgs e)"

Parameter name: index

  

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {

        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            // reference the Delete LinkButton
            LinkButton db = (LinkButton)e.Row.Cells[0].Controls[0];

            // Get information about the product bound to the row
            Northwind.tbl_zaposleniRow product = (Northwind.tbl_zaposleniRow)((System.Data.DataRowView)e.Row.DataItem).Row;

            db.OnClientClick = string.Format("return confirm('Ste prepricani, da zelite izbrisati osebo {0} ?');", product.ID);
        }
    }

<asp:ObjectDataSource ID="ProductsOptimisticConcurrencyDataSource" runat="server"
            SelectMethod="GetZaposleniBy" TypeName="zaposleni" 
            UpdateMethod="UpdateSupplierAddress"
            DeleteMethod="DeleteProduct" >
            <DeleteParameters>
                <asp:Parameter Name="Id" Type="Int32" />
                <asp:Parameter Name="UserId" DbType="Guid"  />
            </DeleteParameters>
        </asp:ObjectDataSource>

        <asp:GridView ID="ProductsGrid" runat=&qu

Reports rendered in R2 now give an error ; Must be non-negative and less than the size of the collec

  

Hi, the full error is

An error occurred during client rendering. Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

We have many reports that were working fine on the old 2008 business intelligence reporting services.  When we launched the rdls on a R2 bids server, we received the above error.

The way we fixed this was by trial and error and found a text box caption and text box expression that was too 'skinny'. We widened it vertically and it worked. No widths were negative numbers, just too 'skinny' it seemed.  Again, the text box vertical width worked fine in the old bids.

Ok, so what's our problem?  Well, we have dozens of reports now throwing this error.  The field text boxes are not all the same on the reports. We can go through each report and spend an hour trying to figure out what text box is the problem. This will be time consuming. Any patches from ms or advice how to do this quickly???

thanks,


SSRS 2008 ERROR - rsProcessingAborted:System.ArgumentOutOfRangeException: Index was out of range. Mu

  

Hi,

I am using SQL Server 2008 R2 Ent. Edition 64 bit reporting services. The source data for report is at remote server and it is SQL Server 2005 Ent. Edition (though I don't think this matters here.) I have set the <WorkingSetMaximum> to 5GB for SSRS

I am testing the performance of report server and running a report with 100K records with 20 concurrent users. All 20 reports gets executed successfully. When I try with 25 or 30 users only 21 reports execute successfully when I see the ExecutionLog table. I see this exception in the report service log file. Please help.

ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: , Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.IntermediateFormatReader.RemoveReadOnlyMembers(List`1 declarations)
   at Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.IntermediateFormatReader..cto

index rebuild (offline) on sql 2005 sp3 enterprise causes drastics growth of the database size(mdf)

  

index rebuild (offline) on sql 2005 sp3 enterprise causes drastics growth of the database size(mdf)

database grew from 40 GB to 500 GB. space is reserved no free space to reclaim after reindex completes.

pls guide


site collection size

  

We have site collections, some of them keep growing and reach about 100GB level.

Should we keep them growing?   

Should we split the site collection and how?

Any suggestions to dealing with this situation?  

Thanks,

Peter 

 


TwoWay data binding to a specified index and property in a collection

  

Hello everybody,

my problem is, I can't bind to a specified item and property in a collection. The code:

<Window.Resources>
    <test:ValueConverter x:Key="valueConverter" />
    <ContentPresenter x:Key="cont1" Content="{Binding Path=.[0], Mode=TwoWay}" />
</Window.Resources>


Index (zero based) must be greater than or equal to zero and less than the size of the argument list

  
Hi, I have installed German and French language packs on my SharePoint 2010 server. After I change the Language settings to be able to select both the languahges as alternate language, I get this error:

Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

It is now not letting me change back the properties back to English only or opening the home page of the site.

Any idea, why this is happening and how can I disable this language pack option from this site collection only so that it works normally as before applying language packs? Do I have to unisnatll language pack for that?

Please guide.

Thanks.


Share point database and site collection size, and restrictions and workflow

  

Sharepoint site collections

 

More Detail

 

 

We had a 3rd party into to develop the share-point service, This is really a very difficult situation not the solution but the documents that are stored and the way it was retrieved.

 

The real thing is that we receive an item it is booked into SAP and then we send an automated xml to set up a local site this site will then have details from the SAP system fed by ABAP. After the site is created, and then we add documents files and .jpg. These documents must show a detailed audit trail so that if challenged in a court of law can show who had access and who updated documents. 

 

SO the problem is 

 

1 Site Collection that is 170gig and the design means that we have 1600 sites and these contain images that are stored in the single site collection. How do we remove the full documents and images and replace with links rather than the doc, img. 

 

2. We have around 8 business units the problem is that they can share information acros

How do I limit size of Usage ( Usage and Health Data Collection ) database size please?

  

Hi

How do I control the size of my usage database ( Usage and Health Data Collection database ) in SP2010 so it never exceeds a certain size?

Its not clear how you do this - does anyone know? I want to set it so it never exceeds 100 GB in size but logs pretty much everything.

Thanks in advance,

Steve


error index out of range?

  

hi,

I get the error:

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

when vieing a page with a datalist on it. i have other controls in the datalist. what would cause this? here is my code behind Thanks!:

protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)
    {
        Label theiruseridLabel = DataList1.Items[0].FindControl("theiruseridLabel") as Label;
        HyperLink hp2 = DataList1.Items[0].FindControl("HyperLink2") as HyperLink;
        HyperLink hp3 = DataList1.Items[0].FindControl("HyperLink3") as HyperLink;
        Label Label1 = DataList1.Items[0].FindControl("Label1") as Label;

        string userName = theiruseridLabel.Text;
        ProfileCommon userProfile = System.Web.Profile.ProfileBase.Create(userName, true) as ProfileCommon;
        hp2.Text = userProfile.FirstName;
&nbs

StringBuilder.ToString() Throws a System.ArgumentOutOfRangeException Index was out of range

  

I have the following code to show a logging window that has the last 64000 chars of code. Every new line I add the first line will be deleted:

m_sbText = new StringBuilder(65000);

private void AddLine(string LogMessage)
{
   if (m_sbText.Length > 64000)
   {
      m_sbText.Remove(0, m_sbText.ToString().IndexOf("\n") + 1);
   }
   m_sbText.AppendLine(LogMessage);
   textBoxLog.Text = m_sbText.ToString();
}

When I let this run the first time I got an OutOfMemory exception because I forgot to add

textBoxLog.UndoLimit = 0;

So this UndoLimit problem is still happening in WPF dot net framework 4. 

I added the UndoLimit and let this run for a night. Once every few hours the textBoxLog.Text = m_sbText.ToString(); line raises a System.ArgumentOutOfRangeException Index was out of range exception on StringBuilder.ToString(). Because I do not do anything with the Index I suspect the StringBuilder to mess up internal indexes.

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend