Choose From List in Grid

Rafael Stalder

Hi there



I got a problem by creating a choose from list in a grid.



In KeyDown-Event, the choose from list will be added:



[CODE]

// Add chooseFromList for contact name

string query = "SELECT T0.[Name] FROM OCPR T0 WHERE T0.[CardCode] = '" + cardCode + "' AND T0.[Name] LIKE '[%constraint]' ORDER BY [%ordercolumn] [%order]";

ChooseFromList.DefaultSQLQuery mydefaultQuery = new ChooseFromList.DefaultSQLQuery(query);

ChooseFromList myCFL= new ChooseFromList(cmydefaultQuery, "Name", true, false, myGrid, "Ansprechpartner");

myCFL.ChooseFromListEvent += new ChooseFromList.ChooseFromListHandler(ChooseFromListAnsprechpartner);

myCFL.DeactivatedInSearchMode = true;

myCFLAutoSelectIfOnlyOneValue = true;

myCFL.Title = "Liste: Ansprechpartner";

myCFL.ShowInstance(true);

[/CODE]



The first execution works fine. But if i execute the choose from list for second time, it will be showed twice.

Now i've added some code before the choose from list creation:



[CODE]

myGrid.Columns["Ansprechpartner"].RemoveAllHandlers();

[/CODE]



but this doesn't work...



greetings

Rafael

Paolo Manfrin

The RemoveAllHandlers should be contained in the [color=#660066][size=2]ChooseFromListAnsprechpartner [/size][/color][size=4]eventhandler[/size]

[size=4]hth[/size]

[size=4]paolo[/size]
0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post