textbox-table
-
hello 1) how do i create a textbox with the position x:20 and y:150 from code. 2) is there a function to read a specific row and a column from a table example: read column 4 from row 3 10x
This ASP.NET? If so, head to the appropiate message board.**
How xacc.ide transforms text to colored words on the screen
Intel PentuimM (aka Centrino) undervolting**
-
hello 1) how do i create a textbox with the position x:20 and y:150 from code. 2) is there a function to read a specific row and a column from a table example: read column 4 from row 3 10x
(1) Are you referring to WinForm or WebForm applications for item 1? If you're using WinForms, then you should be able to do something like the following in the form's codebehind:
public AddTextBox(string id) { TextBox box = new TextBox(); box.ID = id; box.Top = 150; box.Left = 20; this.Controls.Add(box); }
You can do something very similar to the above WinForm example with WebForms, but positioning will take slightly more attention, as will the timing of your control's addition to the form's control hierarchy. (2) Are you referring to a DataTable? If so, then:object value = dataTable.Rows[int rowIndex][string columnName]
from your example:object value = dataTable.Rows[3][4];
...should do it. If you're talking about HTML tables, then it would depend on how the table was created. If you're doing it in code, then you should be able to walk the page's control hierarchy to get at it. If it's static HTML, javascript can do it, but it's kind of a long-winded answer unless you need it, and the question belongs in a different forum. Good luck.The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
-- modified at 2:19 Monday 22nd May, 2006
-
(1) Are you referring to WinForm or WebForm applications for item 1? If you're using WinForms, then you should be able to do something like the following in the form's codebehind:
public AddTextBox(string id) { TextBox box = new TextBox(); box.ID = id; box.Top = 150; box.Left = 20; this.Controls.Add(box); }
You can do something very similar to the above WinForm example with WebForms, but positioning will take slightly more attention, as will the timing of your control's addition to the form's control hierarchy. (2) Are you referring to a DataTable? If so, then:object value = dataTable.Rows[int rowIndex][string columnName]
from your example:object value = dataTable.Rows[3][4];
...should do it. If you're talking about HTML tables, then it would depend on how the table was created. If you're doing it in code, then you should be able to walk the page's control hierarchy to get at it. If it's static HTML, javascript can do it, but it's kind of a long-winded answer unless you need it, and the question belongs in a different forum. Good luck.The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
-- modified at 2:19 Monday 22nd May, 2006
-
box.Top = 150; box.Left = 20; it dosen't work - 'System.Web.UI.WebControls.TextBox' does not contain a definition for 'Top' i'm using vs.2005 do i need to add something else?
You should be asking this question in the ASP.NET forum, thats why you are getting wrong answers.**
How xacc.ide transforms text to colored words on the screen
Intel PentuimM (aka Centrino) undervolting**