|
1. You can use DataGrid's ItemDataBound event for this.
At any point you can have the exact cell value by --> e.Item.Cells[x].Text
--------------------------------------------------------------
2. You can also have mouseover or mouse-click events for a DataGrid Row.
if (e.Item.ItemType == ListItemType.Item ||e.Item.ItemType == ListItemType.AlternatingItem)
{
if (e.Item.ItemType == ListItemType.Item)
{
e.Item.Attributes.Add("onmouseover", "JavaScriptFunctionName();");
e.Item.Attributes.Add("onmouseout", "JavaScriptFunctionName();");
}
if (e.Item.ItemType == ListItemType.AlternatingItem)
{
e.Item.Attributes.Add("onmouseover", "JavaScriptFunctionName();");
e.Item.Attributes.Add("onmouseout", "JavaScriptFunctionName();");
}
}
|
|
|
|
|
i want to know how it can be done in gridview control
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
hello,
i am trying to find out "how to add a simple textbox to a form at runtime and then send its textvalue(whatever written in it) to a datatable made in my dadabase"
is anybody can help me!
thanx in advance!
nitin
|
|
|
|
|
Add a placeholder control where you want to add the textbox
then at run time create the new object of your textbox give it id and then
add that textbox to the placeholder .
now the control is in page you can use that value
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Nitin, sandip is right...
However, you can also use "Panels" for the same
protected System.Web.UI.WebControls.Panel Panel1;
... ...
.... ....
TextBox txt =new TextBox();
txt.ID = "textBox1";
Panel1.Controls.Add(txt);
... ...
.... ....
//At any point of time you can read value from this text box
TextBox tempText = new TextBox()
tempText = (TextBox)Panel1.FindControl("textBox1")
string strValue = tempText.Text()
Sreekumar P P
|
|
|
|
|
thanx sir ji,
your view is very helpful 4 me but there is a prblm now...
i put 2 btn on form
btn1.text= add button
btn2.text= insert
when i click btn1 , a textbox appeared on forn but when i click btn2 the textbox disappear and nothing inserted in my database.
nitin
|
|
|
|
|
Any one knows what is Web 1.0 and Web 2.0 ?
|
|
|
|
|
Web 1.0 was about reading, Web 2.0 is about writing
Web 1.0 was about companies, Web 2.0 is about communities
Web 1.0 was about client-server, Web 2.0 is about peer to peer
Web 1.0 was about HTML, Web 2.0 is about XML
Web 1.0 was about home pages, Web 2.0 is about blogs
Web 1.0 was about portals, Web 2.0 is about RSS
Web 1.0 was about taxonomy, Web 2.0 is about tags
Web 1.0 was about wires, Web 2.0 is about wireless
Web 1.0 was about owning, Web 2.0 is about sharing
Web 1.0 was about IPOs, Web 2.0 is about trade sales
Web 1.0 was about Netscape, Web 2.0 is about Google
Web 1.0 was about web forms, Web 2.0 is about web applications
Web 1.0 was about screen scraping, Web 2.0 is about APIs
Web 1.0 was about dialup, Web 2.0 is about broadband
Web 1.0 was about hardware costs, Web 2.0 is about bandwidth costs
Regards,
Satips.
|
|
|
|
|
Hi Sathish Did you get it from any souce you have type it
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
|
That's great satips. Any URL's for more info
|
|
|
|
|
|
Navaneeth. wrote: That's great satips
His name is Sathish
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Sandeep Akhare wrote: Sathish
great
|
|
|
|
|
hi all
Can any one tell me how to retrive the tables in the asp forms. I want to create a button after clicking the tables value( from the database, sql server) should be displayed into the form. do i have to data grid, data set. Pl help
Regards
Prakash Mishra(Banglore,India)
|
|
|
|
|
Prakash_Mishra wrote: Can any one tell me how to retrive the tables in the asp forms
What you want to retrieve ? Tables or it's values ?
Make your question more clear
|
|
|
|
|
I want the entire table with the column name in same format
Prakash Mishra(Banglore,India)
|
|
|
|
|
So that wat means showing the data values from database.....
Do use GridView and try.....
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
Hi using stored procedures,i displayed my datas in datagrid...,
Some of the cells values is "0"...,
But i dont want to show there "0"...,
Instead of that like to show empty space on there...,
How to do that?,
Plz hlp me...,
Advance thanks...,
Regards,
Magi
|
|
|
|
|
You can replace the value in the query. Note that you have to return the value as varchar, as a number can not be an empty string.
..., case SomeField when 0 then '' else cast(SomeField as varchar(50)) end, ...
---
single minded; short sighted; long gone;
|
|
|
|
|
No i dont want to modify in my stored procedure...,
Becoz it will affect all other datas too...,
I already used case condition with that only displaying the datas in my grid...,
Its possible to do any other action in back end codes?,
If its there plz tell me...,
Regards,
Magi
|
|
|
|
|
In the Select statement write case in the sql query
Select
(CASE WHEN data = 0 THEN '' ELSE data END) AS Data
FROM Table
.......
.......
and so on.
The datagrid will get empty string when you data is 0 otherwise it will show the actual data
|
|
|
|
|
No i dont want to modify in my stored procedure...,
Becoz it will affect all other datas too...,
I already used case condition with that only displaying the datas in my grid...,
Its possible to do any other action in back end codes?,
If its there plz tell me...,
Regards,
Magi
|
|
|
|
|
code in your datagrid's itemdatabound event
|
|
|
|
|
hi
you can change the value 0 the ""
In databind event of your control.
I thing it is the best option for you
|
|
|
|