Configure Data Source Wizard
am 12.01.2008 17:40:03 von rodchar
hey all,
i'm manually adding my items to my dropdownlist that will filter the
gridview under it.
i go thru the Configure Data Source Wizard on the gridview in which i
specify the dropdownlist control value to be the filter in my WHERE clause.
it works fine except i don't know how to get the NULL records to show up. is
it possible to specify a NULL item when manually adding items to my
dropdownlist?
thanks,
rodchar
RE: Configure Data Source Wizard
am 14.01.2008 23:02:00 von chad
When you are manually adding items to your DropDownList, simply use:
MyDropDownListControl.Items.Add(string.Empty);
Or in your Markup,
Then in your configure data source wizard, for that control you can specify
the DefaultValue="" or leave it blank, then set the
ConvertEmptyStringToNull="True".
This will place a blank item in your select list in the rendered HTML, as
well as set the value for the parameter to NULL when the blank option is
selected for your data source control.
Hope this helps.
Thanks,
--
Chad Scharf
_______________________________
http://www.chadscharf.com
"rodchar" wrote:
> hey all,
> i'm manually adding my items to my dropdownlist that will filter the
> gridview under it.
>
> i go thru the Configure Data Source Wizard on the gridview in which i
> specify the dropdownlist control value to be the filter in my WHERE clause.
>
> it works fine except i don't know how to get the NULL records to show up. is
> it possible to specify a NULL item when manually adding items to my
> dropdownlist?
>
> thanks,
> rodchar