Results 1 to 5 of 5

Thread: DataGrid - Some questions

  1. #1

    Thread Starter
    Lively Member neodatatype's Avatar
    Join Date
    Aug 2002
    Location
    Italy
    Posts
    103

    DataGrid - Some questions

    Hi all!

    I've got some question about DataGrid:

    - Why when I type the "+" and the "-" of the kyypad they do not appear into the cell?
    The DG losts the focus and nothing else happen.

    - Can I eliminate the "(null)" text onto the new row?

    - Can I know the exact Location of a cell on the screen? How?

    Thank you!
    > NeoDataType.net <

    Try my Free .Net Reporting Tool!

  2. #2
    Addicted Member CoMMiE's Avatar
    Join Date
    Jul 2000
    Location
    Malaysia, Kuala Lumpur
    Posts
    179
    1.I try it on my datagrid the - + sign still appear, check your code

    2.Set the DatagridTextboxColumn Property NullText=vbnullstring.empty

    3. Datagrid.GetCellBounds(0, 0).X()

  3. #3
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    + and - of keypad does not work on my datagrids either. I searched and some has suggested this:
    VB Code:
    1. Protected Overrides Function ProcessCmdKey(ByRef msg As
    2. System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
    3.  
    4.         ' Grid cannot process keypad subtract key
    5.         If keyData = Keys.Subtract Then
    6.             keyData = Keys.OemMinus
    7.             SendKeys.Send("-") ' This *seems* to do the trick???
    8.             Return True
    9.         End If
    10.         MyBase.ProcessCmdKey(msg, keyData)
    11.     End Function

  4. #4

    Thread Starter
    Lively Member neodatatype's Avatar
    Join Date
    Aug 2002
    Location
    Italy
    Posts
    103
    + and - of keypad does not work on my datagrids either. I searched and some has suggested this:
    VB Code:
    1. SendKeys.Send("-") ' This *seems* to do the trick???
    This seems to work, but the "+" still disappear

    Where did you find that info?

    Thanx
    > NeoDataType.net <

    Try my Free .Net Reporting Tool!

  5. #5
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    I searched MSDN news group using Google groups
    http://groups.google.com
    or
    http://www.deja.com (same as previous)

    I couldnt do that trick for '+'

    see here it defines a method you may want to apply.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width