Results 1 to 5 of 5

Thread: [RESOLVED] [02/03] Datagrid problem of my row index was out of range....

  1. #1

    Thread Starter
    Hyperactive Member shyguyjeff's Avatar
    Join Date
    Jul 2007
    Location
    City of Durian
    Posts
    289

    Resolved [RESOLVED] [02/03] Datagrid problem of my row index was out of range....

    need help you guys out there how do i solve this problem.. I have screenshot here..





    I also need to know guy hows to group in my datagrid like for example I have the same Description and I want it to group in my query...How can I do it? i need it badly...
    Last edited by shyguyjeff; Jan 9th, 2008 at 08:07 PM.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [02/03] Datagrid problem of my row index was out of range....

    Firstly, without seeing the code we can't possibly know why that exception was thrown other than to say that you used an invalid row index. If there are N rows then the row index must be in the range 0 to (N-1). Anything else is invalid. Simple.

    As for grouping data, there's no way to group multiple rows in a DataGrid. You can combine multiple records in one row using aggregate functions in your SQL code. Each of those rows is then displayed by the DataGrid as always. Is that what you want?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member shyguyjeff's Avatar
    Join Date
    Jul 2007
    Location
    City of Durian
    Posts
    289

    Re: [02/03] Datagrid problem of my row index was out of range....

    thanks jm i already got it...How about the query on how to group the data?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [02/03] Datagrid problem of my row index was out of range....

    How about it? I already addressed that.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Hyperactive Member shyguyjeff's Avatar
    Join Date
    Jul 2007
    Location
    City of Durian
    Posts
    289

    Re: [02/03] Datagrid problem of my row index was out of range....

    ahhh...ok...sorry jm i forgot...a million thanks to you jm...Have a nice day and God Bless..You're really a great wizard!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width