Linkbutton To Expand Gridview Causes Row Colors From Function To Be Lost

Jan 19, 2011

When a Link button I have in my gridview that expands the table to show a nested gridview i lose all the row colors that i get from this function. What I need is a way to call the function when the link button is clicked.

<script type="text/javascript">
$(document).ready(function () {
$("#<%=GridView1.UniqueID%> tr").each(function () {
var status = $(this).children('td:eq(6)').text();
if (status == 'OK') {
$(this).children('td').css({ "background-color": "lightgreen" });
}
else if (status == 'XL') {
$(this).children('td').css({ "background-color": "RED" });
}
else if (status == 'CL') {
$(this).children('td').css({ "background-color": "YELLOW" });
}
})
});
</script>

View 1 Replies


Similar Messages:

Forms Data Controls :: GridView Lost Row Colors After Postback?

Jan 5, 2011

I have a c# code that put some background color in cells according with some values, the problem is that each time I add a button or a postback occurs I lost all colors (and other attribs).So my workaround in call the function that fills the gridview each time... but this produce a slow performance.

View 4 Replies

Forms Data Controls :: Capture Value Of Javascript Function Called By GridView Linkbutton Click?

Oct 22, 2010

i have gridview with linkbutton.when i click linkbutton it should call javascript function which returns value would be input for database functions. how do i capture javascript function retun value(i am using Registerclientscriptblock)? and that should be input for database function. Inshort i need to call two function from link button click - one javascript function,one ado.net function which will update value in database. output of javascript function will be input for database function.

function Getlogitudelantitude(address)
{
return "35.3434343,-74.334343"
}
Linkbutton_click(object sender,Eventargs e)
{
register javascript function .. which should return value
string s = "35.34343,-74.334343"
then call database function(s) - does database operation
}
}

View 2 Replies

Call Javascript Function And Server Side Function From Linkbutton

Jan 27, 2010

<asp:LinkButton CssClass="button" ID="btnApply" runat="server" OnClick="btnApply_Click()" OnClientClick="Apply1('btnApply')" >
hi ihave this functin in .vb file
Protected Sub btnApply_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnApply.Click
end sub

and javascript function also in aspx

function ApplySummerization(id)
{
alert("hai");
}

View 4 Replies

Object Reference Lost After Post Back - __EVENTTARGET GridVieww And LinkButton

May 30, 2010

I have a GridView and a LinkButton control. I click the LinkButton control and loose the object reference to both objects after post back. I want to be able to get the command arguments from the link button and then be able to get a reference to the gridview control to determine which page index to set the gridview. I have been able to get the __EventTarget property to reference the object that was called but Im not able to reference that object.

[Code]....

[Code]....

View 6 Replies

AJAX :: How To Add More Colors / Custom Colors In ColorPickerExtender Control

Jan 27, 2010

I am using colorpicker control which comes with ajax control toolkit. Can I have more colors or include custom colors in the color pallete of ColorPickerExtender control ?

View 4 Replies

Forms Data Controls :: How To Have A Expand/collapse All Function On Top Of Individual Rows

Jul 6, 2010

I have this function to expand and collapse rows in gridview from this website:

[URL]

how to have a expand/collapse ALL function on top of individual rows?

View 6 Replies

Forms Data Controls :: "linkbutton" Won't Function When Hit Any Controls Inside The GridView?

Mar 11, 2010

I have a linkbutton in a detailsview and there is a provision to update and add new records. WHen I click the "linkbutton" a textbox appears and users can add something.

I have a grid as well from which I can select a record to update and the update button which is inside the details view lets update. But the "linkbutton" won't function when I hit any any controls inside the grid.

Basically, the detailsview's mode is changed to edit. But clicking the cancel button does not come back to the original state. What should I do?

View 1 Replies

How To Make A Gridview Printable In Colors

Mar 1, 2011

I want to make a grid that the users will print and that will display it's rows in different colors on the printable versionI'm using ASPXIt seems that even you make the colors right, when you print it , the colors are disapearing

View 1 Replies

JavaScript Function In Linkbutton Not Firing In FireFox Browser?

Jan 20, 2010

when i click the link button in Masterpage the window has to close. This function is working properly in IE but in fireFox or chrome or Safari Other than IE in all browsers postback is happening.

my code :

[code]....

View 1 Replies

Web Forms :: Calling Common Function For LinkButton In Div.InnerHtml

May 7, 2010

I'm Adding Some Linkbutton At Runtime In InnerHtml Of Div. And I Want To Call a Single Method For All The LinkButton With An Argument. My Code Is Below:

