Quantcast
Channel: AX Developer Forum
Viewing all articles
Browse latest Browse all 9880

Get value from axboundfield

$
0
0

hi,

I have simple axform with axgroup. How can get value of DataField="ItemBrand_RS" ?

 

c#


    static AxBoundField GetField(DataControlFieldCollection fields, string name)
    {
        foreach (DataControlField field in fields)
        {
            // Is this the field being searched for?
            AxBoundField boundField = field as AxBoundField;
            if (boundField != null && String.Compare(boundField.DataField, name, true) == 0)
            {
                return boundField;
            }

        }
            return null;
    }

 AxBoundField ItemBrandLists;
 ItemBrandLists = GetField(AxGroup1.Fields, "ItemBrand_RS");

 

asp

<dynamics:AxForm runat="server" ID="ListProd"
    DataMember="InventTable_Current" DataSourceID="ADSItemBrandLookup" DefaultMode="Edit"
    DataKeyNames="ItemBrand_RS">
    <dynamics:AxGroup ID="AxGroup1" runat="server">
      <Fields>    
        <dynamics:AxBoundField DataSet="ARTAOLItemBrandLookup" DataSetView="InventTable" DataField="ItemBrand_RS" />
      </Fields>
    </dynamics:AxGroup>
  
</dynamics:AxForm>


Viewing all articles
Browse latest Browse all 9880

Trending Articles