[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 749
  • Last Modified:

VS2008 >> VB.NET >> Toolbox >> DataGrid Disabled

EE Experts:

I know that the DataGridView replaces the DataGrid. But the DataGrid is not "Manufactured Discontinued" in the documentation that I have read thus far. A close to perfect quote is "It is there for backward compatibility and possible future use. . . . ". Every class of object in the toolbox is there for possible future use. So why single out the DataGrid for such an obviously dumb statement? I want to use it instead of the DataGridView. I'll spare you the reason. It doesn't matter. If the documentation says what it says and it is in my Toolbox, I should be able to use it. But I can not

I can not use it because it is "Disabled" (Grayed Out) in the list of objects in my Toolbox. Please see the screen-shot I uploaded. I had this problem once before, but it has been so long ago, I forgot how I got around this issue and I haven't been able to figure it out again.

Can somebody please tell me what I have to do to make it so that the DataGrid object is "Enabled" in my Toolbox?

Thank you in advance.

TedPalmer
ToolboxDataGrid.bmp
0
Ted Palmer
Asked:
Ted Palmer
  • 7
  • 4
1 Solution
 
mcs0506Commented:
Hi,

Try to right click on the Toolbox and select "Reset Toolbox".
If not working then download and install VS2008 SP1.

Regards,

Dani
0
 
Éric MoreauSenior .Net ConsultantCommented:
wasn't the DataGrid provided with VS2005? It was replaced with the DataGridView control.
0
 
mcs0506Commented:
The DataGridView control is a new control that replaces the DataGrid control. The DataGridView control provides numerous basic and advanced features that are missing in the DataGrid control. Additionally, the architecture of the DataGridView control makes it much easier to extend and customize than the DataGrid control. Following Link might be be helpful

http://msdn.microsoft.com/en-us/magazine/cc163813.aspx
http://msdn.microsoft.com/en-us/library/ms171628.aspx

Dani
0
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

 
Ted PalmerInformation Technology ConsultantAuthor Commented:
Thank you all. I have to reboot my PC because of the major updates that Microsoft just did for my PC. I'll get back to this very soon.

Ted
0
 
Ted PalmerInformation Technology ConsultantAuthor Commented:
Dani,

I don't deny that the DataGridView is a much better feature rich control than is the plain old DataGrid control. The more feature rich anything is the more complicated it is to learn how to use it. The DataGridView is very very feature rich. For me that is the problem right now. In the long run, I know that I need to learn how to use the DataGridView. But in the long run we will all be dead. I need something that works. And I need it NOW..!! I have plenty of code that used the DataGrid that my users are very happy with and so am I. I can clone from that and get what I  need. I need what the DataGrid can do for me, and I need it NOW..!!

Because the DataGridView is so feature rich it has been impossible for me to find how to do the simplest things, and find it quickly. I need to be able to load the DataGridView with the results of a SQL Select statement, iterate through the DataGridView one row at a time assigning the value of the columns that I need to local variables so that I can use those local variable values in a process. Which if that process is successful, I need to update a column in that current row with a DateTime value. I have a DataGridView loaded with the data I want, but how do I iterate through the damn thing picking the value of the columns as I need them. If you have a link to a tutorial that shows me how to do that, I would be most appreciative.

I'll paste in my code and a snapshot of my DataGridView.

'+++++++++++++++++++++++++++++++++++++++++++++++++++++
        '2011-10-26 Ted Palmer
        'Cloned from website:
        'http://vb.net-informations.com/datagridview/vb.net_datagridview_oledb.htm
        Dim connectionString As String = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
             "Data Source=C:\Drv2\Ted's_Stuff\PalmerInfoTechCRM\PalmerInfoTechCRM20111014.accdb;Persist Security Info=False"
        'Dim sql As String = "Select BlastName, BlastDate, BlastActive from tblEMailBlast" '<-- TEST 2011-10-26 Ted Palmer
        Dim sql As String = "SELECT Customers.ID AS CustomerID, tblBlastedEMailInfo.id AS BlastedEmailInfoID, [Customers]![First Name]+" & Chr(34) & " " & Chr(34) & "+[Customers]![Last Name] AS [First&LastName], Customers.[E-mail Address], tblBlastedEMailInfo.BlastDateTime " & _
        "FROM tblBlastedEMailInfo INNER JOIN Customers ON tblBlastedEMailInfo.CustomerID = Customers.ID " & _
        "WHERE (((tblBlastedEMailInfo.BlastDateTime) Is Null));"

        Dim connection As New OleDbConnection(connectionString)
        Dim dataadapter As New OleDbDataAdapter(Sql, connection)
        Dim ds As New DataSet()
        connection.Open()
        dataadapter.Fill(ds, "tblBlastedEMailInfo")
        connection.Close()
        Me.dgvEmailBlastList.DataSource = ds
        Me.dgvEmailBlastList.DataMember = "tblBlastedEMailInfo"
        Me.lblNmbrOfCustomers.Text = Me.lblNmbrOfCustomers.Text & " " & (Me.dgvEmailBlastList.RowCount).ToString
        '+++++++++++++++++++++++++++++++++++++++++++++++++++++

Open in new window

MyDataGridView.bmp
0
 
Ted PalmerInformation Technology ConsultantAuthor Commented:
Dani,

I was in the process of following the instructions you gave in your 1st post. That is when I got the much bigger update from Microsoft Service Pack 3 for Office 2007, and some other update. That was after I clicked on "Check for Updates" in the VS2008 menu. No updates were listed for VS2008. So for now I am believing that none are needed. I tried the Rset Tool Bar. It had no effect that I could tell.

Thank you for your suggestion.

TedPalmer
0
 
Ted PalmerInformation Technology ConsultantAuthor Commented:
Dani,

Thank you. I'll take a look right now.

Ted
0
 
Ted PalmerInformation Technology ConsultantAuthor Commented:
Dani,

Thank you for the 2 links in your last post. They are excellent for someone like me who is just getting started with using DataGridView. They conform to the greatest principal of Engining. That is the KISS principle. KISS = Keep It Simple Stupid. It sounds offensive at first, but I have been hearing it from a lot of people all my life. It works. Please allow me the time to experiment with what I just learned before awarding points and closing this question. I may need a little more help with this. You do good work. That is the best compliment I ever got. And it applies to you now.

Oh! I did find something else on Experts-Exchange that was helpful. So I'll show the link here.

http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Studio_.NET_2005/Q_23279731.html?sfQueryTermInfo=1+10+30+datagridview+iter

Ted
0
 
Ted PalmerInformation Technology ConsultantAuthor Commented:
Dani,

Thank you for the extra links. I got working more than half of what I wanted to get working. The rest should not be a problem. I have to run an errand at lunch, but I am really looking forward to looking at the extra links when I get back.

I learned how to use DataGridView, and I got what I needed to complete my project on time. You saved my behind.

Life is GOOD..!! Thank you,

Oh! That is a very impressive website you have there. Doing that is beyond my reach. But I will be going back there a lot more in the future because there is a lot there worth knowing.

Ted
0
 
Ted PalmerInformation Technology ConsultantAuthor Commented:
You do GREAT work..!!

Ted Palmer
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 7
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now