473,503 Members | 544 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Populate a textbox inside a datagrid on loadform

I have a grid with some columns that are BOUND columns. I have three
more columns that are TEMPLATE columns with textboxes inside. i need
to populate one of the textboxes with information based on a
parameter... the code below works on a textbox outside of the grid.
how would you use the logic to populate txtDiscCov inside a grid.

If Not IsPostBack Then
sqlPropLU.Parameters("@PropID").Value = lblEntryType.Text
SqlRating.Open()
Dim dreader As SqlClient.SqlDataReader
dreader =
sqlPropLU.ExecuteReader(CommandBehavior.SingleRow)
If dreader.Read() Then
txtDiscCov.Text = dreader(1)
End If
dreader.Close()
SqlRating.Close()
End If
tried the --- Dim txtDiscCOv As TextBox =
CType(grdNotes.Cells(0).Controls(1), TextBox)-- have the syntax wrong.
Any help would be gratefully appreciated
(0).Controls(1), TextBox)-- have the syntax wrong.
any help would be greatfully appreciated
Nov 22 '05 #1
0 692

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

Similar topics

0
1267
by: anna | last post by:
I have a grid with some columns that are BOUND columns. I have three more columns that are TEMPLATE columns with textboxes inside. i need to populate one of the textboxes with information based on...
1
2709
by: Swadh | last post by:
Hi, I need urgent help on Windows Form datagrid. I have to Display a datagrid that has a textbox column and another one combo box column. I have two tables in my Access database as: Table 1:...
2
1199
by: jm | last post by:
I have datagrid. Inside the template columms there is a textbox. It has an id. When the textbox wasn't inside the datagrid tags, I could reference with order_id.text = "some text" but all of a...
1
2669
by: Irishmaninusa | last post by:
Hello Everyone, I have a datagrid and have used a text box as way to allow a user to edit items in the grid. My question for you is how is it possible to write code for the text change event of...
1
1449
by: Simon | last post by:
Hi I have a datagrid with a TemplateColumn where I have put inside a TextBox without databinding with the data source. The TextBox is used to type a number for each row of the datagrid. I have...
0
1375
by: jason | last post by:
Hello everyone. I am trying to write some custom command events into a DataGrid. The command that is currently giving me trouble is an "Add" custom command in the footer of a template column. ...
14
3631
by: Barney | last post by:
How can I populate a textbox from a dataview? I have a dataset i'm filtering on and i want to populate several textboxes based on that filter. How can i get that to work? I've tried: ...
2
2730
by: Junior | last post by:
Hi All, I haven't got a response for this question lately and i really need to get this done ASAP. I have a .aspx page that has table two column four rows on it. 1. How do i use codebehind C#...
2
2967
by: ismaelf | last post by:
i have a textbox in a template column in a datagrid, it displays the initial value of the row, but when i change it remains with the original value (it doesnt get the new value..) i fill the...
1
2077
by: tommy.tashjian | last post by:
Hi, I have a datagrid with a textbox column that needs a lookup table. Now, I was going to just use a dropdownlist instead of the textbox, but that won't fly here. So, what I need to know, is it...
0
7087
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
7281
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
7334
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...
1
6993
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...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3168
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...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
737
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
383
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.