• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

DropDown gets refreshed from DW.DataSet. Also need alter DataSetCommandText to filter from dropdown

New Here ,
Aug 20, 2024 Aug 20, 2024

Copy link to clipboard

Copied

<%@ 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>

Views

176

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 20, 2024 Aug 20, 2024

Copy link to clipboard

Copied

Which version of Dreaweaver?

 

Dynamic Content Sources:

https://helpx.adobe.com/dreamweaver/using/dynamic-content-sources-overview.html

 

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 20, 2024 Aug 20, 2024

Copy link to clipboard

Copied

Adobe dreamweaver 21.1

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 20, 2024 Aug 20, 2024

Copy link to clipboard

Copied

In all honesty, you are using an outdated workflow for your application. A better, more secure and faster way to create a web application today is to use web API's.  This will result in the features that you are looking for.

 

Have a look at https://dotnet.microsoft.com/en-us/apps/aspnet/apis for what this is about.

 

A tool that will create the ASP.net API's automatically, without hand coding, is Wappler.

 

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

Thanks for your response but, we do not have the time and budget for that.

There is a viewstate and the drop down gets refreshed each time there is a post back.

I kinda sorta managed question #2, but need fix on question #1.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

I meant to say... EVENTHOUGH there is a viewstate the drop down STILL gets refreshed each time....

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

I don't think anyone in this Dreamweaver community can help you.  Most DW users don't use ASP or have moved beyond it.  Perhaps the Microsoft community can better assist you.

https://learn.microsoft.com/answers/questions/1741650/classic-asp-support-clarification

 

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

LATEST

Issue is I am not initiating the code in code behind or c# but using tags <Dataset></Dataset> instead.

So the dataset gets initiated each time and resets the drop down. Is there a way to avoid databinding the dataset to the drop down at each submit/postback? Like in C#/codebehind you have this

 

   if (!IsPostBack)
        ddlTypeProf.DataBind();

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines