CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

cggrid column new edit type gccombobox with editoptions.combobox.items property for the comobox

Suggest new components/features

by seanwebb » 08 Oct 2012 12:03

Would be much faster for the programmer than for each column having to write code

1) set EditType=gcetSelect
2) double click OnGetEditSelectData tocreate the below procedure (was done in C++ but delphi is same)

void __fastcall TIWFormEditEmployeeData::TIWCGJQGridOptionsColModel3GetEditSelectData(TObject *Sender,
TIWCGJQGridCol *ACol, TStrings *AData)
{
CString Letter="A";
for ( int i = 0; i Items->Count; i++ ) // copy the classes from the existing class combo on the form
{
Letter=IWCGJQComboBoxClass->Items->Strings[i];
AData->Add(Letter+"="+Letter); // format code=Description
}
}
seanwebb
 
Posts: 50
Joined: 22 May 2012 11:12

by Jorge Sousa » 08 Oct 2012 14:10

Sean

Would be much faster for the programmer than for each column having to write code


This event is used to get dynamic data, like db data.

Is there a property, to set constant data is Col.EditOptions.Value


/// <summary>
/// When set for edittype checkbox this value should be a string with two possible values separated with a colon
/// (:) - Example editoptions:{value:“Yes:No”} where the first value determines the checked property. When set
/// for edittype select value can be a string, object or function. If the option is a string it must contain a
/// set of value:label pairs with the value separated from the label with a colon (:) and ended with(;). The
/// string should not ended with a (;)- editoptions:{value:“1:One;2:Two”}. If set as object it should be defined
/// as pair name:value - editoptions:{value:{1:'One';2:'Two'}} When defined as function - the function should
/// return either formated string or object. In all other cases this is the value of the input element if defined
/// </summary>
property Value: string index 00 read GetStringValue write SetStringValue stored IsStringStored;


Regards

cgdevtools
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 5 guests

Contact Us.