GridViewDataComboBoxColumn: Taking value into datasource, updating problem

87 Views Asked by At

I'm working on a project using a Gridview and inside are 3 comboboxes (ComboboxColumn).

My first request when the page loads shows the different years where an organisation has a project in this year. When the year is chosen, I want second combobox to update it's values depending on the year choice. I'm using

<asp:SqlDataSource >"
            SelectCommand="SELECT distinct [Nom_orga] FROM [T_Organisme] o
            inner join TR_Projet_Organisme t on o.ide_orga=t.ide_orga
            inner join T_Projet p on t.ide_proj = p.ide_proj
                where Ind_etrng = 0

                and ([Ann_finan] = @Ann_finan)
                       ORDER BY [Nom_orga] 
                        ">
                        <SelectParameters>
                            <asp:SessionParameter Name="Ann_finan" SessionField="Ann_finan" Type="String" ***DefaultValue="2007-2008"***/>
                        </SelectParameters></asp:SqlDataSource>

I have to pass a default value to the sqldatasource parameter, otherwise the 2d combobox doesn't show anything.

Can someone please explain how to remove the default value so the 2d combobox shows the value depending on the 1th combobox automatically (without refreshing the page or sub-page?

I tried numerous ways to go around, like with cookies, but the updating part after choosing a year value doesn't work because this is NOT a combobox. It's a GridViewDataComboBoxColumn PropertiesComboBox.

0

There are 0 best solutions below