Datagrid Problem

Posted on 2006-04-24
Last Modified: 2010-04-23
I have a datagrid with readonly property set to false. When I make changes to the grid and leave the cell, the grid doesn't store the new information. When I check datagrid.item(currentrowindex,column) it still shows old info. Why?
Question by:khebert1
    LVL 34

    Expert Comment

    by:Brian Crowe
    try calling currencymanager.endcurrentedit before checking the value...

    ctype(bindingcontext(datagrid.datasource), currencymanager).endcurrentedit


    Author Comment

    What happens is as soon as I leave the cell I am editing, the value goes back to the original value. I have done this on a previous program with no problems at all. I just can't figure out why the value won't hold.
    LVL 34

    Accepted Solution

    make sure that your datasource is set to allow edits as well as the tablestyle and datacolumns

    Author Comment

    Demo please!

    Author Comment

    I was setting column.nulltext = vbNullString
    this was causing all my problems.

    thanks for pointing me in the right direction


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now