Jump to content

[Question] How to Get DBGrid Column'FieldName On beforeedit with ClientEvent ?


zhyhero

Recommended Posts

  1. function beforeedit(editor, context, eOpts)
  2. {
  3.      context.colIdx;// this can get column index
  4.      context.field;// this can get column field index 
  5.      ????? //howtoget column fieldname
  6.     ajaxRequest(this,"GetFieldName",["FieldName="+?????]); 
  7. }
Link to comment
Share on other sites

18 minutes ago, zhyhero said:

Two  columns,Combobox  as column2.editor

When i click cell at column2 to enter editing mode , i want update combobox.items first(beforeedit) and it  depend on cell.text at column1,

After that,  combobox show it's items list(dropdown).

Sorry, it would be better if you could provide specific examples.

Link to comment
Share on other sites

1 hour ago, zhyhero said:

UniDBGrid_ClientEvent_BeforeEdit.zip

      ...
      colIdx := Params.Values['colIdx'].ToInteger();
      if dgRowNumbers in UniDBGrid1.Options then
        fieldName1 := UniDBGrid1.Columns[colIdx - 1].FieldName
      else
        fieldName1 := UniDBGrid1.Columns[colIdx].FieldName
      ...    

 

Link to comment
Share on other sites

1 hour ago, Sherzod said:

      ...
      colIdx := Params.Values['colIdx'].ToInteger();
      if dgRowNumbers in UniDBGrid1.Options then
        fieldName1 := UniDBGrid1.Columns[colIdx - 1].FieldName
      else
        fieldName1 := UniDBGrid1.Columns[colIdx].FieldName
      ...    

 

@Sherzod

Thanks.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...