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
R

romo22

@romo22
About
Posts
17
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to controll cells inside Table1DataGridView
    R romo22

    Hi John thank you for standing with me in this code I got this error " Operator '=' is not defined for type 'DBNull' and type 'Integer'."

    DataGridView1.Rows(pRowNo).Cells(0).Value = 1

    I tried to do something like this

    DataGridView1.Rows(pRowNo).Cells(0).Value.Tobit = 1

    but I still get the same error notice that I'm working on Visual basic Studio 2010 is ther any difference :confused:

    Visual Basic question json tutorial

  • how to controll cells inside Table1DataGridView
    R romo22

    "The way I read your code at the moment is If a user clicks on a Row and Cell 0 (checkbox) is Checked, then the contents of Cell 2 are moved into Cell 1 otherwise you clear the contents of Cell 1" yes that what I want to do " Are you using mouse clicks to Check and UnCheck the checkbox in Cell 0 or is it being populated by a data source?" yes I use the mouse clicks to Check and UnCheck the checkbox in Cell 0

    Visual Basic question json tutorial

  • how to controll cells inside Table1DataGridView
    R romo22

    Payton I still need your help where I can add if function

    Visual Basic question json tutorial

  • how to controll cells inside Table1DataGridView
    R romo22

    Hi JohnPayton I tried to add if function but it doesn't work with me the code without if function work prefect :thumbsup:

    Private Sub Table1DataGridView_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles Table1DataGridView.CellContentClick
    'Declare a couple of variables to hold the row number and contents of the third cell

        Dim pRowNo As Integer
        Dim pstrContents As String
         
        'Get the ROW number
        pRowNo = Val(Table1DataGridView.SelectedCells(0).RowIndex.ToString())
    
       ' here I try to add if 
    

    If Table1DataGridView.Rows(pRowNo).Cells(0).Value = True Then

            'It's here where you test if Cell 0 is checked, then if so the remainder (below) is actioned.
            '    If Table1DataGridView.Rows(0).Cells(0).Value = True Then
            'Store contents of cell three
            pstrContents = Table1DataGridView.Rows(pRowNo).Cells(2).Value
          
            'Insert contents into cell two
            Table1DataGridView.Rows(pRowNo).Cells(1).Value = pstrContents
           
    
        Else
             Table1DataGridView.Rows(pRowNo).Cells(1).Value = ""
    
        End If
    End Sub
    

    I need to add if because once cell 0 checked= false then cell1 = clear or "" empty could please help me with this

    Visual Basic question json tutorial

  • how to controll cells inside Table1DataGridView
    R romo22

    yes it's work as super :-D :-D :-D :-D :-D but I wonder how can make cell 1 clear once checked is false where I can add the if and else function. I will try by myself first :rose::rose::rose::rose: thanks so much I spent six hours trying with myself finally I'm done with it oh my God

    Private Sub Table1DataGridView_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles Table1DataGridView.CellContentClick
    'Declare a couple of variables to hold the row number and contents of the third cell

        Dim pRowNo As Integer
        Dim pstrContents As String
    
        'Get the ROW number
        pRowNo = Val(Table1DataGridView.SelectedCells(0).RowIndex.ToString())
    
        'It's here where you test if Cell 0 is checked, then if so the remainder (below) is actioned.
        '    If Table1DataGridView.Rows(0).Cells(0).Value = True Then
        'Store contents of cell three
        pstrContents = Table1DataGridView.Rows(pRowNo).Cells(2).Value
    
        'Insert contents into cell two
        Table1DataGridView.Rows(pRowNo).Cells(1).Value = pstrContents
        '    End If
    End Sub
    
    Visual Basic question json tutorial

  • how to controll cells inside Table1DataGridView
    R romo22

    ok but under where I should put this code. you said use an event handler, I'm sorry I don't how to use this feature where I can find the event handler is it something like this

    Private Sub Button1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.TextChanged

    End Sub
    
    Visual Basic question json tutorial

  • how to controll cells inside Table1DataGridView
    R romo22

    no I need to move text from cell to another cell on the same row once column 0 is checked :confused:

    Visual Basic question json tutorial

  • how to controll cells inside Table1DataGridView
    R romo22

    yes that what I need the contents of Column 1 to be replaced with the contents of Column 2. or on other words because I'm in USA 9:33 pm cool night and cool weather I need to move or copy what in cell to another cell that basically what I need once Column 0 is checked true. because Column 1 will be used as Query in my project. what I gave was just example. I'm focus now how do this to do something else but i'm not sure if some one did like this before or if it's possible to do. thanks

    Visual Basic question json tutorial

  • how to controll cells inside Table1DataGridView
    R romo22

    Hi guys I need your smart hands to handle this code :confused: I have three columns on (Table1DataGridView) take names: (F/T) (Last name1) (Last name2) first column takes Bit value ( Checkedbox. true or false ) the rest of columns takes text value type. I wonder how can I do something like this : if F/T is checked true then Last name1 equuleus the value of Last name2 I try this

    Private Sub Table1DataGridView_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles Table1DataGridView.CellContentClick

    If Table1DataGridView.Rows(0).Cells(0).Value.chcked =True Then

    Table1DataGridView.Rows(0).Cells(1).Value=Table1DataGridView.Rows(0).Cells(2).Value

    End if

    End sub

    then I thought I should know what is the name of F/T column and using that name to give that name my code which is las name1 = last name2 and I did this, I went to ( Edit columns option and then I copy the name of F/T column, and the Name of las nmae1,and the Name of las nmae2 ) and I did this code but I got nothing

    If DataGridViewCheckBoxColumn1.TrueValue Then
    DataGridViewTextBoxColumn2 = DataGridViewTextBoxColumn3

        End If
    

    I'm not sure if can did this or it's not possible, Please if you could give hand with this I will be appreciated thanks

    Visual Basic question json tutorial

  • why I lose data after chnage the code or add code
    R romo22

    sometimes words leads you to understand different thing or doesn't make sense for you . reading my words not enough to understand my problem because my English not good enough to express what I need to say it. I speak different language, I don't even understand what database means on my language I just understand what database do. we spent a lot of times chat to each other write to each other youtube that I did will save our time please watch you will not lose anything you are here because you need to help me, http://www.youtube.com/watch?v=jDj_ZD10y0k[^]

    Visual Basic question csharp database visual-studio

  • why I lose data after chnage the code or add code
    R romo22

    thanks guys for helping me I did something to make my question clear watch this YouTube you can see my question please watch with full screen http://www.youtube.com/watch?v=jDj_ZD10y0k&feature=youtu.be[^] thanks guys

    Visual Basic question csharp database visual-studio

  • why I lose data after chnage the code or add code
    R romo22

    well that what happen to me every time I create SQL table and after save some record like add rows full with information it will be saved and fine but once I change any code or for example create new button on the form the data on the GridviewData will disappear I am not sure if that because I have to change something on the Proprieties

    Visual Basic question csharp database visual-studio

  • why I lose data after chnage the code or add code
    R romo22

    Hi guys I have very big question I have a project on Visual Studio, this project include table SQL data. I notice when I add records or add rows with information . imagine that I add more than 1000 rows full with a lot of names and number. the crazy thing that all these data will be removed once I change a little code or add. I wonder how can I protect my data even I make change code time to time.

    Visual Basic question csharp database visual-studio

  • how to display image from gridview on picturebox
    R romo22

    :-D finally yes it's work how can I say thank you for your help .. but you know what you are my super hero who save my time after two days of stupid attempts went fail. oh my God why I didn't ask you from the first day i got this problem, I have a project and this project depends on this code otherwise I will stop work on this project after I faced this problem but now I'm very excited to back work on my project :rose::rose::rose: :rolleyes:

    Visual Basic help com tutorial question

  • how to display image from gridview on picturebox
    R romo22

    I don't why he put blue line under MemoryStream(bytes)

    Dim bytes As Byte() = Table5DataGridView.Rows(0).Cells(3).Value
    Using ms As New MemoryStream(bytes)
    Dim img As Bitmap = CType(Image.FromStream(ms), Bitmap)
    PictureBox1.Image = img
    End Using

    on error list show me MemoryStream(bytes)is not defined :(

    Visual Basic help com tutorial question

  • how to display image from gridview on picturebox
    R romo22

    thank you for help, but I still get error show me this : Unable to cast object of type 'System.Byte[]' to type 'System.Drawing.Bitmap'. I wonder if that code work to you, so that means the code will be correct and I did something wrong :confused: please I need help

    Visual Basic help com tutorial question

  • how to display image from gridview on picturebox
    R romo22

    Hi guys I'm not able to display image from tablegridview to picturebox visual basic 2010 studio. I know how to reference text value from a cell on tablegridview to textbox I had been created . this the Code how to do this :

    TextBox2.Text = Table1DataGridView.Rows(0).Cells(3).Value.ToString

    my question is how to do it with image if you have this image on Table1DataGridView I tried this code for image but it doesn't work I got error

    PictureBox1.image=Table1DataGridView.Rows(0).Cells(2).Value.Toimage

    or

    PictureBox1.image=Table1DataGridView.Rows(0).Cells(2).Value

    both of these cod not work and I get error please Help I hope that some one can solve this complex problem and i will be great full for you . mju10ht@gmail.com

    Visual Basic help com tutorial question
  • Login

  • Don't have an account? Register

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