protected void Page_Load(object sender, EventArgs e)
{
DivBookList.InnerHtml = "<ul>";
i = 0;
foreach (IFolder f in Client.MailboxManager.Folders)

View 2 Replies

Forms Data Controls :: Gridview Row Colors Losing

May 20, 2010

I have a gridview with auto Edit buttons... when I click on Edit button it is losing it row and column colors.We are initially setting the gridview colors in the page_load event.

View 3 Replies

Forms Data Controls :: Gridview Row Colors Can Be Set By Date

Aug 12, 2010

I have a gridview that I shows tasks assigned to me in our organization. One thing we've thought of is to have them color coded by date. The date is one of the fields and it's auto sorted by that field. So for example, if there were three tasks, one due tomorrow, one due today, and one due yesterday. I would like my task due yesterday's row style to be highlighted in red, the one due today to be green, and the one due tomorow just to be default.

View 8 Replies

Gridview Data Can Display With Different Colors Depends On Text?

May 8, 2010

am displaying student attendance in Grid view.I choose absent as A, present as P and leave as L. Now i would like to display A in red color, P in green

View 2 Replies

Forms Data Controls :: Retrieve Linkbutton Text In A Function?

Jun 15, 2010

I am using a linkbutton iside a gridview.... i need to get the text of the link button in another function. how can get that ... i tried find control .. but its not working.... I created the link button from other function which executes just b4 this function...

View 3 Replies

Forms Data Controls :: Gridview Not Showing Alternate Colors

Sep 3, 2010

I am trying to make the colors different for every line, so lets say one line white and the next light grey. I tried it in the gridview usingbut it has no effect on the display! The lines are all white! Only formatting to work is the header formatting.For CSS, I have

<RowStyle
CssClass="gridRow"
/>
<HeaderStyle
CssClass="gridHeaderSort"
/>
[code]...

View 8 Replies

Forms Data Controls :: GridView Can Change Cell Colors?

Dec 7, 2010

I have any opportunity to change the colors of GridView cells due to it's value. I have an SQLDataSource with different int values, and want minus number to have blue background and plus number - red.

View 2 Replies

Data Controls :: How To Display Different Row Colors Based On Condition In Gridview

Jul 19, 2013

how to display row values based on condition in grid view control and how to display different row colors based on condition in grid view.

View 1 Replies

Forms Data Controls :: Gridview Inside GridView With For Expand And Collapse?

Aug 9, 2010

I need a GridView With Parent and Child Relation. It should be expand and collapse. Onload i need to get Parent data. On click of Parent data then i need to get child data from db.

View 2 Replies

Data Controls :: GridView Inside GridView Expand First Row On Page Load

Nov 19, 2012

ASP.Net Nested GridViews – GridView inside GridView with Expand and Collapse feature this artical works for me but i want to expand first row when page is loaded all the other record show as same as it is collapse. may be it is happen in this nested gridview 

View 1 Replies

Forms Data Controls :: Changing DetailsView And Gridview Colors For Different Users

Mar 18, 2010

How would I go about changing gridview colours and detailsview colours depending on who logs onto my website? Is there a way of doing it in the code behind (basic example follows) :-

If User = "Peter" Then
Gridview/Detailsview Headerstyle =
Gridview/Detailsview Controlstyle =
End If

The gridview and detailsview are connected to SqlDataSource controls and are databound to a SQL server database.

View 3 Replies

MVC :: Expand The Subgrid Under Gridview?

Mar 10, 2010

[URL]

the above link example i have the same grid with subgrid I need to place the button under the Gridview to expand all the subgrid at a time..

View 3 Replies

AJAX :: Collapsible Animated Gridview - Expand Button

Mar 23, 2011

I have 2 grid view Parent & child on parent gridview I have expand button inside item template. I want by click on parent expand button child gridview get open with animation. How to do this? I am using asp.net c sharp.

View 1 Replies

JQuery :: Client-side Collapse/expand GridView Row?

Jan 21, 2011

I'm new to Jquery. My page looks something like this:

[Code]....

I got it to work using AJAX Control Toolkit, but I find it a bit cumbersome and rather slow. I want to use JQuery for this one.

What I want to do is when the user clicks on <img>Expand/Collapse</img>, divChild will expand/collapse and that row of the GridView will also expand/collapse according to the size of its content.

View 4 Replies

Data Controls :: Expand And Collapse Table In GridView?

May 7, 2015

Here Am Using Table and grid views For Registration.

Am get Collapse and Expand with Table But There No Data Displayed in Grid view (Means it not Showing asp Controls Like Grid view etc).

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved