This is a migrated thread and some comments may be shown as answers.

Displaying blank grid

1 Answer 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
VIJAY
Top achievements
Rank 1
VIJAY asked on 15 May 2012, 03:04 PM
I have used Hierarichal radgrid. In that  i have to display empty according to a condition.

Have used below code on page load event:
 if (PrimaryID > 0)
                    {
                        PopulateData();
                        //data will be populated
                        AttributeNameGridBind();
                      
                    }
                    else
                    {
                        this.rgdLabTest.MasterTableView.NoMasterRecordsText = Utility.ContentFetcher.GetResourceContent("RES_035", BOL.Classes.EHRSessions.Culture);
                    }

But grid is showing as solidline istead of no record to dispay message.
Can anyone suggest something.

I want the message from codebehind.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 May 2012, 08:35 AM
Hi Vijay,

I tried the same scenario and I could show 'No records to display' when I bound the Radgrid with an empty data source in the else condition.

C#:
if (PrimaryID > 0)
 {
      PopulateData();
     //data will be populated
      AttributeNameGridBind();
 }
else
 {
     rgdLabTest.DataSource = new int[] { };
     this.rgdLabTest.MasterTableView.NoMasterRecordsText = Utility.ContentFetcher.GetResourceContent("RES_035", BOL.Classes.EHRSessions.Culture);
 }

Thanks,
Shinu.
Tags
Grid
Asked by
VIJAY
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or