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”/> In Progress
<img src=”..\..\Images\Networks.Job.PastDue.png”/> New
<img src=”..\..\Images\Networks.Job.InProgress.png”/> New
<img src=”..\..\Images\Networks.Job. InProgress.png”/> In Progress
<img src=”..\..\Images\Networks.Job.Complete.png”/> Completed
<img src=”..\..\Images\Networks.Job.Complete.png”/> Not Applicable
(Please Note the COLORS are: PastDue.png is RED; InProgress.png is YELLOW; Complete.png is GREEN)
Thanks in advance.
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!
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.
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");
}
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?