S sullyman Active member Joined Nov 11, 2009 Messages 37 Programming Experience Beginner Dec 7, 2009 #1 I would like to display a button if no records exist and hide the same button if a record exists. How can i achieve this please
I would like to display a button if no records exist and hide the same button if a record exists. How can i achieve this please
R rcombs4 Well-known member Joined Aug 6, 2008 Messages 189 Programming Experience 3-5 Dec 7, 2009 #2 [button id].visible = [check if records exist] Example VB.NET: btnSubmit.Visible = reader.read Upvote 0 Downvote
S sullyman Active member Joined Nov 11, 2009 Messages 37 Programming Experience Beginner Dec 7, 2009 #3 Thanks for reply. I am using a bound Verticalgrid control from Devexpress There is no read attribute for the VGridcontrol e.g. SimpleButton1.Visible = VGridControl1 Upvote 0 Downvote
Thanks for reply. I am using a bound Verticalgrid control from Devexpress There is no read attribute for the VGridcontrol e.g. SimpleButton1.Visible = VGridControl1
JuggaloBrotha VB.NET Forum Moderator Staff member Joined Jun 3, 2004 Messages 4,530 Location Lansing, MI; USA Programming Experience 10+ Dec 7, 2009 #4 Is there a Count property? If so then something along these lines will work: SimpleButton1.Visible = (RecordsObject.Count = 0) Upvote 0 Downvote
Is there a Count property? If so then something along these lines will work: SimpleButton1.Visible = (RecordsObject.Count = 0)
S sullyman Active member Joined Nov 11, 2009 Messages 37 Programming Experience Beginner Dec 7, 2009 #5 Hi J, Yes, there is a recordcount as follows but i have tried the following but have had no luck so far If VGridControl1.RecordCount = 0 Then SimpleButton1.Visible = True Else SimpleButton1.Visible = False End If End Sub Upvote 0 Downvote
Hi J, Yes, there is a recordcount as follows but i have tried the following but have had no luck so far If VGridControl1.RecordCount = 0 Then SimpleButton1.Visible = True Else SimpleButton1.Visible = False End If End Sub
JuggaloBrotha VB.NET Forum Moderator Staff member Joined Jun 3, 2004 Messages 4,530 Location Lansing, MI; USA Programming Experience 10+ Dec 7, 2009 #6 What do you mean you have had no luck so far? Upvote 0 Downvote
S sullyman Active member Joined Nov 11, 2009 Messages 37 Programming Experience Beginner Dec 7, 2009 #7 Hi J - I mean it is not working. I have tried other properties also but have got nowhere Edit: Many thanks. i had the code in the wrong place. Trust a Noob to get it wrong Upvote 0 Downvote
Hi J - I mean it is not working. I have tried other properties also but have got nowhere Edit: Many thanks. i had the code in the wrong place. Trust a Noob to get it wrong
JuggaloBrotha VB.NET Forum Moderator Staff member Joined Jun 3, 2004 Messages 4,530 Location Lansing, MI; USA Programming Experience 10+ Dec 7, 2009 #8 sullyman said: Many thanks. i had the code in the wrong place. Trust a Noob to get it wrong Click to expand... I always do.... Upvote 0 Downvote
sullyman said: Many thanks. i had the code in the wrong place. Trust a Noob to get it wrong Click to expand... I always do....