Ram,
To pass the selected rows from a datagrid to a microflow, you'll need to place the Action button that calls your microflow in the control bar of the datagrid, like this:
Bear in mind your microflow will need a parameter which is a list of the entity your datagrid points to. If you are trying to use this in a shopping cart app, you'll also need to have a cart entity (or some entity that enables you to retrieve the cart), as a parameter in your microflow. To pass this in to your microflow, place the datagrid inside of a dataview which points to the cart entity. Then when you point the action button to your microflow, it will find both parameters.
In the scenario I've described above, if the user clicks the action button without having at least one row selected in the datagrid, he will get an message that indicates no records are selected.
Documentation can be found at docs.mendix.com
Hope that helps,
Mike