Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 325387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:12:44+00:00 2026-05-12T09:12:44+00:00

We’re using Infragistics UltraWinGrid as a base class for customized controls. One of the

  • 0

We’re using Infragistics UltraWinGrid as a base class for customized controls. One of the projects that will use this control to display search results has a requirement to display a user friendly message when no matches are located.

We’d like to encapsulate that functionality into the derived control – so no customization beyond setting the message to display is required by the programmer who uses the control. This would have to be done in generic fashion – one size fits all datasets.

Is there allowance in the UltraWinGrid for this type of usage already? If so, where would I find it hidden. 🙂

If this functionality needs to be coded, I can think of an algorithm which would add a blank record to whatever recordset was set and place that into the grid. In your opinion, is this the best way to handle the solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T09:12:44+00:00Added an answer on May 12, 2026 at 9:12 am

    I don’t know if this will help, but here’s to finishing up the thread. I didn’t find a built in way, so I solved this problem as follows: In my class which inherits UltraGrid

    Public Class MyGridPlain
    Inherits Infragistics.Win.UltraWinGrid.UltraGrid
    

    I added two properties, one to specify what the developer wants to say in the empty data case, and another to enable the developer to place their message where they want it

    Private mEmptyDataText As String = String.Empty
    Private mEmptyDataTextLocation As Point = New Point(30, 30)Public Shadows Property EmptyDataTextLocation() As Point
    Get
         Return mEmptyDataTextLocation
    End Get
    Set(ByVal value As Point)
        mEmptyDataTextLocation = value
        setEmptyMessageIfRequired()
    End Set
    End Property
    
    Public Shadows Property EmptyDataText() As String
    Get
       Return mEmptyDataText
    End Get
    Set(ByVal value As String)
      mEmptyDataText = value
      setEmptyMessageIfRequired()
    End Set
    End Property
    

    I added a method which will check for empty data and set the message if so. And another method which will remove the existing empty message.

        Private Sub setEmptyMessageIfRequired()
    
            removeExistingEmptyData()
    
            'if there are no rows, and if there is an EmptyDataText message, display it now.
            If EmptyDataText.Length > 0 AndAlso Rows.Count = 0 Then
                Dim lbl As Label = New Label(EmptyDataText)
                lbl.Name = "EmptyDataLabel"
                lbl.Size = New Size(Width, 25)
                lbl.Location = EmptyDataTextLocation
                ControlUIElement.Control.Controls.Add(lbl)
            End If
        End SubPrivate Sub removeExistingEmptyData()
           'any previous empty data messages?
           Dim lblempty() As Control = Controls.Find("EmptyDataLabel", True)
           If lblempty.Length > 0 Then
               Controls.Remove(lblempty(0))
           End If
    
       End Sub
    

    Last – I added a check for empty data to the grid’s InitializeLayout event.

    Private Sub grid_InitializeLayout(ByVal sender As Object, _
          ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) _
          Handles MyBase.InitializeLayout    
    
         setEmptyMessageIfRequired()
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I need a function that will clean a strings' special characters. I do NOT
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.