Hi,
I have some column in gridview with a picture and text
I want to hide the text in gridview, just have the picture
Actually, I use the event customdisplaytext and do e.displaytext=""
But with this method, when I use the autofilter, I have no value for schoosing.
There is another way to hide text but have it in the autofilter ?
Thanks
Sylo
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hello,
Thank you for your message. Did you by any chance check whether the row handle is actually GridControl.AutoFilterRowHandle?
static void gridView_CustomColumnDisplayText(object sender, CustomColumnDisplayTextEventArgs e) { if (e.RowHandle != GridControl.InvalidRowHandle) { e.DisplayText = string.Empty; } }
Thanks,
Dennis
Hi Dennis,
I don't understand your manipulation
With your proposition, I have the same result than before
The value for filter is empty
Thanks
Sylo
Hello,
I apologize for my mistake. I meant to say the GridControl.InvalidRowHandle instead of the GridControl.AutoFilterRowHandle row above:
static void gridView1_CustomColumnDisplayText(object sender, CustomColumnDisplayTextEventArgs e) { if (e.RowHandle != GridControl.InvalidRowHandle && e.Column.FieldName == "Price") { e.DisplayText = string.Empty; } }
See also the attached screenshot. The above code works because for filter drop downs the event's RowHandle and ListSourceRowIndex parameters return invalid values.
Please let me know in case of any further difficulties.
Thanks,
Dennis
very well
thanks