Hello,
I have a form with an ultragrid and a bindingsource. I want to show the customers from the sports db.
I attach the dataset handle with data to the bindingsource handle and alla data is shown. So far , no problem.
I now want to add an unbound column with the number of orders for each customer. (and no, I don't want to add it to my temp-table definition !)
In the initializelayout event of the grid I add a column, set the datatype , code is below :
define variable layout as Infragistics.Win.UltraWinGrid.UltraGridLayout no-undo. define variable band as Infragistics.Win.UltraWinGrid.UltraGridBand no-undo. layout = e:Layout. band = layout:Bands[0]. define variable calcCol as Infragistics.Win.UltraWinGrid.UltraGridColumn no-undo. calcCol = band:Columns:Add("KeyCalcCol":u, "Number orders":u). calcCol:DataType = Progress.Util.TypeHelper:GetType("System.Int32").
The column is shown : OK
I now want to fill the column with data, so I go to the InitializeRow event of the grid.
There it goes wrong : I always get the value of the first record even though the row is a different row.
This code is correct : e:Row:Cells:Item["Cust-Num"]:Value -> it gives me the correct customer number
If I test : available(ttCustomer) -> OK, but it always gives me the first customer whatever row I'm on
The AutoSync attribute on the datasource is true.
Anyone an idea ?
Hello,
I have a form with an ultragrid and a bindingsource. I want to show the customers from the sports db.
I attach the dataset handle with data to the bindingsource handle and alla data is shown. So far , no problem.
I now want to add an unbound column with the number of orders for each customer. (and no, I don't want to add it to my temp-table definition !)
In the initializelayout event of the grid I add a column, set the datatype , code is below :
define variable layout as Infragistics.Win.UltraWinGrid.UltraGridLayout no-undo.
define variable band as Infragistics.Win.UltraWinGrid.UltraGridBand no-undo.
layout = e:Layout.
band = layout:Bands[0].
define variable calcCol as Infragistics.Win.UltraWinGrid.UltraGridColumn no-undo.
calcCol = band:Columns:Add("KeyCalcCol":u, "Number orders":u).
calcCol:DataType = Progress.Util.TypeHelper:GetType("System.Int32").
The column is shown : OK
I now want to fill the column with data, so I go to the InitializeRow event of the grid.
There it goes wrong : I always get the value of the first record even though the row is a different row.
This code is correct : e:Row:Cells:Item["Cust-Num"]:Value -> it gives me the correct customer number
If I test : available(ttCustomer) -> OK, but it always gives me the first customer whatever row I'm on
The AutoSync attribute on the datasource is true.
Anyone an idea ?
Flag this post as spam/abuse.
“I want to accomplish an automatic conversion from a progress browser to an infragistics grid.”
Hello,
I have a form with an ultragrid and a bindingsource. I want to show the customers from the sports db.
I attach the dataset handle with data to the bindingsource handle and alla data is shown. So far , no problem.
I now want to add an unbound column with the number of orders for each customer. (and no, I don't want to add it to my temp-table definition !)
In the initializelayout event of the grid I add a column, set the datatype , code is below :
define variable layout as Infragistics.Win.UltraWinGrid.UltraGridLayout no-undo.
define variable band as Infragistics.Win.UltraWinGrid.UltraGridBand no-undo.
layout = e:Layout.
band = layout:Bands[0].
define variable calcCol as Infragistics.Win.UltraWinGrid.UltraGridColumn no-undo.
calcCol = band:Columns:Add("KeyCalcCol":u, "Number orders":u).
calcCol:DataType = Progress.Util.TypeHelper:GetType("System.Int32").
The column is shown : OK
I now want to fill the column with data, so I go to the InitializeRow event of the grid.
There it goes wrong : I always get the value of the first record even though the row is a different row.
This code is correct : e:Row:Cells:Item["Cust-Num"]:Value -> it gives me the correct customer number
If I test : available(ttCustomer) -> OK, but it always gives me the first customer whatever row I'm on
The AutoSync attribute on the datasource is true.
Anyone an idea ?
Flag this post as spam/abuse.
Mike,
Thanks for the answer, although it is not want I wanted to hear.
I want to accomplish an automatic conversion from a progress browser to an infragistics grid.
I detach the query from the browser and attach it to the bindingsource, but then I only get the fields in the buffer and not the calculated fields that were in the browser.
So I thought, I add the columns as unbound columns, and populate them in the initializeRow , but no good going that way ...
I find it very strange that the fields in the buffer are appropiate and that the bindingsource is not following
kind regards
gerd
“I want to accomplish an automatic conversion from a progress browser to an infragistics grid.”
I remember the one you mean Mike. It's something like LinBox isn't it? :)
Yeah yeah ... I get the picture ... I'm alone on this one ...