Jump to content

TUniDBGrid & selected row/column


petr.nehez

Recommended Posts

hi,

 

In AjaxEvent of UniDBGrid use this code:

 

  
 procedure TFDevices.UniDBGrid1AjaxEvent(Sender: TComponent; EventName: string; Params: TStrings);
 begin
   if SameText(EventName, 'cellselect') then
  	Caption := 'RowID = ' + Params.Values['rowindex'] + ' and ColName = ' + UniDBGrid1.Columns[strToInt(Params.Values['colindex'])].FieldName ;
 end;

 

Best Regards

Link to comment
Share on other sites

hi,

 

In AjaxEvent of UniDBGrid use this code:

 

  
 procedure TFDevices.UniDBGrid1AjaxEvent(Sender: TComponent; EventName: string; Params: TStrings);
 begin
   if SameText(EventName, 'cellselect') then
  	Caption := 'RowID = ' + Params.Values['rowindex'] + ' and ColName = ' + UniDBGrid1.Columns[strToInt(Params.Values['colindex'])].FieldName ;
 end;

 

Best Regards

That's a good applying. :)

Link to comment
Share on other sites

In AjaxEvent of UniDBGrid use this code:

 

  
 procedure TFDevices.UniDBGrid1AjaxEvent(Sender: TComponent; EventName: string; Params: TStrings);
 begin
   if SameText(EventName, 'cellselect') then
  	Caption := 'RowID = ' + Params.Values['rowindex'] + ' and ColName = ' + UniDBGrid1.Columns[strToInt(Params.Values['colindex'])].FieldName ;
 end;

 

This looks fine, in the meantime I've found another solution:

function OnKeydown(e)
{
 if ((e) && (e.keyCode == 113)) {
   var sc = formCategoriesStages.gridCategoryCodes.selModel.getSelectedCell();
   if (sc) {
     formCategoriesStages.gridCodes.startEditing(sc[0], sc[1]);
   } 
 }
}

 

Do you think that it'll be 100% functional?

Link to comment
Share on other sites

  • 4 years later...
  • 1 month later...

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