help:how to select a record in MSH flexgrid

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jun 2007
Posts: 33
Reputation: ITech is an unknown quantity at this point 
Solved Threads: 0
ITech's Avatar
ITech ITech is offline Offline
Light Poster

help:how to select a record in MSH flexgrid

 
0
  #1
Mar 31st, 2008
my problem is that i have a search form for customers ,i want to use msh flex grid to show the results of search, i am searching for a customer which are stored in a database.
suppose i want to update some information of a specific customer listed in msh flexgrid after the search.so i want to select the whole row and wen i press updatebutton these fields are retrieved into some textboxes...the problem is that with msh flex grid i can search for customers,,but cant selct a row and retrieve to text boxes for updation.

when i did with datagrid its working fine..absolutely fine...but i want to use mshflexgrid...

is there a solution for my problem
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 34
Reputation: techtix is an unknown quantity at this point 
Solved Threads: 4
techtix techtix is offline Offline
Light Poster

Re: help:how to select a record in MSH flexgrid

 
0
  #2
Apr 3rd, 2008
First, unless you plan on using the hierarchical aspects of the grid, I'd suggest using the standard MSFlexGrid rather than the MSHFlexGrid.

To address your question, you can use the TextMatrix property to retrieve the text from each column in the selected row.

You can find the complete reference to both FlexGrid controls in the Microsoft MSDN Library.
http://msdn2.microsoft.com/en-us/lib...39(VS.60).aspx

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub UpdateButton_Click()
  2.  
  3. Dim RowNum as long
  4.  
  5. 'Return the selected row number
  6. RowNum = MyGrid.Row
  7.  
  8. 'Example: Returns the text from column 5 of the selected row
  9. Text1.Text = MyGrid.TextMatrix(RowNum, 5)
  10.  
  11. 'NOTE: The reverse will set the column text
  12. 'MyGrid.TextMatrix(RowNum, 5) = "Some text value"
  13.  
  14. End Sub
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 5
Reputation: frege is an unknown quantity at this point 
Solved Threads: 0
frege frege is offline Offline
Newbie Poster

Re: help:how to select a record in MSH flexgrid

 
0
  #3
Apr 4th, 2008
please, can u gv me the code and explain how to use datagrid in vb6, ve bin trying to link with a database but it keep repeating error. thanks
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: help:how to select a record in MSH flexgrid

 
0
  #4
Apr 4th, 2008
please don't hijack other thread. make your own thread, so others people can read and giving some help. ok friend
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC