Jump to content

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


Recommended Posts

Posted
  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. }
Posted

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).

Posted
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.

Posted
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
      ...    

 

Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...