Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 10th, 2007, 02:32 PM
Registered User
 
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to text in statusbar panel and blank datagrid

I am using VB.NET 2003
1. When I am using multiply forms and i want show text in statusbar panel but it's didn't show tell me how to send text in statusbar panel when we are working with Mdi Forms?
2. how we get a blank data grid cell for input and how we put combobox or button in data grid.
please help me in it's
 
Old January 10th, 2007, 02:42 PM
Authorized User
 
Join Date: Nov 2006
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ef1196
Default

You are asking two completely different questions and you really should post each separately. That said, here you go:

Here is one solution regarding setting text on a form (from another form):

1.) Create an application wide variable (most likely at the module level) to hold the text.
2.) Put a timer on the form that you want the text updated on and have it set the text to the value of the public variable from step one each time the timer refreshes.
3.) When one form sets the value of your public variable it will be displayed on your other form.

Here is one example of adding a ComboBox to a DataGridView programatically (this assumes that it is a databound grid):

Dim dgvComboBoxColumn_ChargeType As New DataGridViewComboBoxColumn
With dgvComboBoxColumn_ChargeType
    '* This is the field that will be updated by the ComboBox
    .DataPropertyName = "Charge_Type"
    '* This is the column header for the ComboBox
    .HeaderText = "Charge Type"
    '* This tells the DataGridView what type of column it is.
    .DisplayStyle = DataGridViewComboBoxDisplayStyle.ComboBox
    '* This sets the display value of the ComboBox if NULL.
    .DefaultCellStyle.NullValue = "N/A"
    '* This is where you will get your data from for the
    '* ComboBox (in this case a previously created BindingSource).
    .DataSource = Me.bsChargeType
    '* This is the field from the stored procedure that will
    '* be displayed in the ComboBox.
    .DisplayMember = "ID"
End With

'* Add the ComboBox to the DataGridView
Me.dgvMain.Columns.Add(dgvComboBoxColumn_ChargeTyp e)



Best Regards,
Earl Francis
 
Old January 11th, 2007, 03:24 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Also, when you create the instance of the MDI child window, you could pass into the constructor the instance of the status bar control from the parent window. Then you can directly access the status bar from the child window(s).

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
leaving blank text box in form when inserting data saif44 ASP.NET 2.0 Professional 1 March 9th, 2006 07:29 AM
ViewState problem when adding a panel to a panel koekie17 C# 3 February 20th, 2006 09:17 AM
How to insert text into panel with out textarea JOptionPane Java GUI 5 May 6th, 2005 03:35 PM
DataGrid Updates BLANK PAGE (Chapter 17) happyhorseygal BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 April 8th, 2004 01:11 PM
Menu help in Status Bar.panel(1).text Kaustav VB How-To 9 February 5th, 2004 01:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.