Showing posts with label Infragistics FromKey. Show all posts
Showing posts with label Infragistics FromKey. Show all posts
Thursday, December 24, 2009
Infragistics WebCombo Get the Value of Cell by Column Name
Get the Value in a Cell by the Column Name
To get the value in a Infragistics WebCombo cell by the column name (in this case, column DrugName):
string chosenName = e.Row.Cells.FromKey("DrugName").ToString;
where e is the EventArgs from
protected void igWebCombo1_SelectedRowChanged(object sender,
Infragistics.WebUI.WebCombo.SelectedRowChangedEventArgs e)
I had previously gotten the value using an index value:
string chosen = e.Row.Cells[2].Value.ToString().Trim();
but in continuing development, the number of columns may vary, and therefore the index may change.
To get the value in a Infragistics WebCombo cell by the column name (in this case, column DrugName):
string chosenName = e.Row.Cells.FromKey("DrugName").ToString;
where e is the EventArgs from
protected void igWebCombo1_SelectedRowChanged(object sender,
Infragistics.WebUI.WebCombo.SelectedRowChangedEventArgs e)
I had previously gotten the value using an index value:
string chosen = e.Row.Cells[2].Value.ToString().Trim();
but in continuing development, the number of columns may vary, and therefore the index may change.
Subscribe to:
Posts (Atom)