Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. "BindingSource.ResetBindings" is not working

"BindingSource.ResetBindings" is not working

Scheduled Pinned Locked Moved C#
databasequestion
1 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Said Ali Jalali
    wrote on last edited by
    #1

    :rose: Hi. I'm saving data in one of table with OLEDBCOMMAND.And i have a DataGridView bound to this table with "BindingSource". When i use BindingSource.ResetBindings(false); it dosen't show the new records that i saved. When i close my form and show it againg it show new records.

    private void buttonX2_Click(object sender, EventArgs e)
    {
    if (IsEmpty.Empty(this))
    {
    if (saveEdit == SaveEdit.Save)
    {
    dataBase.Save(dataBase.SetDictionary(this), "Anbar_Kala");//(Oledb Commad)
    anbarKalaBindingSource.ResetBindings(true);

                }
            }
        }
    

    And also when i use Insert property with TableAdapter is dosen't work too.

    private void buttonX2_Click(object sender, EventArgs e)
    {

    anbar_KalaTableAdapter.Insert(TName.Text, TBDate.Text, TFrom.Text, Convert.ToInt32(Tcount.Text), TVahed.Text);
    anbarKalaBindingSource.ResetBindings(true);
    //and also anbarKalaBindingSource.ResetBindings(false);

    }

    Can you tell what to do? Thank you. :rose:

    CanI

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups