Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Posts
    6

    Unanswered: Multiselect in Datawindow Help wanted urgent!

    Iam new to Powerbuilder.Hence this question could be really silly...
    I have a Userobject in which there is a datawindow control assigned to a datawindow object.
    This is a single select only.I checked the properties and I could not do any multiselect.Is there anyway I can do a multiselect on this datawindow? Can this be done by code only? If so, can u provide me with some sample code?
    Thanks for the help!!!

  2. #2
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    Quote Originally Posted by neerajav
    Iam new to Powerbuilder.Hence this question could be really silly...
    I have a Userobject in which there is a datawindow control assigned to a datawindow object.
    This is a single select only.I checked the properties and I could not do any multiselect.Is there anyway I can do a multiselect on this datawindow? Can this be done by code only? If so, can u provide me with some sample code?
    Thanks for the help!!!
    What do you mean with multi-select?
    Does your datawindow return only one row or something?
    I'm not crazy, I'm an aeroplane!

  3. #3
    Join Date
    Jun 2004
    Location
    Paris, France
    Posts
    43
    ideed, you have to extend the 'clicked' event of your datawindow.
    little exemple... to complete...

    -instance variables : i_inSelectionMode (int), i_liFirstClickedRow (long),i_liLastClickedRow (long)
    - function : Shift_Highlight(row) whichs highlights the rows between i_liFirstClickedRow and i_liLastClickedRow

    -
    long lCounter

    If row > 0 then
    Choose case i_inSelectionMode
    case 1
    // Simple selection : nothing to do
    case 2
    // MultiSelection
    if GetSelectedRow (row) = 0 and GetSelectedRow (0) = row then
    i_liFirstClickedRow = row
    end if
    If keydown (KeyShift!) then
    Shift_Highlight(row)
    Elseif Keydown (KeyControl!) then
    if GetSelectedRow (row - 1) = row then
    SelectRow (row,FALSE)
    row = 0
    i_liFirstClickedRow = 0
    else
    SelectRow (row,TRUE)
    i_liFirstClickedRow = row
    end if
    Else
    SelectRow (0,FALSE)
    SelectRow (row,TRUE)
    i_liFirstClickedRow = row
    end if
    i_liLastClickedRow = row
    End choose
    end if

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •