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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...