Table Question
-
I was wondering if its possible to set the visibility element of an HTML table, using the aspx.vb file. I know you cant set the ID and call it like that. Just wondering if there is any good way to do this (preferably without JS). What i'm doing is setting certain tables to be visible based on who logs in. Thanks, Nate Lindley
-
I was wondering if its possible to set the visibility element of an HTML table, using the aspx.vb file. I know you cant set the ID and call it like that. Just wondering if there is any good way to do this (preferably without JS). What i'm doing is setting certain tables to be visible based on who logs in. Thanks, Nate Lindley
yes, it is easy to achieve but what you have to do is to built the table (add rows and colums) dynamically at runtime in the table... e.g in code-behind file (default.vb) use if condition=true then //add code to create table with 3 rows and 5 colums elseif condition2 =true then // add code to create table with 2 rows and 2 colums elseif condition3 = true then and so on......hope it helps Note: at Design time you should just place the Table control on the place where it needs to drawn at runtime... then handle, height, width, and etc attributes programtically in code behind file
:- Rashid Ali -:
-
I was wondering if its possible to set the visibility element of an HTML table, using the aspx.vb file. I know you cant set the ID and call it like that. Just wondering if there is any good way to do this (preferably without JS). What i'm doing is setting certain tables to be visible based on who logs in. Thanks, Nate Lindley
Of course. objHTMLTbl.Visible = false
I didn't get any requirements for the signature
-
Of course. objHTMLTbl.Visible = false
I didn't get any requirements for the signature
Hey Todd, Thanks for the answer. But, it is an HTML table, thus not having a Visible attribute (has visibility) and as far as I know you cant set the attributes of an HTML table by using the ID (that would def be the easiest way tho). Thanks, Nate Lindley
-
yes, it is easy to achieve but what you have to do is to built the table (add rows and colums) dynamically at runtime in the table... e.g in code-behind file (default.vb) use if condition=true then //add code to create table with 3 rows and 5 colums elseif condition2 =true then // add code to create table with 2 rows and 2 colums elseif condition3 = true then and so on......hope it helps Note: at Design time you should just place the Table control on the place where it needs to drawn at runtime... then handle, height, width, and etc attributes programtically in code behind file
:- Rashid Ali -:
Hey Rashad, Yea I could do that to create a data table, but I just want an HTML table. Basically the situation is that I'm going to have a page with 5 tables on it (one on top of the other). Each table has multiple rows (one for each PDF for that state), and I want to set the Visibility attribute (style) of each one. Thanks, Nate
-
Hey Rashad, Yea I could do that to create a data table, but I just want an HTML table. Basically the situation is that I'm going to have a page with 5 tables on it (one on top of the other). Each table has multiple rows (one for each PDF for that state), and I want to set the Visibility attribute (style) of each one. Thanks, Nate
i think u can achieve the same task using Server Table Control, why you want to use html table only?
:- Rashid Ali -:
-
i think u can achieve the same task using Server Table Control, why you want to use html table only?
:- Rashid Ali -:
Thanks for the quick responses rashad! Basically these tables are just one column tables with multiple rows that contain links to PDF files. I know I could just use one table and set the links for that table, but I'd rather have 5 separate tables and have their Visibility properties changed based on the login. Thanks, Nate