locked
highlight selected row in DFWP RRS feed

  • Question

  • hello

      I have a custom web part page in MOSS 2007. I have added 2 data form web parts. The data source for these web parts is an SQL stored procedure. I have gotten all of it successfully working including the web part connection between the 2 dfwp's. Now what I want to do is figure out a way to highlight or bold the row in the first dfwp when a user clicks the link to fire the web part connection. Currently I have the web part connection firing from a link on the field and from the onclick event of a radio button.. the code for the radio button is below:

    <input type="radio" value="{@ID}" name="radioMain">
      <xsl:attribute name="onclick">
            <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="fields">@lot=<xsl:value-of select="ddwrt:ConnEncode(string(@lot))" /></xsl:variable>
            <xsl:text>javascript:</xsl:text>
            <xsl:value-of select="ddwrt:GenFireConnection(concat('g_7eef314e_d1e8_4745_afcd_2d8cbb746f05#g_bc995493_0409_496d_9c82_da2edd954fcf#g_f9e1e25f_4fd3_4026_b79d_7929a1a3922c*',$fields),string(''))"></xsl:value-of>  </xsl:attribute>
    </input>

     

    Any idead would be greatly appreciated.

    Thursday, February 10, 2011 7:50 PM

Answers

  • Its hard to see what your webparts are like all you are showing here is an radio button input. I would say do this in jquery and attach to the click event of item. I envisioning something similar to this.

     

    $(document).ready(function(){

    $("#IDOFSOMEITEM").click(function(){

    //reset any previous selected row

    $(".selected").removeClass("seletect");

    //then so something to the row

    //I would add a new css class or change the css

    $("#IDOFSOMEROW").addClass("selected");

     

    });

    });

     

    then in your CSS file you would want define what a selected row style should be like.


    -tom daly
    Friday, February 25, 2011 3:11 AM