If you're getting an error for the table indexed 0, the
fillgrid
method isn't most likely creating/ filling the table into your dataset. Use the debugger to see what's happening inside the method.
About the query, if you're trying to fetch all products and if a product has a category then fetch the categoryname also, then it looks quite right.
However, try using
SqlParameter[
^] (if this is Sql Server) instead of concatenating literals into the statement (
DropDownList1.Text
).