Telegram_2020-05-23T09

<< Click to Display Table of Contents >>

Navigation:  Telegram > 2020 > 05 > 23 >

Telegram_2020-05-23T09

Telegram link

 

2020-05-23T09:01:53

 

Does anyone know how to return a KeyValue by clicking on a record displayed by DataTable in IWGrid ?

 


 

Telegram link

 

2020-05-23T09:04:46

 

What you have to do is to set the cell to Clickable when you load it with data, as in:

 


 

Telegram link

 

2020-05-23T09:05:04

 

MyGrid.Cell[Row, Col].Clickable := True;

 


 

Telegram link

 

2020-05-23T09:05:25

 

You also put the key value in the Cell by using the Tag property:

 


 

Telegram link

 

2020-05-23T09:05:42

 

MyGrid.Cell[Row, Col].Tag := TObject(123);

 


 

Telegram link

 

2020-05-23T09:06:45

 

You need to change your mindset when you work with grids of data in a web browser

 


 

Telegram link

 

2020-05-23T09:07:13

 

In the VCL, you simply read the Field value of the current record (the grid automatically syncs the current record in your dataset)

 


 

Telegram link

 

2020-05-23T09:08:14

 

But in a browser, a standard practice is to make one of the columns clickable, and to embed the key values in the cells of that column

 


 

Telegram link

 

2020-05-23T09:08:51

 

From the click event you can show a popup menu with all the things you want your users to be able to do a single record

 


 

Telegram link

 

2020-05-23T09:09:07

 

Some people put the clickable column as the first column in the grid

 


 

Telegram link

 

2020-05-23T09:09:10

 

Others put it at the end

 


 

Telegram link

 

2020-05-23T09:09:13

 

My trouble is I use the same IWGrid for different Datasets returned they all do have same fields order

 


 

Telegram link

 

2020-05-23T09:09:39

 

It's not a problem

 


 

Telegram link

 

2020-05-23T09:09:56

 

Maybe putting it as first column

 


 

Telegram link

 

2020-05-23T09:09:58

 

with TIWGrid, you have to have code to load the data

 


 

Telegram link

 

2020-05-23T09:10:23

 

and in your \ID column\ you can also embed information as to which dataset the record is from

 


 

Telegram link

 

2020-05-23T09:10:37

 

Usually in Delphi the Tag property is an Integer or NativeInt

 


 

Telegram link

 

2020-05-23T09:10:37

 

Loren on this one can you elaborate please?

 


 

Telegram link

 

2020-05-23T09:10:51

 

But in TIWGrid — it is a TObject

 


 

Telegram link

 

2020-05-23T09:11:16

 

Thus if you want to store an Integer in the Tag property, you have to fake Delphi out and tell Delphi that your Integer is really a TObject

 


 

Telegram link

 

2020-05-23T09:11:27

 

123 is just an example?

 


 

Telegram link

 

2020-05-23T09:11:29

 

and so Delphi will think it's simply a pointer to your object

 


 

Telegram link

 

2020-05-23T09:11:36

 

Yes, 123 represents any Integer

 


 

Telegram link

 

2020-05-23T09:11:58

 

So when you read it back, you have to fake Delphi out again and tell Delphi that it's really an Integer:

 


 

Telegram link

 

2020-05-23T09:12:20

 

MyIntVariable := Integer(MyGrid.Cell[Row, Col].Tag);

 


 

Telegram link

 

2020-05-23T09:13:22

 

Ok I will try. Does Intraweb support modal form?

 


 

Telegram link

 

2020-05-23T09:13:27

 

If you need to embed more stuff in that cell — you can use the Hint property to store string data (but make sure that ShowHint is set to False)

 


 

Telegram link

 

2020-05-23T09:13:42

 

Ok

 


 

Telegram link

 

2020-05-23T09:14:02

 

And since Tag is a TObject, you could use that to store anything — but then you have to worry about creating and disposing of your objects

 


 

Telegram link

 

2020-05-23T09:15:03

 

What I want to do is clicking on a cell to return an Id of a record like adding comments to a specific topic

 


 

Telegram link

 

2020-05-23T09:15:19

 

Ok

 


 

Telegram link

 

2020-05-23T09:15:24

 

Thanks

 


 

Telegram link

 

2020-05-23T09:16:25

 

You must use the OnCellClick of the IWGrid to get your ID

 


 

Telegram link

 

2020-05-23T09:16:49

 

The OnCellClick gives you the column and the row

 


 

Telegram link

 

2020-05-23T09:17:07

 

Oh that’s it!

 


 

Telegram link

 

2020-05-23T09:17:12

 

So to get the ID, just do:

 


 

Telegram link

 

2020-05-23T09:17:34

 

TheID := Integer(MyGrid.Cell[ARow, AColumn].Tag);

 


 

Telegram link

 

2020-05-23T09:18:06

 

I will try thanks Loren

 


 

Telegram link

 

2020-05-23T09:18:11

 

welcome

 


 

Telegram link

 

