Hi,
I am using vb. I have data grid on my form. At runtime i am not able to enter data into data grid. I think grid is locked. Do i need to set any property or need to write code to enter as many records as i want at runtime?
I am using DataGrid. Is it ok or i should use DBGrid. My back end is access.
Please help me soon. It is quite urgent.
20 4728
Hi,
I am using vb. I have data grid on my form. At runtime i am not able to enter data into data grid. I think grid is locked. Do i need to set any property or need to write code to enter as many records as i want at runtime?
I am using DataGrid. Is it ok or i should use DBGrid. My back end is access.
Please help me soon. It is quite urgent.
y dont' u go for Componants VsFlexGrid
Hi,
I am using vb. I have data grid on my form. At runtime i am not able to enter data into data grid. I think grid is locked. Do i need to set any property or need to write code to enter as many records as i want at runtime?
I am using DataGrid. Is it ok or i should use DBGrid. My back end is access.
Please help me soon. It is quite urgent.
Hi ,
Refer to this link
http://msdn2.microsoft.com/en-us/library/y4ddh1ac(vs.80).aspx
it might help you solve your problem.
thanks
ansuman sahu
The link by ansuman will help you if you are using visual studio 2005
The below is the exact link for it (i presume)
Please do read the tutorial carefully http://msdn.microsoft.com/library/de...ridControl.asp
First check out the allowaddnew property set it to true
Thereafter if you are using a adodc control then set the relevant properties.
After setting the properties of adodc control right click on the datagrid and choose retrieve fields.
In case you are going to code then set the recordset to the datagrid
here's an example
Here Myrs2 is the record set
'Set on the cursor location
MyRs2.CursorLocation = adUseClient
MyRs2.Open "select * from investmentdetails ", MyCon, adOpenDynamic, adLockOptimistic
'Set the datasource to the record set
Set DataGrid1.DataSource = MyRs2
NEXT TIME ONWARDS PLEASE PUT ON YOUR CODE
Good luck
The link by ansuman will help you if you are using visual studio 2005
The below is the exact link for it (i presume)
Please do read the tutorial carefully http://msdn.microsoft.com/library/de...ridControl.asp
First check out the allowaddnew property set it to true
Thereafter if you are using a adodc control then set the relevant properties.
After setting the properties of adodc control right click on the datagrid and choose retrieve fields.
In case you are going to code then set the recordset to the datagrid
here's an example
Here Myrs2 is the record set
'Set on the cursor location
MyRs2.CursorLocation = adUseClient
MyRs2.Open "select * from investmentdetails ", MyCon, adOpenDynamic, adLockOptimistic
'Set the datasource to the record set
Set DataGrid1.DataSource = MyRs2
NEXT TIME ONWARDS PLEASE PUT ON YOUR CODE
Good luck
I dont want to display records from a perticular table. I want to enter records by my own into Data Grid at runtime. So what is the solution for that?
I dont want to display records from a perticular table. I want to enter records by my own into Data Grid at runtime. So what is the solution for that?
DID U TRY OUT THE CODE
'Set on the cursor location
MyRs2.CursorLocation = adUseClient
MyRs2.Open "select * from investmentdetails ", MyCon, adOpenDynamic, adLockOptimistic
'Set the datasource to the record set
Set DataGrid1.DataSource = MyRs2
NOW YOU WILL BE ABLE TO ENTER DATA.
Make sure to set AllowAddNew and AllowUpdate to true
No need any more code it will automatically add the records In case you want to delete set AllowDelete to true
DID U TRY OUT THE CODE
'Set on the cursor location
MyRs2.CursorLocation = adUseClient
MyRs2.Open "select * from investmentdetails ", MyCon, adOpenDynamic, adLockOptimistic
'Set the datasource to the record set
Set DataGrid1.DataSource = MyRs2
NOW YOU WILL BE ABLE TO ENTER DATA.
Make sure to set AllowAddNew and AllowUpdate to true
No need any more code it will automatically add the records In case you want to delete set AllowDelete to true
No, Still i am not able to enter new record in data grid. You dont understand my question. I dont want to display records of perticular table in grid. I want to add records in grid at runtime. Grid will be blank at runtime and i want to enter data in it. Neither cursor is coming in first column and first row nor i m able to enter the record
you can better use the component 'VSFlex' to write at the run time
you can better use the component 'VSFlex' to write at the run time
I dont understand ur reply. you have asked me to use FlexGrid? But in MSFlex Grid i wont be able to edit cell, right?
How to enter data in that at runtime? Plz let me know
I dont understand ur reply. you have asked me to use FlexGrid? But in MSFlex Grid i wont be able to edit cell, right?
How to enter data in that at runtime? Plz let me know
Shailja ,
MSFlexgrid is not editable.
That's y i had suggested u to use Componant One's VsFlexGrid
Try It
Good Luck
Shailja ,
MSFlexgrid is not editable.
That's y i had suggested u to use Componant One's VsFlexGrid
Try It
Good Luck
Thanks for the reply.Can u tell me how to add that component? I have never used it. How to add it and what code should i write to enter data at runtime?
Thanks for the reply.Can u tell me how to add that component? I have never used it. How to add it and what code should i write to enter data at runtime?
See this is the third part componant.
So u have to manage it by urself.
for run time editing no need to code any more its by default editable i.e. u've to set its editable property =0 or 1 or 2 or 3
try it Good Luck
See this is the third part componant.
So u have to manage it by urself.
for run time editing no need to code any more its by default editable i.e. u've to set its editable property =0 or 1 or 2 or 3
try it Good Luck
Shailja
Kindly let me know one thing. Are u connecting datagrid with ADODC control or are you using ADODB.
In case you are using ADODB I am at complete loss to understand why and where did my code fail in entering data.
I not only completed my project using that code. But got installed at the client's place with much success.
See this is the third part componant.
So u have to manage it by urself.
for run time editing no need to code any more its by default editable i.e. u've to set its editable property =0 or 1 or 2 or 3
try it Good Luck
How do i get the component? From which site, i will get that component? Can u suggest me site? Bcoz VB does not provide that component.
Shailja
Kindly let me know one thing. Are u connecting datagrid with ADODC control or are you using ADODB.
In case you are using ADODB I am at complete loss to understand why and where did my code fail in entering data.
I not only completed my project using that code. But got installed at the client's place with much success.
I am using ADODB. Why I need to connect datagrid as i dont want to display records from perticular table. I want to enter by my own. Is it possible with datagrid or not?
See this is the third part componant.
So u have to manage it by urself.
for run time editing no need to code any more its by default editable i.e. u've to set its editable property =0 or 1 or 2 or 3
try it Good Luck
How do i get the component? From which site, i will get that component? Can u suggest me site? Bcoz VB does not provide that component. Please tell me site name from where i get that component
better can be:
Build the disconnected recordset with the column names of datagrid as its fields
and assign it as datasource.
while saving it to database use this recordsets value:
Suppose you want columns like
First Name Last Name Address -
with rs.fields
-
.append "[First Name]",adBSTR
-
.append "[Last Name]",adBSTR
-
.append "[Address]",adBSTR
-
end with
-
-
rs.open
-
-
set dtgrid.datasource=rs
-
better can be:
Build the disconnected recordset with the column names of datagrid as its fields
and assign it as datasource.
while saving it to database use this recordsets value:
Suppose you want columns like
First Name Last Name Address -
with rs.fields
-
.append "[First Name]",adBSTR
-
.append "[Last Name]",adBSTR
-
.append "[Address]",adBSTR
-
end with
-
-
rs.open
-
-
set dtgrid.datasource=rs
-
I dont understand your reply. Can you give me complete code for disconnected datasource. How to make FlexGrid to VSFlexGrid?
your prime requirement was data entry in Datagrid.
This technique is suitable for you.
your prime requirement was data entry in Datagrid.
This technique is suitable for you.
I dont understand your code, you have given before. Please give me complete code. On which event, i should write this code. The code you have given for what, for Data Grid or for VSFlex Grid. Please let me know
write this code on form load and it is for Datagrid control.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Jordan O'Hare |
last post by:
Hello Everyone,
I am after some help with the following:
I have a windows application that contains a list box and
two data grids. All three controls are binded to a dataset
that contains...
|
by: kk |
last post by:
Have 2 problems, any help is appreciated.
Tab with Grids
--------------
BL - fetching data from DB ( 5 secs - 10 rows)
Grid Laod - 20 secs
Grid Paint on tab change - 20 secs
Problem: The...
|
by: Da-Breegster |
last post by:
Hi. I'm attempting to write a roguelike (think nethack, crawl, angband,
tome, adom, and yes, I suppose even rogue) in Perl and I've ran into a
problem regarding the data structure for the map and...
|
by: Rushabh Dadbhawala |
last post by:
Problem:
I am fetching data from the database, storing it in a
dataSet, and binding it with a Data Grid. The DataGrid
controls allows sorting. The problem is that when the data
is sorted on one...
|
by: Josef Meile |
last post by:
Hi,
I'm using a ComboBox, some Textboxes, and a DataGrid to represent a
many-to-many relationship between Person and Course. Each time that I change
the value in the ComboBox (which for now is...
|
by: Richard |
last post by:
If the grid is dragged off the screen and back on the data is visible. Tried
a dg.refresh() and Inactivate(). Can I do this by overriding custom base
class OnPaint that my form inherits from? I...
|
by: pmud |
last post by:
Hi,
I have a web page (asp.net, code:c#). I havean html table with text boxes.
Based on the user input , records are displayed in the data grid below it.
Now the datagrid has a large no. of...
|
by: tshad |
last post by:
Is there a way to carry data that I have already read from the datagrid from
page to page?
I am looking at my Datagrid that I page through and when the user says get
the next page, I have to go...
|
by: Anil Gupte |
last post by:
After reading a tutorial and fiddling, I finally got this to work. I can
now put two tables created with a DataTable class into a DataRelation.
Phew! And it works!
Dim tblSliceInfo As New...
|
by: insirawali |
last post by:
Hi all,
I have this problem, i need to know is there a way i cn use the data
adapter's update method in this scenario.
i have 3 tables as below
create table table1{
id1 int identity(1,1)...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |