Problema com p:dialog Primefaces?

Eu tenho um Data Grid que recebe uma lista e dentro deste Data Grid tenho um p:dialog que vai fazer uma inserção de dados no meu banco de dados, porém quando clico no botão que chama esse dialog ele puxa somente o primeiro ID, isso para todas as partes do “grid”. Segue abaixo trecho do código.

<p:dataGrid  var="demanda" value="#{demandasBean.listaDemandas}"
					columns="3" layout="grid" rows="12" paginator="true" id="demandas"
					paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
					rowsPerPageTemplate="6,12,16" >

					<f:facet name="header">
					 Demandas
					</f:facet>

					<p:panel header="#{demanda.nome}" style="text-align:center">
						<h:panelGrid columns="1" style="width:100%">
							<p:graphicImage id="imagem" style="width:280px; height:160px"
								url="#{demanda.imagem}" />

							<p:commandLink update=":form:carDetail"
								oncomplete="PF('carDialog').show()" title="View Detail">
								<h:outputText id="info" value="Mais Informações" />
								<f:setPropertyActionListener value="#{demanda}"
									target="#{demandasBean.selecionaDemandas}" />
							</p:commandLink>

							<!-- BOTAO DOAÇÃO -->
							<p:panelGrid>
								<p:commandButton id="btnDoacao" value="Fazer uma Doação"
									onclick="PF('dlg').show();" immediate="true" update="pnDoacao" />
								
								<br />
								<br />
								
								<!-- BARRA DE PROGRESSO -->
								<p:outputLabel value="Doações Recebidas" />
								<p:progressBar id="brProgres"
									value="#{demandasBean.selecionaDemandas.quantidade}"
									labelTemplate="20/{value}" displayOnly="true" />

							</p:panelGrid>
						</h:panelGrid>
					</p:panel>

					<p:dialog modal="true" dynamic="true" id="dlgDoacao" widgetVar="dlg">
											
					<p:panel>
						<h:panelGrid columns="2" cellpadding="5" id="pnDoacao" >
							<p:outputLabel for="quantidade" value="Quantidade:" />
							<p:spinner id="quantidade"
								value="#{demandasBean.demUsuario.quantidade}"
								label="quantidade" />
							<p:outputLabel value="Un. Medida:"/>
							<p:outputLabel value="#{demanda.uni_Medida}"/>

							<p:commandButton id="btnAceitar"
								action="#{demandasBean.aceitarDemanda(demanda)}" value="Salvar"
								update="brProgres"  />
						</h:panelGrid>
					</p:panel>
				</p:dialog>
				</p:dataGrid>`

Com o dialog não consegue fazer funcionar porém com o OverlayPanel funcionou normalmente.