Hi
Need some help with a asp gridview control this is the snippet from the gridview columns:
ASPx<dx:GridViewDataTextColumn VisibleIndex="0" Name="Periode" Width="150px" Caption="Periode">
<DataItemTemplate>
<dx:ASPxTextBox ID="periode" runat="server" Width="100%" Value='<%#Bind("Periode") %>'>
</dx:ASPxTextBox>
</DataItemTemplate>
</dx:GridViewDataTextColumn>
<dx:GridViewCommandColumn ButtonType="Button" VisibleIndex="1" Width="60px" Caption="">
<CustomButtons>
<dx:GridViewCommandColumnCustomButton ID="cmdMakeBon" Text="Maak bon">
</dx:GridViewCommandColumnCustomButton>
</CustomButtons>
</dx:GridViewCommandColumn>
What I want is when the button is clicked check if the textbox 'periode' is empty if so show popupcontrol else perform calback and execute code with the row values.
I got this as javascript but i does not seem to work how can I get the value from the aspxtextbox?
JavaScript<script type="text/javascript">
var rowVisibleIndex;
function grid_CustomButtonClick(s, e) {
if (e.buttonID != 'cmdMakeBon') return;
rowVisibleIndex = e.visibleIndex;
s.GetRowValues(e.visibleIndex, 'Periode',ShowPopup);
}
function ShowPopup(rowId) {
popupControl.Show();
// btnYes.Focus();
}
</script>