\r\n\r\n
Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > Need a Grid?


\r\n \r\n
 
 
Thread Tools Display Modes

\r\n\r\n\r\n
I have a table that has the days of the week (the number varies depending on the month) and I want some kind of grid/Combo box that the user could put data into each box next to the date and then when the user clicks on a command button the info gets posted to the Database. A couple of problems, 1) you have to be able to generate the number of data entry boxes at runtime, 2) I used a data-bound grid but then the days were able to be changed too. Any Ideas???
\nthanks Rick
\n
\n
\r\n \r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n Reply With Quote\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n'; pd[5785] = '\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n \r\n \r\n\r\n\r\n \r\n \r\n\r\n
\r\n
\r\n  \r\n #2  \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n Old\r\n \r\n 09-14-2000, 02:23 AM\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n dusteater\r\n \r\n
\r\n\r\n
Guest
\r\n \r\n \r\n\r\n
 \r\n\r\n
\r\n \r\n \r\n \r\n
\r\n Posts: n/a\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n
\r\n Default\r\n Re: Need a Grid?\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n\r\n \r\n\r\n\r\n
One other issue is that not all of the dates can be displayed so a scroll bar needs to be attached so that the date and the data scroll together.
\n
\n
\r\n \r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n Reply With Quote\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n'; pd[5786] = '\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n \r\n \r\n\r\n\r\n \r\n \r\n\r\n
\r\n
\r\n  \r\n #3  \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n Old\r\n \r\n 09-14-2000, 05:18 AM\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n Phil\r\n \r\n
\r\n\r\n
Guest
\r\n \r\n \r\n\r\n
 \r\n\r\n
\r\n \r\n \r\n \r\n
\r\n Posts: n/a\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n
\r\n Default\r\n Re: Need a Grid?\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n\r\n \r\n\r\n\r\n
Hi,
\n
\nI wouldn\'t allow the user to directly edit the table, rather use a textbox and command button for data entry. I think I got somewhere close to what you\'re after by using a DataGrid Control bound to an ADO Data Control.
\nSetting the "allow update" property of the DataGrid to False ensures the user cannot directly edit the grid. text typed into a textbox can then be used to update the grid using a command button as in
\n
\nPrivate Sub Command2_Click()
\n\'
\n DataGrid1.Col = 1
\n DataGrid1.Text = Text1.Text
\n
\nEnd Sub
\n
\nThis code updates the second column of the selected record in the grid which automatically updates the database
\n
\nGood Luck
\nPhil
\n
\n
\r\n \r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n Reply With Quote\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n'; pd[5787] = '\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n \r\n
\r\n
\r\n  \r\n #4  \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n Old\r\n \r\n 09-14-2000, 01:10 PM\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
BillSoo\'s Avatar\r\n\r\n
\r\n \r\n BillSoo\r\n BillSoo is offline\r\n\r\n\r\n
Prev Previous Post   Next Post Next
  #1  
Old 09-14-2000, 02:13 AM
dusteater
Guest
 
Posts: n/a
Default Need a Grid?


I have a table that has the days of the week (the number varies depending on the month) and I want some kind of grid/Combo box that the user could put data into each box next to the date and then when the user clicks on a command button the info gets posted to the Database. A couple of problems, 1) you have to be able to generate the number of data entry boxes at runtime, 2) I used a data-bound grid but then the days were able to be changed too. Any Ideas???
thanks Rick

Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->