Note that there are some explanatory texts on larger screens.

plurals
  1. POShowing empty record in RadGrid in C#
    text
    copied!<p>Friends I'm working with one level hierarchy grid. I'm doing code as below</p> <pre><code>protected DataSet GenerateRadGrid() { DataSet dsCollective = new DataSet(); DataSet dsFirst = Library.ExecuteTag("SelectEHRMessage"); if (dsFirst.HasRows()) { DataTable dt = new DataTable(); dt = dsFirst.Tables[0].Copy(); dt.TableName = "MainMessage"; dsCollective.Tables.Add(dt); foreach (DataRow row in dsCollective.Tables["MainMessage"].Rows) { var rootMessageID = row["MessageID"].ToFormatedInt64(); DataSet dsSecond = Library.ExecuteTag("SelectParentReply", new KeyValuePair&lt;string, object&gt;("@0", rootMessageID)); dsSecond.Tables[0].TableName = "MainReplies-" + rootMessageID; dsCollective.Tables.Add(dsSecond.Tables[0].Copy()); DataRelation mainMessageRepliesRelation = new DataRelation("MainMessageReplies-" + rootMessageID, dsCollective.Tables["MainMessage"].Columns["MessageID"], dsCollective.Tables["MainReplies-" + rootMessageID].Columns["MessageID"]); dsCollective.Relations.Add(mainMessageRepliesRelation); } } return dsCollective; } </code></pre> <p>that's the function that return me the dataset which I'm binding with the grid. Now the problem is that the grid show's me the empty record too. I mean in which the relation is not there. as below:</p> <p><img src="https://i.stack.imgur.com/2SbWZ.png" alt="enter image description here"></p> <p>now what i have to change in the code to avoid those "No child record to display" row. Is there any property that work for me? </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload