Avatar of Mateen
Mateen
 asked on

How to remove a highlighted row.

pb version 7

data window name dw_1
shared by
dataobject in datawindow control dw_base_list. Its dataobject has been set at runtime.

In dw_base_list when I select a row, the row is higlighted.

When I insert a row, a new row is created in dw_base_list and it scrolls to bottom of the dw_base_list, but the problem is the old row is still higlighted.

I have tried selectrow(0,false) before insert but it does not work.

I insert row by this command
dw_1.insertrow(0)

dw_base_list is created in grid datawindow and the dataobject set to it does not allow update.
Editors IDEs

Avatar of undefined
Last Comment
Mateen

8/22/2022 - Mon
gajender_99

HI TRY THIS

LONG VLL_ROW

VLL_ROW=DW_1.INSERTROW(0)
dw_base_list.selectrow(0,false)
dw_base_list.selectrow(vll_row, true)

hope this will work

Gajender
Mateen

ASKER
Yes It worked.

Thanks

One more favour.

I want to stop multiselection ( by pressing control key etc) in dw_base_list.

Also, If click very quickly rows in dw_base_list, then , at times, the situation is that One row is selected
and the previous selected row is shaded.

Any idea?

gajender_99

hi mateen,

try this on the clicked event of dw_list

this.selectrow(0,false)
this.SetRow(row)
this.selectrow(row,true)

is it with black shadow for a single column? Let me know.

Gajender


All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Mateen

ASKER
this.selectrow(0,false)
this.SetRow(row)
this.selectrow(row,true)

This does not problem.

<<is it with black shadow for a single column?>>
Yes

1) If I drag the mouse , multiple rows are selected. I DO NOT WANT THIS.

2) If I click the Title, all rows are selected. I DO NOT WANT THIS.

3) I ONLY WANT , ONE ROW SELECTION AT ONE TIME.

gajender_99

Ans for
 If I click the Title, all rows are selected. I DO NOT WANT THIS.

on dw clicked enent you can use this.

if row>0 then
      this.selectrow(0,false)
      this.SetRow(row)
      this.selectrow(row,true)
End if
ASKER CERTIFIED SOLUTION
gajender_99

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Mateen

ASKER
Hi gagender

<<open the datawindow and go to the properties and untick the mouse selection.>>

Yes!!!

Untick the mouse selection and column moving.
Then we do not need any code in the clicked event except this
dw_1.scrolltorow(row)


Many thanks and very best regards.


Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.