"string FolderID = grdCalls.SelectedDataKey[0].ToString() "
It will not show you a Compile time error Because at a time of compilation compiler doesn't know Either you have used multiple Datakeys or not.
i.e
DataKeyNames=CustID,ProductID
If you have used single
DataKeys
i.e
DataKeyNames = CustID
then you dont need to pass
Index
at codeside,
You can pass the index if you have used multiple keys as described above.
Hope it helps.
Please
vote and
Accept Answer if it Helped.