Hi, I want to get values from grid from two columns.
I have a function for getting values from one column:
For example my grid contains data:
Column1 Column2 Column3
1 2 3
4 5 6
7 8 9
If I execute code 2 times (for Column1 and Column3, could I be sure thay values will be:
"1;7" and "3;9" (right order, from top to bottom in those 2 cases)?
Or the order could be random for example: "1;7" and "9, 3"?
I have a function for getting values from one column:
string
tmp = String.Empty;
if
(rg.SelectedItems.Count > 0)
{
int
i = 0;
foreach
(GridDataItem DataItem
in
RadGrid.SelectedItems)
{
TableCell cell = DataItem[columnName];
if
(cell.Text.Length > 0 && cell.Text !=
" "
)
{
tmp = String.Format(
"{0}{1}{2}"
, tmp, i > 0 ?
";"
:
""
, cell.Text);
}
i++;
}
}
return
tmp;
Column1 Column2 Column3
1 2 3
4 5 6
7 8 9
If I execute code 2 times (for Column1 and Column3, could I be sure thay values will be:
"1;7" and "3;9" (right order, from top to bottom in those 2 cases)?
Or the order could be random for example: "1;7" and "9, 3"?