S
Savvoulidis Iordanis
How can I display a different control for my [value_column (varchar)] in my
table, inside an ItemTemplate or EditTemplate, depending on the value of
another column, the [type_column (varchar)], which has values like 'STRING',
'INTEGER', 'BOOLEAN', 'DECIMAL', 'DATETIME', 'MONEY', 'SQL_LIST_VALUES'?
That is, if the [type_column] in a specific gridview row, has a value of
'BOOLEAN', then I want my [value_column] to display a checkbox in
ItemTemplate or EditTemplate and not a textbox. Also, when the [type_column]
is 'INTEGER', I want my [values_column] to display a textbox that accepts
only integer numbers. If the type column is MONEY, I want the ItemTemplate to
display a label formated with the currency symbol. If the [type_column] is
'SQL_LIST_VALUES', the [value_column] should display a dropdownlist in
editmode, filled by a SQL statement stored in a 3rd column [sql_column]. And
so on.
To sum up, when the user sees the gridview in read mode or edit mode, he/she
should see different controls in each row of a specific column and not just
labels or textboxes, which is the default.
TIA
Iordanis
table, inside an ItemTemplate or EditTemplate, depending on the value of
another column, the [type_column (varchar)], which has values like 'STRING',
'INTEGER', 'BOOLEAN', 'DECIMAL', 'DATETIME', 'MONEY', 'SQL_LIST_VALUES'?
That is, if the [type_column] in a specific gridview row, has a value of
'BOOLEAN', then I want my [value_column] to display a checkbox in
ItemTemplate or EditTemplate and not a textbox. Also, when the [type_column]
is 'INTEGER', I want my [values_column] to display a textbox that accepts
only integer numbers. If the type column is MONEY, I want the ItemTemplate to
display a label formated with the currency symbol. If the [type_column] is
'SQL_LIST_VALUES', the [value_column] should display a dropdownlist in
editmode, filled by a SQL statement stored in a 3rd column [sql_column]. And
so on.
To sum up, when the user sees the gridview in read mode or edit mode, he/she
should see different controls in each row of a specific column and not just
labels or textboxes, which is the default.
TIA
Iordanis