Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

Webgrid Dropdown

Last post 09-08-2008 8:42 by ATMK1. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-02-2008 12:57

    • ATMK1
    • Not Ranked
    • Joined on 08-29-2008
    • Points 45

    Webgrid Dropdown

    I have AllowRowFiltering turned on my grid. The dropdown looks fine for the first two columns as a single item shows up in the dropdown such as the Job No. or Completion Date from SharePoint.

     

    My problem is the third column which has a combination of ‘colored icon + status’ as the data that it is pulling from SharePoint. Is there a way of manipulating that dropdown so that the dropdown in the third column shows just the status (New/In Progress/Completed/Not Applicable) part?

     

    This is what my dropdown shows currently in the third column:

     

    <img src=”..\..\Images\Networks.Job.PastDue.png”/>&nbsp;In Progress

     

    <img src=”..\..\Images\Networks.Job.PastDue.png”/>&nbsp;New

     

    <img src=”..\..\Images\Networks.Job.InProgress.png”/>&nbsp;New

     

    <img src=”..\..\Images\Networks.Job. InProgress.png”/>&nbsp;In Progress

     

    <img src=”..\..\Images\Networks.Job.Complete.png”/>&nbsp;Completed

     

    <img src=”..\..\Images\Networks.Job.Complete.png”/>&nbsp;Not Applicable

     

    (Please Note the COLORS are: PastDue.png is RED; InProgress.png is YELLOW;  Complete.png is GREEN)

     

    Thanks in advance.

    Filed under: ,
    • Post Points: 20
  • 09-05-2008 4:10 In reply to

    Re: Webgrid Dropdown

    Hello,

    I am not sure I understand the scenario, but are you trying to have the third filter dropdown display both image and text at once? Maybe you can embedding HTML directly in the FilterCollectionValue collection of the respective column, for example:

    column.FilterCollectionValues.Add("someValue","<img src='someImage.gif' /> New text");

    Is this what you are looking for, or I am missing something?

    Best Regards,
    Rumen Stankov (MCSD.NET)
    The Infragistics ASP.NET Team
    • Post Points: 20
  • 09-05-2008 11:45 In reply to

    • ATMK1
    • Not Ranked
    • Joined on 08-29-2008
    • Points 45

    Re: Webgrid Dropdown

    I changed my code as follows but the column still shows up as before (i.e., no change in the dropdown in column[5]) and no errors.

    Thanks!

    protected void NotamStatusDetails_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e)

    {

    e.Layout.Bands[0].FilterOptions.AllowRowFiltering = Infragistics.WebUI.UltraWebGrid.RowFiltering.OnServer;

    e.Layout.Bands[0].Columns[1].AllowRowFiltering = false;

    e.Layout.Bands[0].Columns[3].AllowRowFiltering = false;

    e.Layout.Bands[0].Columns[4].AllowRowFiltering = false;

    e.Layout.Bands[0].Columns[6].AllowRowFiltering = false;

    e.Layout.Bands[0].Columns[5].FilterCollectionValues.Add("In Progress","<img src='Networks.Job.PastDue.png'/> In Progress");

    e.Layout.Bands[0].Columns[5].FilterCollectionValues.Add("New","<img src='Networks.Job.PastDue.png'/> New");

    e.Layout.Bands[0].Columns[5].FilterCollectionValues.Add("In Progress","<img src='Networks.Job.InProgress.png'/> In Progress");

    e.Layout.Bands[0].Columns[5].FilterCollectionValues.Add("New","<img src='Networks.Job.InProgress.png'/> New");

    e.Layout.Bands[0].Columns[5].FilterCollectionValues.Add("Completed","<img src='Networks.Job.Complete.png'/> Completed");

    e.Layout.Bands[0].Columns[5].FilterCollectionValues.Add("Not Applicable","<img src='Networks.Job.Complete.png'/> Not Applicable");

    }

    • Post Points: 20
  • 09-08-2008 3:33 In reply to

    Re: Webgrid Dropdown

    Weird, I tried the same code and the new options showed for me successfully, however it seems that HTML directly in Text is not supported (text is Html Encoded and you will see the actual markup, not the image and then text).

    As far as I can tell it is not possible to have custom template with custom filter options, just text. Maybe you request that feature for future releases of the product via this lnk:

    http://devcenter.infragistics.com/Protected/RequestFeature.aspx 

    PM regularly scans through the list of features requested and much of our TODO list is taken from there.

    Best Regards,
    Rumen Stankov (MCSD.NET)
    The Infragistics ASP.NET Team
    • Post Points: 20
  • 09-08-2008 8:42 In reply to

    • ATMK1
    • Not Ranked
    • Joined on 08-29-2008
    • Points 45

    Re: Webgrid Dropdown

    Thanks. I'll submit a feature request as per your suggestion. In the meantime, can I just show the following options in text:

    In Progress

    New

    Completed

    Not Applicable

    Will the grid filter and show the appropriate results?

    Thanks again! 

     

    • Post Points: 5
Page 1 of 1 (5 items)
Powered by Community Server (Commercial Edition), by Telligent Systems