Could it be possible to pass the filter choices made by the user as to open a new page using those parameters as to show in the next page just the already passed values?
I'm not quite sure I made myself understand here .... ?
I need to call a form by means of using the already selected choices made from the user on top of the List.aspx pagecorrespònding to the dropdownlists (filters) shown there .... (I really use the ListDetails one ....) as parameters for displaying a filtered set of data in the grid of the newlly called page in accordance to the criteria selected in the previous page
....
So I like to carry on the choices made in the calling form filters ....
I wish I had screens .. it will be already solved then, sin' it? (... just thinking aloud for myself !!)
This is almost like having a way of "gathering" all of the data contained in one of your pages and/or forms so you might Redirect and call a new page using some of the data you already have collected at that moment.
I need a way of allowing me to "loop" among all of my controls and have the information available for me at any given ,moment so I can use later on in a newly called form and/or page
Not quite sure I'm clear in my way of writing this ...
I need a way of allowing me to "loop" among all of my controls and have the information available for me at any given ,moment so I can use later on in a newly called form and/or page
If u wanna get ControlID, I'm afraid it's not possible. DD is designed for fetching data from db instead of fetching out controlIDs from the page itself!
But Dynamic Data knows how and when to do it. Is so impossible to disclose that knowledge?
My theory is: It should be good to know HOW dynamic data does these things.
For instance, Stephen Naughton made is own oimplementation of the PopulateListControl and OnDataBinding methods. He used some kind of "decomiplation" of the native .Net code in order to do that ... but even if you try is kind of nightmare because the native
classes (if you are willing to debug them) they take you to very remote and unknown places so you got easily lost.
I think that CRUD classes and ways of dealing with Dynamic Data behaviour and its way of doing things are the cornerstone of all of tthis technology and shouldn't be hideen from programmers but on tjhe contrary: very, very much more available to all of us
in order to make easy and complete implemenattion of all of those features
Problem is taht Dynamic data comes "nude" in what is regarding to its documentation so you need to go to Mr. Naughton and to this forum in order to get some answers ... and problem is that this marvelous tool sonn will be deprecated in its entirety from
VS20XX pretty soon because MVC seems to be the way to go ....
I thinks that if Craig Shoemaker, Yacine Khammal, Oleg Sich and Stephen naughton (on its own) and many other guys knows the inner devices of Dynamic Data as a kid knows how to deal with LEGO toys and build things, Microsoft SHOULD provide that knowledge
to us ... all at once but it seems that if you go with Dynamic Data you are on your own
I have always asked myself how in the world can Stephen naughton write code like this "IN C# FOR DYNAMIC DATA" not for conventional ASP.Net pages, which is by the way something rather and absolutelly different ... in its entirety .... oil and water ... !!!!
/// <summary>
/// Get the Data Control containing the FiledTemplate
/// usually a DetailsView or FormView
/// </summary>
/// <param name="control">
/// Use the current field template as a starting point
/// </param>
/// <returns>
/// A CompositeDataBoundControl the base class for FormView and DetailsView
/// </returns>
private CompositeDataBoundControl GetContainerControl()
{
var parentControl = this.Parent;
while (parentControl != null)
{
// NOTE: this will not work if used in
// inline editing in a list view as
// ListView is a DataBoundControl.
var p = parentControl as CompositeDataBoundControl;
if (p != null)
return p;
else
parentControl = parentControl.Parent;
}
return null;
}
or like this one
// advanced populate list control
protected void PopulateListControl(ListControl listControl, String filterValue)
{
//get the parent column
if (ParentColumn == null)
{
// if no parent column then just call
// the base to populate the control
PopulateListControl(listControl);
// make sure control is enabled
listControl.Enabled = true;
}
else if (String.IsNullOrEmpty(filterValue))
{
// if there is a parent column but no filter value
// then make sure control is empty and disabled
listControl.Items.Clear();
if (Mode == DataBoundControlMode.Insert || !Column.IsRequired)
listControl.Items.Add(new ListItem("[Not Set]", ""));
// make sure control is disabled
listControl.Enabled = false;
}
else
{
// get the child columns parent table
var childTable = ChildColumn.ParentTable;
// get query {Table(Developer).OrderBy(d => d.Name)}
var query = ChildColumn.ParentTable.GetQuery(Column.Table.CreateContext());
// get list of values filtered by the parent's selected entity
var itemlist = query.GetQueryFilteredByParent(ParentColumn, filterValue);
// clear list controls items collection before adding new items
listControl.Items.Clear();
// only add [Not Set] if in insert mode or column is not required
if (Mode == DataBoundControlMode.Insert || !Column.IsRequired)
listControl.Items.Add(new ListItem("[Not Set]", ""));
// add returned values to list control
foreach (var row in itemlist)
listControl.Items.Add(
new ListItem(
childTable.GetDisplayString(row),
childTable.GetPrimaryKeyString(row)));
// make sure control is enabled
listControl.Enabled = true;
}
}
How can this submission can be followed up so I can see results ...
I'm not complaining but asking, eager to get an answer
It should be good that my question doesn't go to the limbo waiting to be answered ... so, in a very good way, with hope and trust in the team you will submit this to: please answer, please provide a solution .... PLEASE !!!
With pleasure,and I've submitted your issue to our inner group,and maybe someone will help you with that. Maybe he/she will tell you detailed information or something to explain to you in details.
klca
Member
509 Points
421 Posts
Passing filter values among forms
Nov 21, 2012 10:12 PM|LINK
Hi,
Could it be possible to pass the filter choices made by the user as to open a new page using those parameters as to show in the next page just the already passed values?
I'm not quite sure I made myself understand here .... ?
I need to call a form by means of using the already selected choices made from the user on top of the List.aspx page correspònding to the dropdownlists (filters) shown there .... (I really use the ListDetails one ....) as parameters for displaying a filtered set of data in the grid of the newlly called page in accordance to the criteria selected in the previous page ....
So I like to carry on the choices made in the calling form filters ....
Carlos N. Porras
(El Salvador)
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Passing filter values among forms
Nov 23, 2012 12:30 AM|LINK
Hi,
Can you show us a screenshot about the steps that you wanna achieve?
Reguards!
klca
Member
509 Points
421 Posts
Re: Passing filter values among forms
Nov 23, 2012 02:06 AM|LINK
Hi,
I wish I had screens .. it will be already solved then, sin' it? (... just thinking aloud for myself !!)
This is almost like having a way of "gathering" all of the data contained in one of your pages and/or forms so you might Redirect and call a new page using some of the data you already have collected at that moment.
I need a way of allowing me to "loop" among all of my controls and have the information available for me at any given ,moment so I can use later on in a newly called form and/or page
Not quite sure I'm clear in my way of writing this ...
Carlos N. Porras
(El Slavador)
ToughMan
Participant
1490 Points
635 Posts
Re: Passing filter values among forms
Nov 23, 2012 03:02 AM|LINK
If u wanna get ControlID, I'm afraid it's not possible. DD is designed for fetching data from db instead of fetching out controlIDs from the page itself!
klca
Member
509 Points
421 Posts
Re: Passing filter values among forms
Nov 23, 2012 03:38 AM|LINK
Hi,
But Dynamic Data knows how and when to do it. Is so impossible to disclose that knowledge?
My theory is: It should be good to know HOW dynamic data does these things.
For instance, Stephen Naughton made is own oimplementation of the PopulateListControl and OnDataBinding methods. He used some kind of "decomiplation" of the native .Net code in order to do that ... but even if you try is kind of nightmare because the native classes (if you are willing to debug them) they take you to very remote and unknown places so you got easily lost.
I think that CRUD classes and ways of dealing with Dynamic Data behaviour and its way of doing things are the cornerstone of all of tthis technology and shouldn't be hideen from programmers but on tjhe contrary: very, very much more available to all of us in order to make easy and complete implemenattion of all of those features
Problem is taht Dynamic data comes "nude" in what is regarding to its documentation so you need to go to Mr. Naughton and to this forum in order to get some answers ... and problem is that this marvelous tool sonn will be deprecated in its entirety from VS20XX pretty soon because MVC seems to be the way to go ....
I thinks that if Craig Shoemaker, Yacine Khammal, Oleg Sich and Stephen naughton (on its own) and many other guys knows the inner devices of Dynamic Data as a kid knows how to deal with LEGO toys and build things, Microsoft SHOULD provide that knowledge to us ... all at once but it seems that if you go with Dynamic Data you are on your own
Carlos N. Porras
(El Salvador)
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Passing filter values among forms
Nov 23, 2012 03:46 AM|LINK
Hello again,
Do you wanna know more about the functions of Dynamic Data and how it works?
klca
Member
509 Points
421 Posts
Re: Passing filter values among forms
Nov 23, 2012 03:53 AM|LINK
Hi Mr. Dong,
and YES ... SURE DO !!!!
I have always asked myself how in the world can Stephen naughton write code like this "IN C# FOR DYNAMIC DATA" not for conventional ASP.Net pages, which is by the way something rather and absolutelly different ... in its entirety .... oil and water ... !!!!
/// <summary> /// Get the Data Control containing the FiledTemplate /// usually a DetailsView or FormView /// </summary> /// <param name="control"> /// Use the current field template as a starting point /// </param> /// <returns> /// A CompositeDataBoundControl the base class for FormView and DetailsView /// </returns> private CompositeDataBoundControl GetContainerControl() { var parentControl = this.Parent; while (parentControl != null) { // NOTE: this will not work if used in // inline editing in a list view as // ListView is a DataBoundControl. var p = parentControl as CompositeDataBoundControl; if (p != null) return p; else parentControl = parentControl.Parent; } return null; }or like this one
// advanced populate list control protected void PopulateListControl(ListControl listControl, String filterValue) { //get the parent column if (ParentColumn == null) { // if no parent column then just call // the base to populate the control PopulateListControl(listControl); // make sure control is enabled listControl.Enabled = true; } else if (String.IsNullOrEmpty(filterValue)) { // if there is a parent column but no filter value // then make sure control is empty and disabled listControl.Items.Clear(); if (Mode == DataBoundControlMode.Insert || !Column.IsRequired) listControl.Items.Add(new ListItem("[Not Set]", "")); // make sure control is disabled listControl.Enabled = false; } else { // get the child columns parent table var childTable = ChildColumn.ParentTable; // get query {Table(Developer).OrderBy(d => d.Name)} var query = ChildColumn.ParentTable.GetQuery(Column.Table.CreateContext()); // get list of values filtered by the parent's selected entity var itemlist = query.GetQueryFilteredByParent(ParentColumn, filterValue); // clear list controls items collection before adding new items listControl.Items.Clear(); // only add [Not Set] if in insert mode or column is not required if (Mode == DataBoundControlMode.Insert || !Column.IsRequired) listControl.Items.Add(new ListItem("[Not Set]", "")); // add returned values to list control foreach (var row in itemlist) listControl.Items.Add( new ListItem( childTable.GetDisplayString(row), childTable.GetPrimaryKeyString(row))); // make sure control is enabled listControl.Enabled = true; } }Something magical ... isn't it?
Carlos N. Porras
(El Slavador)
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Passing filter values among forms
Nov 23, 2012 03:55 AM|LINK
OK, then I'll submit your thread to Dynamic Data group or something related to that a senior group to handle this question:D
klca
Member
509 Points
421 Posts
Re: Passing filter values among forms
Nov 23, 2012 01:33 PM|LINK
Thanky you Mr.Dong,
How can this submission can be followed up so I can see results ...
I'm not complaining but asking, eager to get an answer
It should be good that my question doesn't go to the limbo waiting to be answered ... so, in a very good way, with hope and trust in the team you will submit this to: please answer, please provide a solution .... PLEASE !!!
Carlos N. Porras
(El Slavador)
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Passing filter values among forms
Nov 23, 2012 11:24 PM|LINK
With pleasure,and I've submitted your issue to our inner group,and maybe someone will help you with that. Maybe he/she will tell you detailed information or something to explain to you in details.
Reguards!