| | |
Hide Button when DataView is empty
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
for Dataview use or
for datatables use
ASP.NET Syntax (Toggle Plain Text)
If dataview.count = 0 then button1.visible = False else button1.visible = True End If
for datatables use
ASP.NET Syntax (Toggle Plain Text)
If datatable.rows.count = 0 then button1.visible = False else button1.visible = True End If
•
•
Join Date: Aug 2007
Posts: 57
Reputation:
Solved Threads: 1
Thanks for your reply ptaylor965, !!
Well, first of all, I made a mistake about the component, Its a gridview; second of all, on which event do I put these codes? consider that my gridview its binded by design with a objectdatasource, and I can't change that.
Thanks again!!
Omar
Well, first of all, I made a mistake about the component, Its a gridview; second of all, on which event do I put these codes? consider that my gridview its binded by design with a objectdatasource, and I can't change that.
Thanks again!!
Omar
•
•
•
•
for Dataview useorASP.NET Syntax (Toggle Plain Text)
If dataview.count = 0 then button1.visible = False else button1.visible = True End If
for datatables useASP.NET Syntax (Toggle Plain Text)
If datatable.rows.count = 0 then button1.visible = False else button1.visible = True End If
For DataGrids use I would place this code on form_load and on any buttons or events that fill/refresh the datagrid
ASP.NET Syntax (Toggle Plain Text)
If datagrid.rows.count = 0 then button1.visible = False else button1.visible = True End If
![]() |
Similar Threads
- Collapsing/Expanding a grid view row in a ASP.net Web form (ASP.NET)
- does <img tag has disable property (HTML and CSS)
- Stop printing boxes around forms? (JavaScript / DHTML / AJAX)
- hide link if variable is empty (JSP)
- Window Medias player a b!tch to get rid of??? (OS X)
- hijackthis log...I need help please (Viruses, Spyware and other Nasties)
- recommendations for JavaScript learning resources? (JavaScript / DHTML / AJAX)
Other Threads in the ASP.NET Forum
- Previous Thread: Comment tag ASP.NET
- Next Thread: Session variables
Views: 3537 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 3.5 activexcontrol advice ajax asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox child class click compatible confirmationcodegeneration content contenttype countryselector courier css database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdown dropdownmenu edit feedback flash flv folder form forms google grid gridview homeedition hosting identity iframe iis index javascript jquery languages list maps menu mono mssql multistepregistration nameisnotdeclared object objects order problem profile ratings refer rotatepage save search security serializesmo.table session silverlight smartcard sql suse textbox tracking typeof unauthorized update validation vb vb.net video view virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webdevelopment wizard xml





