Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
295
Possible to change the background color of the Footer in the Client?
posted

Hi All.

 I have a javascript function to update the value of the Footer when a cell in the column is changed.  I'm wondering if it's possible to change the color of the background of Footer from the client.  I want it to turn yellow when the footer value is > 0, red when the footer is < 0, and its default color when the footer value = 0.  I can't seem to access styles for the footer from the client.

 An alternative is to make the footer a template with a label control and reference the label control from the client.

 I'd appreciate any thoughts on this.

Parents
No Data
Reply
  • 14049
    Offline posted
    You can try getting the footer element(s) by its id. The id of the
    footers consists of the grid's ClientID + "_f_" + band.Index + "_" +
    column.Index.

    So for the top level footer of the third column its id would be
    something like "UltraWebGrid1_f_0_2".

    then by using igtbl_getDocuemntElement utility function you can get
    reference to the footer element. If the foter belongs to band with index
    >0 an array of footer elements is returned by the function.

    style object off the element will override any setting. Also the
    background image should be removed as it covers the bg color.

    var myFooter = igtbl_getDocuemntElement("UltraWebGrid1_f_0_2");
    myFooter.style.backgroundImage = "url(none)";
    myFooter.style.backgroundColor = "red";
Children
No Data