473,827 Members | 2,926 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid problem

Hi all,

I have been struggling with datagrid for more than a week. I pretty new
to datagrid, have never used it before.

All I am trying to do is Edit the TDBGrid in Visual basic. I am
populating the Datagrid from a adodb recordset. Here is my code

Dim rssqldb As ADODB.Recordset
Set rssqldb = gfGetData(Conn, 10, "exec payroll" & "'12/01/06'")
TDBGRID1.dataso urce = rs

I have set the properties for allowupdate,all owinsert, etc to be true.
Datamode is in bound mode.

I can see the data in the Datagrid, but cannot edit it. Can anyone pls
Help!

Dec 13 '06 #1
4 2306
juyja,
The datagrid is not mad for a recordset. What is in fact also not with
complete dotnet.

Can you tell a little bit what you want because the datagrid exist as Web
and windowform media.

In fact it is using a datatable and than a dataadapter.

As well tell what kind of database you are using, maybe we have than a
sample for you.

Cor

"juya" <ma******@yahoo .comschreef in bericht
news:11******** *************@7 3g2000cwn.googl egroups.com...
Hi all,

I have been struggling with datagrid for more than a week. I pretty new
to datagrid, have never used it before.

All I am trying to do is Edit the TDBGrid in Visual basic. I am
populating the Datagrid from a adodb recordset. Here is my code

Dim rssqldb As ADODB.Recordset
Set rssqldb = gfGetData(Conn, 10, "exec payroll" & "'12/01/06'")
TDBGRID1.dataso urce = rs

I have set the properties for allowupdate,all owinsert, etc to be true.
Datamode is in bound mode.

I can see the data in the Datagrid, but cannot edit it. Can anyone pls
Help!

Dec 14 '06 #2

juya wrote:
Hi all,

I have been struggling with datagrid for more than a week. I pretty new
to datagrid, have never used it before.

All I am trying to do is Edit the TDBGrid in Visual basic. I am
populating the Datagrid from a adodb recordset. Here is my code

Dim rssqldb As ADODB.Recordset
Set rssqldb = gfGetData(Conn, 10, "exec payroll" & "'12/01/06'")
TDBGRID1.dataso urce = rs

I have set the properties for allowupdate,all owinsert, etc to be true.
Datamode is in bound mode.

I can see the data in the Datagrid, but cannot edit it. Can anyone pls
Help!
Check out this link:
http://aspnet.4guysfromrolla.com/articles/040502-1.aspx

Datagrids are not very easy to work with. Are you using the visual
designer, or strictly source code ?

I think you need to write code to handle the edit. I think I got this
working once by tweaking the datagrid properties from the form designer.

Dec 14 '06 #3
The database is sql server. I am also using visual basic. Thanks and
any help would be greatly appreciated.


Cor Ligthert [MVP] wrote:
juyja,
The datagrid is not mad for a recordset. What is in fact also not with
complete dotnet.

Can you tell a little bit what you want because the datagrid exist as Web
and windowform media.

In fact it is using a datatable and than a dataadapter.

As well tell what kind of database you are using, maybe we have than a
sample for you.

Cor

"juya" <ma******@yahoo .comschreef in bericht
news:11******** *************@7 3g2000cwn.googl egroups.com...
Hi all,

I have been struggling with datagrid for more than a week. I pretty new
to datagrid, have never used it before.

All I am trying to do is Edit the TDBGrid in Visual basic. I am
populating the Datagrid from a adodb recordset. Here is my code

Dim rssqldb As ADODB.Recordset
Set rssqldb = gfGetData(Conn, 10, "exec payroll" & "'12/01/06'")
TDBGRID1.dataso urce = rs

I have set the properties for allowupdate,all owinsert, etc to be true.
Datamode is in bound mode.

I can see the data in the Datagrid, but cannot edit it. Can anyone pls
Help!
Dec 14 '06 #4
Juya,
The database is sql server. I am also using visual basic. Thanks and
any help would be greatly appreciated.
That was not my question

Repeating, is it for a web or a windowsform application.
In other words is it ASPNET or not.

Cor
"juya" <ma******@yahoo .comschreef in bericht
news:11******** *************@l 12g2000cwl.goog legroups.com...
The database is sql server. I am also using visual basic. Thanks and
any help would be greatly appreciated.


Cor Ligthert [MVP] wrote:
>juyja,
The datagrid is not mad for a recordset. What is in fact also not with
complete dotnet.

Can you tell a little bit what you want because the datagrid exist as Web
and windowform media.

In fact it is using a datatable and than a dataadapter.

As well tell what kind of database you are using, maybe we have than a
sample for you.

Cor

"juya" <ma******@yahoo .comschreef in bericht
news:11******* **************@ 73g2000cwn.goog legroups.com...
Hi all,

I have been struggling with datagrid for more than a week. I pretty new
to datagrid, have never used it before.

All I am trying to do is Edit the TDBGrid in Visual basic. I am
populating the Datagrid from a adodb recordset. Here is my code

Dim rssqldb As ADODB.Recordset
Set rssqldb = gfGetData(Conn, 10, "exec payroll" & "'12/01/06'")
TDBGRID1.dataso urce = rs

I have set the properties for allowupdate,all owinsert, etc to be true.
Datamode is in bound mode.

I can see the data in the Datagrid, but cannot edit it. Can anyone pls
Help!

Dec 15 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
9931
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell (multi-select without modifier keys). I got that working fine, but I also wanted to keep rows selected after a sort, which I do by storing the row's id in an arraylist. The idea was to do the sort and then go back and re-select the rows with that...
0
3194
by: Emerson | last post by:
The following assumes a System.Windows.Forms.DataGrid with a System.Data.DataTable set as the DataSource. I'm programming in C# Here's my scenario I click in a cell on a DataGrid. I enter some text. Before changing to another cell in the DataGrid, I move my mouse pointer off the DataGrid and change the selected item in a ListBox or TreeView. Here's my question Which should fire first, the DataTable's RowChanged/CellChanged event or...
5
2602
by: Jeff | last post by:
IDE: VS 2003 :NET OS: XP Pro My app have a form with a tab-control on it. The tab-control have 2 tabpages. One of the tabpages displays a datagrid, and the other tabpage displays details (order date, name, address etc) about the selected row in the datagrid... My problem is when I enter a new record in the details tabpage (saves data to database), and go back to the datagrid. Only the data from the PM-table
1
4348
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls (watch the layout, some have child controls):
4
2130
by: The Alchemist | last post by:
I am having a problem with a dynamically-generated Datagrid. It is important to point out that this problem does not exist with a design-time created Datagrid, but only with a dynamically generated Datagrid in a Web Custom Control (WCC) : The datagrid has LinkButton Column which has a select LinkButton for each row. When this button is clicked, the Datagrid raises its 'ItemCommand' event which captures the information for that row and...
9
5068
by: tshad | last post by:
How do I find (and set) a couple of labels in the Footer after a DataGrid is filled? I have a bunch of DataGrids that get displayed nested inside a DataList. The datagrid looks like: ******************************************************************************* <asp:DataGrid visible="False" border=1
4
3501
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a snippet from my .css file: *************************** body { margin:0; padding:0;
0
1709
by: optimizeit | last post by:
What I am attempting to do is import an Excel Workbook and display the worksheets in a datagrid dynamically. I am very close to getting this to work. I have to this point successfully imported a single worksheet into a dataset. I successfully built a dynamic datagrid. And I did successfully bind it to the dataset. Then I added the datagrid control to a PlaceHolder. The first worksheet displays beautifully. The next step is to allow...
9
2734
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the code: <script runat="server"> Dim sqlConn As New SqlConnection(".....") Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) If Not (Page.IsPostBack) Then FillDataGrid()
2
6600
by: =?Utf-8?B?Y3JlYXZlczA2MjI=?= | last post by:
I have a nested datagrid in a xaml file, the parent datagrid loads the vendor information and the details loads the documents for that vendor in a datagrid. Everything is working fine until I click in the child datagrid and then go to the combobox and choose another vendor. When the new vendor is loaded nothing shows in the datagrid but the itemsource shows the info is there. Know if I click on the child cell and then click back on the...
0
9632
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10747
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10466
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10507
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10186
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9293
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5612
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5769
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4406
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.