Question
DropDown gets refreshed from DW.DataSet. Also need alter DataSetCommandText to filter from dropdown
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
--Getting rows from Dataset for Grid
<MM:DataSet id="DSGRID" runat="Server" Debug="true" ConnectionString='' DatabaseType=''
CommandText='<%# "SELECT Manager,.... from ..." %>'
></MM:DataSet>
--Getting rows from Dataset for DropDown
<MM:DataSet id="dsDropDown" runat="Server" Debug="true" ConnectionString='' DatabaseType=''
CommandText='<%# "SELECT Manager from ..." %>'
></MM:DataSet>
--Populate DropDown from DataSet
<asp:DropDownList ID="ddlManager" DataSource='<%# dsGrid.DefaultView %>' runat="server" autopostback="true" ENABLEVIEWSTATE="TRUE" ">
</asp:DropDownList>
--Populate Grid from DataSet
<ASP:Repeater runat="server" DataSource='<%# dsGrid.DefaultView %>' >
INTRO
I am using Dreamweaver with tag MM to create 2 DataSet objects for a drop down & a grid. The drop down is used to filter the grid.
Currently the drop down and grid statically displays all date. The issues is:-
1) The drop down refreshes the screen and its selected value gets reset only because I think the dataset is refreshed and refreshes the drop down.
How to avoid this, If there is a way to do something like this:-
<% If !PostBack
Create DataSet
Populate the ddlManager
else
--dont refresh the dataset or dropdown
End If
%>
2) How to dynamically filter the Grid with selection from drop down. Or how to alter the dataset to include the filter from drop down selection
If there is a way to insert a WHERE clause comparing the drop down value, like this:-
<MM:DataSet id="DSGRID"
CommandText='<%# "SELECT Manager,.... from ...<%WHERE MANAGER='DDLMANAGER.VALUE'%>" %>'
></MM:DataSet>
