petr.nehez Posted August 24, 2011 Share Posted August 24, 2011 Hi, I am playing with TUniDBGrid and I'd like to know if it is possible to find out selected row and column. Thanks for any info. Quote Link to comment Share on other sites More sharing options...
patmap Posted August 24, 2011 Share Posted August 24, 2011 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 Quote Link to comment Share on other sites More sharing options...
thecrgrt Posted August 24, 2011 Share Posted August 24, 2011 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. Quote Link to comment Share on other sites More sharing options...
petr.nehez Posted August 25, 2011 Author Share Posted August 25, 2011 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? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 28, 2011 Administrators Share Posted August 28, 2011 Hi, I am playing with TUniDBGrid and I'd like to know if it is possible to find out selected row and column. Thanks for any info. Current Row is same as DataSet current Row and you can use RecNo property where supported. Quote Link to comment Share on other sites More sharing options...
jslogix Posted December 17, 2015 Share Posted December 17, 2015 It didn't works, why the UniDBGrid doesn't have a SelectedRow property ? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted December 17, 2015 Administrators Share Posted December 17, 2015 It does have. Please install the latest build. 1 Quote Link to comment Share on other sites More sharing options...
jslogix Posted February 12, 2016 Share Posted February 12, 2016 Thanks ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.