Since a datagrid is just an html table anyways, this seems like it
should be easy but it's giving me a hard time. In ItemDataBound sub I'm
trying to kick off javascript code using response.write( ). The
javascript code is contained within an IF block and if
e.Item.Cells(0) .Text = myVariable then the row gets hidden.
A user can still view those rows later with a buttonclick.
Only problem is, I aside from what I've described above, I haven't the
foggiest notion of how to go about writing the javascript for this one.
Anyone have any ideas?
Thanks. 6 1994
That's a server-side task:
if e.Item.Cells(0) .Text = myVariable
e.Item.CssClass = 'Invisible'
and somewhere in stylesheets set
..Invisible{dis play:none}
Eliyahu
"Roy" <ro**********@g mail.com> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. . Since a datagrid is just an html table anyways, this seems like it should be easy but it's giving me a hard time. In ItemDataBound sub I'm trying to kick off javascript code using response.write( ). The javascript code is contained within an IF block and if e.Item.Cells(0) .Text = myVariable then the row gets hidden.
A user can still view those rows later with a buttonclick.
Only problem is, I aside from what I've described above, I haven't the foggiest notion of how to go about writing the javascript for this one.
Anyone have any ideas? Thanks.
I would usually hide rows on a datagrid when they were children of a parent
record. I have a sample with the source code for such a datagrid: http://www.societopia.net/samples/webform2.aspx
---
"Roy" wrote: Since a datagrid is just an html table anyways, this seems like it should be easy but it's giving me a hard time. In ItemDataBound sub I'm trying to kick off javascript code using response.write( ). The javascript code is contained within an IF block and if e.Item.Cells(0) .Text = myVariable then the row gets hidden.
A user can still view those rows later with a buttonclick.
Only problem is, I aside from what I've described above, I haven't the foggiest notion of how to go about writing the javascript for this one.
Anyone have any ideas? Thanks.
Thanks for the info Eliyahu, it works great, but I was hoping to
develop a client-side way of hiding/revealing datagrid rows just
because I detest the "flicker" that occurs with a postback...
You can do it easily on client-side. When I said it was a server-side task I
meant the first page load, not a postback. You can set className property of
the table rows on client side to "Invisible" .
Eliyahu
"Roy" <ro**********@g mail.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. . Thanks for the info Eliyahu, it works great, but I was hoping to develop a client-side way of hiding/revealing datagrid rows just because I detest the "flicker" that occurs with a postback...
Beautiful!
Thanks my friend!
Awesome, thanks for the link socie! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ben |
last post by:
I have a form for data entry which is in a table. I have a select box
to enter a customer name, which takes it's options from the customer
database. I have a button to add a new customer. What I want is for the
relevant customer fields to magically appear underneath the selelect
box
when the "add customer button" is pressed. For some reason my code is
NOT
working. Have been trying to do it with div tags and style sheets using
a...
|
by: Luis Esteban Valencia Muñoz |
last post by:
I have a datagrid that displays editable text fields (2 different price
fields) and a checkbox in every row.
It has a "SaveChanges" button at the bottom, which, when pressed, looks at
every checkbox in the datagrid, if it is checked, it updates the
corresponding rows prices.
That works, no problem.
What I need to do is that when a user clicks into either of the price text
fields, the checkbox automatically checks itself.
This will save...
|
by: Tim::.. |
last post by:
Hi
I'm trying to create a little application that shows an image of a user when
you mouseover there details in a datagrid. The datagrid is populated from an
Active Directory Database and I presume the best way to create the popup is
by using a layer with javascript hide and show...
I intend to use a database to store the pictures in and the use the users
full name to build a relationship between the database with the images and
the...
|
by: Wyatt70 |
last post by:
I'm attempting to implement a javascript popup calendar in a DataGrid.
The calendar will be used to insert a date into a textbox. I keep
getting a "System.NullReferenceException: Object reference not set to
an instance of an object" error, which points to the following line:
lnkCalendar.Attributes("OnClick") =
String.Format("window.open('Calendar.aspx?textbox={0}','cal','...')",
txtEstimatedDeploy)
Here is the complete code for the...
|
by: julian.tklim |
last post by:
Hi,
I need to build an editable Datagrid with add & delete buttons on each
row using javascript.
DataGrid need not be pre-populated with values.
To make the thing complicated, one of the column need to be a date
picker field.
I know things will be easier with ASPX datagrid.
| |
by: Liz |
last post by:
Do you really have to use these methods like RegisterClientScriptBlock() to
get client-side Javascript into an ASP.NET 2.0 page ? For anything beyond
trivial scripting, this is really a painful process, no ?
I guess I'm not clear why you can't put JS inline ? Doesn't it just get
emitted along with any literal HTML in your page ??
Is there a way to load an external xxx.js file into your code ?
Thanks for any input ...
|
by: rn5a |
last post by:
The .NET 2.0 documentation states the following:
When using a DataSet or DataTable in conjunction with a DataAdapter & a
relational data source, use the Delete method of the DataRow to remove
the row. The Delete method marks the row as Deleted in the DataSet or
DataTable but does not remove it. Instead when the DataAdapter
encounters a row marked as Deleted, it executes its DeleteCommand
method to delete the row at the data source. The...
|
by: Peter Afonin |
last post by:
Hello,
I'm not an expert in Javascript, so I'm seeking an advice.
As I mentioned in my previous post, I use Javascript to check whether at
least one checkbox in the datagrid has been checked. I have to use
Stringbuilder to do this:
Dim iCount As Int32
Dim sClientSideValidate As New StringBuilder
|
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...
|
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...
|
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,...
| |
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...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |