Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 971907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:02:21+00:00 2026-05-16T03:02:21+00:00

I have been messing with this for quite some time now and it’s getting

  • 0

I have been messing with this for quite some time now and it’s getting less and less fun; I followed the MSDN guide for deleting a row from a datagrid. And it works for any row however I am not able to specify the row… essentially I can delete random rows by using the CurrentIndex parameter anything I try to be more specific gets me a conversion errors.

In a nut shell ‘FindByID’ (my Primary Key) gives me ‘object to long’ errors etc. Can’t nail down the row I want removed.

    //int ThisRow = radGridView1.CurrentIndex.Value;

    // Locate row for deletion
    VSConnectorDataSet.TestTableRow oldTestTableRow;
    oldTestTableRow = vSConnectorDataSet.TestTable.FindByID(
                      Int64.Parse(radGridView1.CurrentRow.Cells["ID"].Value));
    // Delete the row from the dataset
    oldTestTableRow.Delete();

    // Delete from database
    this.testTableTableAdapter1.Update(this.vSConnectorDataSet.TestTable);

    //DataRow rowDel=vSConnectorDataSet.TestTable.Rows[ThisRow];
    //rowDel.Delete();
    //testTableTableAdapter1.Update(vSConnectorDataSet);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T03:02:21+00:00Added an answer on May 16, 2026 at 3:02 am

    Int64.Parse takes a string only. Perhaps try:

    long selRowVal = (long)radGridView1.CurrentRow.Cells["ID"].Value;
    oldTestTableRow = vSConnectorDataSet.TestTable.FindByID(selRowVal);
    

    or

    Int64.Parse(radGridView1.CurrentRow.Cells["ID"].Value.ToString());
    

    It’s not clear what datatype the Cell.Value is. Perhaps an explicit cast might help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been messing with this code for quite some time, works in FF,
I've been working with branches for quite some time now, but I always used
I have been using PyroCMS and CI for quite some time, and truly love
I have been messing around with writing some stored procedures in .NET code with
I been using the jquery ui for quite a while now. This is the
I have been working on a project in scala, but I am getting some
I have been messing around with HtmlUnit for a little bit and particularly this
For a long time now I have been searching through the forum whilst teaching
Good Morning All, I've been a PHP programmer for quite some time, but I've
I have been messing around with Leaks trying to find which function is not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.