473,395 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how do i refresh datagrid control

5
i'm working in visual basic.
i want to dispaly the records in a datagrid control who's
data source is adodc.i want to display the records for a particular date.
i.e. if the date which i accept from the user exists,then for that
particular date all the records must be displayed.
my problem is when i run my form all the records are displayed.
the records ,which are in my access database table.
so i set the following properties,

Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from invoice where Datein=" & Val(txtdate.Text)
Adodc1.Refresh
DataGrid1.Refresh

even then the above code doesn't work.
how do i refresh datagrid control??
Jul 30 '07 #1
5 9382
hariharanmca
1,977 1GB
i'm working in visual basic.
i want to dispaly the records in a datagrid control who's
data source is adodc.i want to display the records for a particular date.
i.e. if the date which i accept from the user exists,then for that
particular date all the records must be displayed.
my problem is when i run my form all the records are displayed.
the records ,which are in my access database table.
so i set the following properties,

Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from invoice where Datein=" & Val(txtdate.Text)
Adodc1.Refresh
DataGrid1.Refresh

even then the above code doesn't work.
how do i refresh datagrid control??
Good, But you never Initialize the datagrid to ADODC1.
if it is not, then you have to fill that datagrid.
Jul 30 '07 #2
vai
5
Good, But you never Initialize the datagrid to ADODC1.
if it is not, then you have to fill that datagrid.
i tried initializing the datagrid to ADODC1.
but its not working.
datagrid control is not refreshing.
pls help me.
Aug 1 '07 #3
fplesco
82
i tried initializing the datagrid to ADODC1.
but its not working.
datagrid control is not refreshing.
pls help me.
Hi -

Is your datagrid control bind to ADODC1?

Like
Expand|Select|Wrap|Line Numbers
  1. Set DataGrid1.Recordsource = Adodc1.Recordsource 'OR Recordset
  2.  
Well, Im not sure at those methods but you can try play on that.

I'll try this at home and I'll get back to you once this is not yet solved.
Aug 2 '07 #4
hariharanmca
1,977 1GB
i tried initializing the datagrid to ADODC1.
but its not working.
datagrid control is not refreshing.
pls help me.

can you post the code, how you bind the datagrid to your datagrid?
Aug 2 '07 #5
vai
5
can you post the code, how you bind the datagrid to your datagrid?
thanks a lot sir !!
my code is working now.
first of all i initialized DATAGRID control to ADODC.
then i run my SQL Query.
thanks once again.
Aug 2 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: News Central | last post by:
Hi All!, I have a problem refreshing data on the Datagrid control. I execute sql statement directly using the ADODC control and try to make it updated onto the Datagrid control, however, the...
1
by: Amber | last post by:
The DataGrid allows you to make columns visible or invisible on demand - even edit and other special columns. This article will show you how it is done. Some developers have reported problems...
5
by: ~~~ .NET Ed ~~~ | last post by:
Well, maybe not half-baked but 75%. I find very frustrating working with the DataGrid control. It offers a lot of functionality which really comes in handy. Unfortunately you can only enjoy a...
7
by: Juan Romero | last post by:
Hey guys, please HELP I am going nuts with the datagrid control. I cannot get the damn control to refresh. I am using soap to get information from a web service. I have an XML writer output...
0
by: Jeremiah Adams | last post by:
I am having two issues with the Datagrid and I hope that someone can help me out with them. 1) Printing. I pulled the code for sending the control to a printer off the msdn site. It works for...
2
by: sentu83 | last post by:
hello, can some one pls help me about certain problem.Actually, i am using "datagrid" control of VB6.0 to display data with the help of ADODB recordset. The back end is a MSACCESS table. I...
3
by: R.A.F. | last post by:
Hi, I have a custom control in which i have a property based on CollectionBase class. like the following one : //------- XGrid.cs file --------------// public ColumnsCollection Columns {
2
by: jock1up | last post by:
I am working with editing within a DataGrid control cell and am confused about which events occur after the editing is completed. I see that 5 events can occur total, including the ones below and...
6
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi - I'm having trouble refreshing a datagrid control bound to a dataset that was created from the New Data Source wizard. What is the code required to refresh the datagrid with data from the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.