cancel
Showing results for 
Search instead for 
Did you mean: 

How to change Data type of Grid column at runtime..??

Former Member
0 Kudos

Hi ,

I have taken a "Grid" control,and i have pass a query "Select itemcode Qunatity,linetotal From PDN1" in the ExecuteQuery

method of Grid it displaying the data,

but the problem is i want to change the Datatype of this column from "FLOAT" to "db_Quantity" according to the SAP standerd

of decimal places(like 2 or 3 decimal place which the customer maintain) after executing Query.

How can we achieve this please guide me what to do...

Thanks

Sandesh

Accepted Solutions (1)

Accepted Solutions (1)

former_member209699
Contributor
0 Kudos

Hi sandesh

try with

Select itemcode Qunatity,convert(decimal(19,2), linetotal) [linetotal] From PDN1

regards:

Sandy

0 Kudos

Not Work!

pedro_magueija
Active Contributor
0 Kudos

Hi Enrico,

Using queries to "define" the type is very tricky. There is no way to correctly identify the semantic difference between a price and a quantity (they are both "doubles").

One way you can do it is to create the DataTable bound to the Grid manually and define the columns correctly. You can then use the DataTable SetValue method to set the data in it.


Pedro Magueija


LinkedIn Logo View Pedro Magueija's profile on LinkedIn
Follow @pedromagueija on Twitter

If this answer was helpful or correct consider marking it as such.

Answers (0)