We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

using Grid control for invoice

Thread ID:

Created:

Updated:

Platform:

Replies:

132673 Sep 14,2017 11:23 PM Sep 18,2017 08:32 AM Windows Forms 3
loading
Tags: GridControl
Harjinder Singh
Asked On September 14, 2017 11:23 PM

I want to use Grid control in invoice.Lot of fields are double and integer and currency and want to validate all of them so that no column has value 0(zero) or empty before going to next cell.
I tried to use validating event as suggested on help portal as well as in various example but facing two issues.\
1. if trying to cast cell to gridtextboxrenderer then always remain nothing infact value is there
2. Use another help topic to use controltext property.In this case when i move to next control and value is 0 it does nothing .if i enter some value it it shows empty string.
   when i came back from next cell to previous and changed value then in validation only gets previous value.


Kindly look in to the mater and suggest how to achieve this.

Mohanraj Gunasekaran [Syncfusion]
Replied On September 15, 2017 10:17 AM

Hi Harjinder, 

Thanks for using Syncfusion product. 

Query 
Solution 
 if trying to cast cell to gridtextboxrenderer then always remain nothing infact value is there 
By default, GridCells are having TextBox CellType, so all the cells are defined in GridTextBoxCellRenderer so renderers have assigned based on the CellType. As per your update you are using GridTextBoxCellRender so we have checked the following celltypes, 

·         ButtonEdit 
·         ComboBox, GridListControl (DropDown) 
·         NumericUpDown 
·         LinkLabel 
·         TextBox 
But we are unable to reproduce your scenario. So, please let us know if you are using any other CellTypes in grid, please provide that details. If it is possible, please provide the sample to reproduce your scenario. It will be helpful to provide the solution at the earliest.  
  
Use another help topic to use controltext property.In this case when i move to next control and value is 0 it does nothing .if i enter some value it it shows empty string. 

We can reproduce your scenario with DoubleTextbox CellType. Can you please confirm whether you are using DoubleTextBox CellType or different? It will help us to assist you. 


Regards, 
Mohanraj G 


Harjinder Singh
Replied On September 16, 2017 11:48 AM

Yes I am using Double textbox as well masked date box in  my grid.

For grid there is  no sample/guid

1. stating how i can move to next row from a specific cell.

2. using named columns

3. formula type cell is defined but not working

4. no formula column is defined

Now another problem with masked edit date setting

I cant validate date  in MaskCustomValidate ,it always left I digit and try to validate.So I try to use it in control leave event with DateTime.ParseExact format exception making textbox property to blank if exception occurs,but in this case control text alignment changes to right

here is the code snipt

Try
            Try
                DateTime.ParseExact(Me.txtInvoiceDate.Text, "dd/MM/YYY", System.Globalization.CultureInfo.InvariantCulture)
                Dim userDate As DateTime = Convert.ToDateTime(Me.txtInvoiceDate.Text)
                If (userDate > DateTime.Now) Then
                    Me.txtInvoiceDate.Text = ""
                End If
            Catch ex As FormatException
                Me.txtInvoiceDate.Text = ""
            End Try

        Catch ex As Exception
            Messages.ExceptionMessage(ex)
        End Try

if i disables Me.txtInvoiceDate.Text = "" then textalignment remain left



Mohanraj Gunasekaran [Syncfusion]
Replied On September 18, 2017 08:32 AM

Hi Harjinder, 
 
Thanks for your update. 
 
Query 
Solution 
Yes I am using Double textbox. 
We have created separate incidents for this queries, so please follow up with that incidents using your direct-trac login, 

  
stating how i can move to next row from a specific cell. 
 using named columns 
formula type cell is defined but not working 
 no formula column is defined 
I cant validate date in MaskCustomValidate ,it always left I digit and try to validate.So I try to use it in control leave event with DateTime.ParseExact format exception making textbox property to blank if exception occurs,but in this case control text alignment changes to right 

Regards, 
Mohanraj G 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;