|
How can I hightlight full row in gridView on row click event and display rowID in label
|
|
|
|
|
You can do the following by:
1. Inject Javascript function on mousehover/onclick & mouseout of the link in a grid row.
2. Using JavaScript, show a div/text that contains the needed details
3. Using JavaScript, hide the div/text onmouseout.
For injecting JS, you need to use RowDataBound of GridView, something like:
protected void GridView_RowDataBound(Object sender, GridViewRowEventArgs e)
{
DataControlRowType rtype = e.Row.RowType;
if (rtype == DataControlRowType.DataRow && rtype != DataControlRowType.Footer
&& rtype != DataControlRowType.Separator && rtype != DataControlRowType.Header
&& rtype != DataControlRowType.Pager)
{
e.Row.Attributes.Add("onmouseover", "ShowDiv(this);");
e.Row.Attributes.Add("onmouseover", "HideDiv(this);");
}
}
Try!
|
|
|
|
|
Hi i think you need not to highlight the row using click event you can highligt it using selectedindexchang event
|
|
|
|
|
SelectedIndexChange event for a grid row? I doubt that.
|
|
|
|
|
hello
i have problem when i try to publish my web application
i publish my web application folder in my ftp server
but when i try to build deploment package i have one error and asp.net show this message
The value is not a valid connection string or an absolute path
Keyword not supported: 'provider'
|
|
|
|
|
|
ok thank you
i'll try it now
|
|
|
|
|
How to declare connection string into web.config file ?
habib
|
|
|
|
|
There's a ConnectionStrings section that you can add an individual connection string into. You can see a sample here[^].
|
|
|
|
|
Place something like this in your Web.Config file root:
<connectionStrings>
<add
name="NorthwindConnectionString"
connectionString="Data Source=serverName;Initial
Catalog=Northwind;Persist Security Info=True;User
ID=userName;Password=password"
providerName="System.Data.SqlClient"
/>
</connectionStrings>
Here, have a look at details: MSDN: How to: Read Connection Strings from the Web.config File[^]
|
|
|
|
|
|
What question are you answering? Your answer has absolutely nothing to do with the question, and is merely spamming the site to link to an external site. Consequently, I have voted to remove your answer and your account.
|
|
|
|
|
Just a quick question.
Is this test logical or possible in ASP.NET? If so, under what scenario(s) would you
expect to see such a positive result of the test.
Thanks
if (Request.HttpMethod == "POST" && !IsPostBack)
{...}
Just because we can; does not mean we should.
|
|
|
|
|
I ain't no web-programmer, but sounds like homework, and I know where the documentation is, so shouldn't be too hard to come up with something. Let's try.
HttpRequest.HttpMethod[^]Gets the HTTP data transfer method (such as GET, POST, or HEAD) used by the client. Docs also state it's a String , so the first part of the evaluation looks correct. The English implies that the Request was a POST action on the server.
IsPostBack looks like a property, not a method. Guess it must be part of the Page[^]. Gets a value that indicates whether the page is being rendered for the first time or is being loaded in response to a postback. Ah, interesting. So, the block would be executed if:
- It's being POST-ed
- It's not a postback (meaning, the page is being rendered the first time)
The action is determined in the Form ;
<form name="input" action="html_form_action.asp" method="post"> ..and that is why I kinda like MSDN. Hope this helps a bit
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks for the reply, not quite the answer I was hoping for, but thanks anyway.
p.s. its not "homework" in the traditional sense but rather me attempting to expand my knowledge on my own time.
Just because we can; does not mean we should.
|
|
|
|
|
KaptinKrunch wrote: me attempting to expand my knowledge
Good to hear that there are still people learning voluntarily
KaptinKrunch wrote: not quite the answer I was hoping for, but thanks anyway.
'twas a bit rude, but it seemed like a good idea to explain how I reached the conclusion on what the code "theoretically" would do. If you have suggestions on how my answers would be improved, by all means, hit me
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
|
The base class includes the field 'CrystalReportViewer1', but its type (CrystalDecisions.Web.CrystalReportViewer) is not compatible with the type of control (CrystalDecisions.Web.CrystalReportViewer).
I am getting this error.What is the problem please sort it out?
|
|
|
|
|
This generally happens when the viewer might be of the older version. Customize the toolbox and add the viewer of version you need.
Look at the possible reasons discussed here: Crystal Reports Problem in VS 2010[^]
|
|
|
|
|
how to show data in gridview
actually i want to show datain table view where show like this
img1 img2 img3
price price price
des des des
img4 img5 img6
price price price
des des des
so on...
thanks
Regards
Umesh Daiya
|
|
|
|
|
I would look at template fields in the GridView to achieve your desired view.
Just because we can; does not mean we should.
|
|
|
|
|
how add tab contron in my web application?
imp
|
|
|
|
|
Try this[^].
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
|
i want to add you on skype
could you please give me yours skype id
|
|
|
|