alternate row color with repeater in infopath form using code - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

alternate row color with repeater in infopath form using code

Last post 10-07-2011 04:13 AM by devendra. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 09-30-2011 05:03 AM

    alternate row color with repeater in infopath form using code

    Hi,

    How i can bind the alternate row color with repeater in browser enabled infopath form using code.

    Thanks,

    Devendra

  • 09-30-2011 07:56 AM In reply to

    Re: alternate row color with repeater in infopath form using code

    Here's how you can do it without code:

    http://www.infopathdev.com/forums/p/11094/41171.aspx#41171

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-03-2011 03:25 AM In reply to

    Re: alternate row color with repeater in infopath form using code

    Hi,

     I tried the Position(), it works fine in client side,but not on the server side.

    Thanks,

    Devendra

  • 10-03-2011 04:37 AM In reply to

    Re: alternate row color with repeater in infopath form using code

    How about using count(preceding-sibling::my:nodeName) instead of position()?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-04-2011 04:53 AM In reply to

    Re: alternate row color with repeater in infopath form using code

    this one also works fine in my client side.

    but once i deploy the form to central admin.

    its not working.

    is there any other way , after binding the data to repeater table can i apply the color for alterating rows.

     

    Thanks,

    Devendra

  • 10-04-2011 07:44 AM In reply to

    Re: alternate row color with repeater in infopath form using code

    Usually if something works in client but not browser (and everything is browser compatible) I suspect post back settings. You might try setting postback on the repeating table itself to "always" and see if that makes a difference (and, of course, make sure it doesn't impact form performance in too spectacular of a fashion).

    Hilary Stoupa

  • 10-05-2011 04:31 AM In reply to

    Re: alternate row color with repeater in infopath form using code

    i tried  postback as Always but its not working on server side.

     

    can any one please provide the solution for this.

    Thanks,

    Devendra

  • 10-07-2011 04:13 AM In reply to

    Re: alternate row color with repeater in infopath form using code

    finally it worked.

    but really strange i apply two conditions for frmatting

    1.Expression :count(preceding-sibling::my:group14) mod 2 = 1   and i set  shading as "Yellow"--it has not worked.

    and the secod condition is 

    2.Expression :count(preceding-sibling::my:group14) mod 2 = 0   and i set  shading as "Blue"--it has worked.

     when i use any one of those(1 or 2) its not working.

    only the combination(1 and 2) worked. very strange,is there any specific reason for this.

     

    Thanks,

    Devendra

     

Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.