on 09-26-2005 3:06 PM
Hi I am having trying to get my checkbox to check...
I can get a reference to the checkbox object, change the display text etc with the object, but when I set the checked state to true it always remains unchecked???
Below is my code:
public override void CatchItemEvent(string FormUid, ref SAPbouiCOM.ItemEvent ItmEvent, out bool BubbleEvent)
{
BubbleEvent = true;
if(FormUid == "frmBulkPriceUpdate" && !ItmEvent.BeforeAction && ItmEvent.EventType == BoEventTypes.et_CLICK)
{
SAPbouiCOM.CheckBox cbQuotes = (SAPbouiCOM.CheckBox)_SboForm.Items.Item("cbQuotes").Specific;
SAPbouiCOM.CheckBox cbOrders = (SAPbouiCOM.CheckBox)_SboForm.Items.Item("cbOrders").Specific;
SAPbouiCOM.EditText txtDate = (SAPbouiCOM.EditText)_SboForm.Items.Item("txtDate").Specific;
switch(ItmEvent.ItemUID)
{
case "cbOrders" :
cbOrders.Checked = true;
SboApplication.SetStatusBarMessage(cbOrders.Checked.ToString(), BoMessageTime.bmtShort, false);
break;
case "cbQuotes" :
cbQuotes.Checked = true;
break;
case "butLaunch" :
int confirm = _SboApplication.MessageBox(
"Are you sure you want to run the Automatic Update?",
0,
"OK",
"Cancel",
"");
if(confirm == 1)
UpdatePrices(true, true, txtDate.String);
break;
}
}
}
Daniel, have you bounded your CheckBox to DataSource?
If so, could you please show these code-lines
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the help! Had never done this before, Below is the code that did the trick.
SboForm.DataSources.UserDataSources.Add("cbOrdersDs", BoDataType.dtSHORT_TEXT, 1);
SboForm.DataSources.UserDataSources.Add("cbQuotesDs", BoDataType.dtSHORT_TEXT, 1);
SAPbouiCOM.CheckBox cbOrders = (SAPbouiCOM.CheckBox)_SboForm.Items.Item("cbOrders").Specific;
SAPbouiCOM.CheckBox cbQuotes = (SAPbouiCOM.CheckBox)_SboForm.Items.Item("cbQuotes").Specific;
cbOrders.DataBind.SetBound(true, "", "cbOrdersDs");
cbOrders.ValOn = "Y";
cbOrders.ValOff = "N";
cbOrders.Checked = true;
cbQuotes.DataBind.SetBound(true, "", "cbQuotesDs");
cbQuotes.ValOn = "Y";
cbQuotes.ValOff = "N";
cbQuotes.Checked = true;
Hi Daniel,
I also had problems with checkbox and radiobuttons.
I use the click event, with doubleclick and now it works perfectly (why the regualr click doesn't work I don't know)
Regards,
Ad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
10 | |
9 | |
5 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.