CodeSmith Community
Your Code. Your Way. Faster!

search section in the web admin control?

Latest post 01-25-2007 9:41 AM by mike123. 7 replies.
  • 01-17-2007 4:39 PM

    search section in the web admin control?

    Is the search section in the web admin control gone in the newest version? or I over looked something? I found it is VERY useful...

     
    Please help. Thanks.

     

    • Post Points: 5
  • 01-17-2007 4:53 PM In reply to

    Re: search section in the web admin control?

    found it. I need to add a data:GridViewSearchPanel in the page. Is there any way to set the config so it will automatically generated?

    • Post Points: 35
  • 01-17-2007 9:46 PM In reply to

    Re: search section in the web admin control?

    Mike would know better, but I don't believe there is an option for that.

    Robert Hinojosa
    -------------------------------------
    Member of the Codesmith Tools, .netTiers, teams
    http://www.nettiers.com
    -------------------------------------
    • Post Points: 60
  • 01-18-2007 9:19 AM In reply to

    • mike123
    • Top 10 Contributor
    • Joined on 02-25-2005
    • Toronto, Ontario
    • Posts 726
    • Points 16,910

    Re: search section in the web admin control?

    Nope, this option isn’t available. The configuration of this control is very easy though, all you have to do is to drop it on the page and specify what GridView to work with, like this:
    <data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1" />

    Previously you had to specify the BusinessEntityType, now it is not required.

    Mike Shatny
    --------------------------------------------------------------
    Member of the .netTiers team http://www.nettiers.com
    --------------------------------------------------------------

    Filed under:
    • Post Points: 5
  • 01-18-2007 1:39 PM In reply to

    • mike123
    • Top 10 Contributor
    • Joined on 02-25-2005
    • Toronto, Ontario
    • Posts 726
    • Points 16,910

    Re: search section in the web admin control?

    This control is now rendered automatically (rev. 468)

     

    Mike Shatny
    --------------------------------------------------------------
    Member of the .netTiers team http://www.nettiers.com
    --------------------------------------------------------------

    • Post Points: 35
  • 01-24-2007 10:56 PM In reply to

    Re: search section in the web admin control?

    is there any more detailed document about this new control?

    for example, if there are 10 fields in the table, and I only want 5 of them appear in the dropdownlist, is there any way to config this?

     

    Thanks!! 

    • Post Points: 65
  • 01-24-2007 11:08 PM In reply to

    Re: search section in the web admin control?

    Look at the create child controls method in GridViewSearchPanel.cs, it currently uses reflection to fill the columns, you can change that method to whatever you need it to do.


    On 1/24/07, chitrader <bounce-chitrader@codesmithsupport.com> wrote:

    is there any more detailed document about this new control?

    for example, if there are 10 fields in the table, and I only want 5 of them appear in the dropdownlist, is there any way to config this?

     

    Thanks!! 






    Robert Hinojosa
    -------------------------------------
    Member of the Codesmith Tools, .netTiers, teams
    http://www.nettiers.com
    -------------------------------------
    • Post Points: 5
  • 01-25-2007 9:41 AM In reply to

    • mike123
    • Top 10 Contributor
    • Joined on 02-25-2005
    • Toronto, Ontario
    • Posts 726
    • Points 16,910

    Re: search section in the web admin control?

    Another way  would be to remove the fields that are not required:

        protected void Page_Load(object sender, EventArgs e)
        {       
            RemoveFields(new string[] { "Field1", "Field2", "Field3" });
        }

        private void RemoveFields(string[] fields)
        {
            DropDownList cboFieldName = GridViewSearchPanel1.FindControl("cboFieldName") as DropDownList;

            foreach (string f in fields)
            {
                ListItem li = cboFieldName.Items.FindByText(f);
                if (li != null)
                {
                    cboFieldName.Items.Remove(li);
                }
            }
        }

    chitrader:

    is there any more detailed document about this new control?

    for example, if there are 10 fields in the table, and I only want 5 of them appear in the dropdownlist, is there any way to config this?

     

    Thanks!! 

    Mike Shatny
    --------------------------------------------------------------
    Member of the .netTiers team http://www.nettiers.com
    --------------------------------------------------------------

    • Post Points: 5
Page 1 of 1 (8 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems