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

  • Home
  • SEARCH
  • 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 8102083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:08:56+00:00 2026-06-05T23:08:56+00:00

I have a vb.net 2010 form with 22 data bound controls from two tables

  • 0

I have a vb.net 2010 form with 22 data bound controls from two tables held in a dataset which is navigated by a bindingnavigator. This successfully adds deletes and updates. However what I need is when adding a new record I need some of the fields to be pre filled out. More specifically I have points balance fields etc which could be any value but will normally be 0 on a new customer so I want to initialise them to 0 when adding new records.

I located an AddingNew event on my datasource but this is called before the new item is added and thus all my initialisation is lost.

any help on this would be appreciated.
kind regards
Feldoh

  • 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-06-05T23:08:58+00:00Added an answer on June 5, 2026 at 11:08 pm

    Since you are using DataTables, you can manually set the DefaultValue property of the DataColumn:

    Dim dt As New DataTable
    Dim dc As New DataColumn("test", GetType(String))
    dc.DefaultValue = "hello"
    dt.Columns.Add(dc)
    dt.Rows.Add()
    Debug.WriteLine(dt.Rows(0)("test").ToString)
    

    Result: hello

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

Sidebar

Related Questions

I have a form in my asp.net mvc(C#) application which handles some dynamic controls.
I am using VB.net 2010 and I have two projects: SQLtesting and Controls .
I have HTML view using 2010 .NET, which I am generating in the report
I am using vb.net 2010. I have a datagridview whose data source is a
I have form in VB.Net 2010: I want to click-drag multi rows in dgRegister
I have a vb.net form with a dataGridView The dataGridView data source is the
I have a .NET project in VS 2010 that has grown to consist of
I have a unit test project in Visual Studio 2010 (.NET 4) that utilizes
In Visual Studio 2010 I have an ASP.NET MVC 3 project called blahblah. As
I have a WinForms app built with VB.Net in VS 2010, and I'm scratching

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.