Jump to content


Photo

unidbgrid direct input


  • Please log in to reply
15 replies to this topic

#1 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 615 posts

Posted 18 July 2016 - 10:22 AM

hi.

 

how to direct input data in a unidbgrid.

 

the grid is not radonly, th dataset is not readonly, the columns are not readonly, but I can't direct input data in the grid.

 

why?

 

thanks.

 


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3046 posts

Posted 18 July 2016 - 10:54 AM

the grid is not radonly, th dataset is not readonly, the columns are not readonly, but I can't direct input data in the grid.
why?

 

Hi,

 

Sorry, what do you mean?

 

Best regards.


  • 0

#3 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 615 posts

Posted 18 July 2016 - 11:12 AM

hi.

 

open insert, edit and delete data directly typing in the dbgrid.

 

if vcl, with dbgrid readonly false, and dataset readonly false, and columns readonly false, I can directly modify a cell, insert a row, and so on.

 

but with unidbgrids, I can't find the way to do that.


  • 0

#4 Ulugbek

Ulugbek

    Advanced Member

  • Banned
  • PipPipPipPip
  • 152 posts
  • LocationTashkent Uzbekistan

Posted 18 July 2016 - 11:25 AM

check cell editor examples


  • 0

#5 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 615 posts

Posted 18 July 2016 - 12:29 PM

I've seen, but is not the same


  • 0

#6 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 615 posts

Posted 13 September 2017 - 12:51 PM

Hi.

 

I'm back with this.

 

I still don't know how to do this.

 

I have this:

procedure Tfalbaranesvimp.dbimportKeyPress(Sender: TObject; var Key: Char);
var
  CurrCol: Integer;
begin
   currcol := lib.gridcol(dbimport);
   if currcol =  14 then begin
      if not (key in ['0'..'9','.','-']) then begin
         Key := #0;
      end
      else begin
          try
             qimp.edit;
             qimp.fieldbyname('qty').asstring := qimp.fieldbyname('qty').asstring + key;
          except
          end;
      end
   end;
end;

I have a numeric column in a grid, and whay press any valid key, want to put in edit mode and start writing, but I can't.

 

some help please.


  • 0

#7 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3046 posts

Posted 13 September 2017 - 03:55 PM

Hi,

 

Can you analyze this post ?:

http://forums.unigui...in-for-ext-js-4

 

Best regards,


  • 0

#8 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3046 posts

Posted 13 September 2017 - 04:17 PM

Also your post:

http://forums.unigui...6869-unidbgrid/


  • 0

#9 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 615 posts

Posted 14 September 2017 - 08:54 AM

 

Yes, I've reviewed my post, but is not the same.

 

about this: http://forums.unigui...-for-ext-js-4,

 

I read it before making this new post, and I'm trying to do, but I can't. pressing any key over not readonly column/field, does nothing.

 

perhaps I'm missing something.

 

Have you any sample?

 

Thanks.


  • 0

#10 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3046 posts

Posted 14 September 2017 - 09:06 AM

Hi,

 

Ok, I will check and let you know


  • 0

#11 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 615 posts

Posted 14 September 2017 - 09:09 AM

Ok. Thanks.


  • 0

#12 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9666 posts

Posted 16 September 2017 - 02:13 PM

Hi.

 

I'm back with this.

 

I still don't know how to do this.

 

I have this:

procedure Tfalbaranesvimp.dbimportKeyPress(Sender: TObject; var Key: Char);
var
  CurrCol: Integer;
begin
   currcol := lib.gridcol(dbimport);
   if currcol =  14 then begin
      if not (key in ['0'..'9','.','-']) then begin
         Key := #0;
      end
      else begin
          try
             qimp.edit;
             qimp.fieldbyname('qty').asstring := qimp.fieldbyname('qty').asstring + key;
          except
          end;
      end
   end;
end;

I have a numeric column in a grid, and whay press any valid key, want to put in edit mode and start writing, but I can't.

 

some help please.

 

A big NO here.

 

This kind of programming is something that you must AVOID in uniGUI.

 

Why aren't you simply using a column editor?

There are several examples under demo folder. Simply attach a numeric editor to your column.

There is no need to monitor keys on server side. It must be totally avoided.


  • 0

#13 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 615 posts

Posted 18 September 2017 - 10:16 AM

yes, it's perfect.

 

but is not direct input. need to press <ENTER> to put the grid in edit mode, and then can type.


  • 0

#14 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9666 posts

Posted 18 September 2017 - 04:38 PM

yes, it's perfect.

 

but is not direct input. need to press <ENTER> to put the grid in edit mode, and then can type.

 

How do you want it to behave?


  • 0

#15 jahlxx

jahlxx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 615 posts

Posted 18 September 2017 - 09:50 PM

direct input, with no need to press enter key to edit.


Enviado desde mi SM-A500FU mediante Tapatalk
  • 0

#16 ahmed.atayib

ahmed.atayib

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 21 September 2017 - 07:32 AM

direct input, with no need to press enter key to edit.


Enviado desde mi SM-A500FU mediante Tapatalk

and direct insert for new record - no need for "Add button" in the navigator . it should behave like vcl dbgrid that when reach last column and press enter or tab or in any record when pressing down arrow the new record should be inserted. 


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users