When you convert the points (from lines) to raster (grid), you can bring one attribute (from points) to raster table and this field can be linked to the line's ID.
Point layer can get lines ID (when you convert or after conversion you can join line ID to the point).