Javascript and server calls

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ric Pullen

    #1

    Javascript and server calls

    Is it possible to have a button run client side script and then depending
    if its valid allow the postback to continue otherwise it prompts the user.

    I know this sounds like a validation issue but its not possible to do it
    with the validation components.

    I use infragistics webgrid and i want to test if there is an active row...
    if so then I will allow a postback otherwise prompt the user to select one.

    I have already assigned the javascript with the following code
    btnEdit.Attribu tes.Add("onclic k", "javascript:Edi tRowSelectedChe ck()")

    Cheers.


  • Anatoly

    #2
    Re: Javascript and server calls

    1)There is much better place to ask questions related to infragistics:
    http://www.infragistics.com/support/newsgroups.asp.
    2)

    function IsSelected(){
    var grid = igtbl_getGridBy Id(GridId);
    return (grid.getActive Row() != undefined);
    }

    GridId here string(Id of UltraWebGrid)
    HTH




    "Ric Pullen" <Richard.Pull en-REMOVESPAM@Hosp ital.nhs.uk> wrote in message
    news:uS0a6KFTDH A.940@TK2MSFTNG P11.phx.gbl...[color=blue]
    > Is it possible to have a button run client side script and then depending
    > if its valid allow the postback to continue otherwise it prompts the user.
    >
    > I know this sounds like a validation issue but its not possible to do it
    > with the validation components.
    >
    > I use infragistics webgrid and i want to test if there is an active row...
    > if so then I will allow a postback otherwise prompt the user to select[/color]
    one.[color=blue]
    >
    > I have already assigned the javascript with the following code
    > btnEdit.Attribu tes.Add("onclic k", "javascript:Edi tRowSelectedChe ck()")
    >
    > Cheers.
    >
    >[/color]


    Comment

    Working...