2020-05-23T09:29:27

 

Fascinated to have this for my application. Lots of calculations in OnRender! Would it slow my page when loading?

 


 

Telegram link

 

2020-05-23T09:30:19

 

This page looks classic and exotic

 


 

Telegram link

 

2020-05-23T09:30:51

 

I like it for my next App that is a collaboration tool

 


 

Telegram link

 

2020-05-23T09:31:18

 

The code to draw executes extremely quickly

 


 

Telegram link

 

2020-05-23T09:31:39

 

You can do tons of complicated drawing, and you won't even notice any difference in how fast your pages are delivered

 


 

Telegram link

 

2020-05-23T09:32:02

 

Good news I will try

 


 

Telegram link

 

2020-05-23T09:32:34

 

But these days you usually get the most bang for your buck by using the HTML5 canvas, and using the vector drawing capabilities that it offers

 


 

Telegram link

 

2020-05-23T09:34:18

 

Loren to be honest I have learned lots on this site; I am an old fashion man but still enjoy coding. I am nearly 60

 


 

Telegram link

 

2020-05-23T09:35:00

 

So tend to stick with Intraweb

 


 

Telegram link

 

2020-05-23T09:35:36

 

But I can still learn but so far my Intraweb Apps are solid

 


 

Telegram link

 

2020-05-23T09:36:11

 

IntraWeb is fantastic — it offers features still not offered by other platforms

 


 

Telegram link

 

2020-05-23T09:36:32

 

And when I suggest using the HTML5 canvas — I am proposing that you do that in your IW app

 


 

Telegram link

 

2020-05-23T09:37:26

 

If you use TIWText component and set RawText to True — you can put whatever HTML5 content in there — and IW will not try to psychoanalyze it — it just passes it straight through to your page

 


 

Telegram link

 

2020-05-23T09:37:31

 

It's EXTREMELY useful!

 


 

Telegram link

 

2020-05-23T09:37:57

 

Yes I know and you have been very helpful and I can tell that I have enjoyed being on this app

 


 

Telegram link

 

2020-05-23T09:38:02

 

It's allows you to use all kinds of modern widgets

 


 

Telegram link

 

2020-05-23T09:38:17

 

May I ask — what language is \Sokel\ from?

 


 

Telegram link

 

2020-05-23T09:38:31

 

I'm a linguist by trade))

 


 

Telegram link

 

2020-05-23T09:39:26

 

Sokel is my name and I am from Congo; currently I am in USA

 


 

Telegram link

 

2020-05-23T09:39:31

 

Wow!

 


 

Telegram link

 

2020-05-23T09:39:38

 

Do you know Lingala or Kikongo?

 


 

Telegram link

 

2020-05-23T09:39:59

 

Yes of course!

 


 

Telegram link

 

2020-05-23T09:40:19

 

Don’t telling me I know you?

 


 

Telegram link

 

2020-05-23T09:40:36

 

I am looking for a few simple translations for those languages, so if you ever have a few moments, I could use some help :)

 


 

Telegram link

 

2020-05-23T09:42:35

 

Lingala yes but kikongo I just understand a bit. Remember we have 4 national languages and I speak 3.

 


 

Telegram link

 

2020-05-23T09:43:02

 

amazing

 


 

Telegram link

 

2020-05-23T09:43:15

 

I lived in South Africa for a while, and I learned some Zulu

 


 

Telegram link

 

2020-05-23T09:43:30

 

You are welcome for lingala.

 


 

Telegram link

 

2020-05-23T09:43:37

 

And I have recently started studying Zulu again with a tutor

 


 

Telegram link

 

2020-05-23T09:43:50

 

Well, we should take this discussion away from this chat))

 


 

Telegram link

 

2020-05-23T09:44:04

 

South Africa? I have been living there since 1991

 


 

Telegram link

 

2020-05-23T09:44:11

 

wow!

 


 

Telegram link

 

2020-05-23T09:44:23

 

Johannesburg NorthCliff

 


 

Telegram link

 

2020-05-23T09:44:52

 

I lived in Yeoville and Roodeport

 


 

Telegram link

 

2020-05-23T09:44:57

 

My tutor is from eThekwini

 


 

Telegram link

 

2020-05-23T09:45:39

 

That’s wonderful! You are welcome Loren

 


 

Telegram link

 

2020-05-23T09:46:03

 

Let's try to make a chat outside of this chat

 


 

Telegram link

 

2020-05-23T09:46:51

 

I am working on a project for my gov and if it is ok I might get in touch with you. There is lots to do

 


 

Telegram link

 

2020-05-23T09:47:01

 

Ok

 


 

Telegram link

 

2020-05-23T09:47:53

 

12076180887 WhatsApp

 


 

Telegram link

 

2020-05-23T09:47:54

 

Roger that

 


 

Telegram link

 

2020-05-23T09:56:03

 

Hello friends!

 

Can I receive read receipt of email sent by indy? I know that this is an IntraWeb group, but I believe that someone can help me with this. tks