This is a "good news, bad news" situation.
The good news is that you can use the new class by creating it at run-time ... which leads to the bad news: it means that you can't use the designer to set properties, add event handlers , etc.
For myself that wouldn't worry me too much: it's pretty easy to copy all those from the
.lfm, paste them into, say, the FormCreate handler and adding whatever it needs to make it apply to the TMyDBGrid object instead of the TDBGrid one.
I've attached an extremely simple (an utterly inutil) project as an example of this approach.
If you're not comfy with that, though, then I think your only solution is to make a package and install it on the IDE, which is quite another kettke of fish
ETA - Oh, BTW, regarding:
[ I ] didn't know how to change it [...]
to modify the lfm by hand in the IDE, right-click in the form and select "View source (.lfm)"; it'll open the LFM text in an editor window, where you can change whatever you want ... but you must know what you're doing!