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

RadTreeListView CopyingCellClipboardContent

0 Answers 22 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gopala
Top achievements
Rank 1
Gopala asked on 21 Oct 2011, 10:30 PM
Hi,

I am working on copying content RadTreeListView into Excel sheet. I have a problem.

Let me explain my problem.

I have three RadTreeListView columns.

If I click on first column header then two more columns expands out from this first column and again when I click they collapse into first column.

So when I open all columns ( 5 columns ) and do copy and paste into excel everything is fine.

Now, when I collapse the inner columns of my first columns, then copy and paste I am having a problem.

I am expecting to have only 3 columns in my excel sheet

but I am getting five columns in my excel sheet

First Column has data
Second Column is empty
Third Column is empty
Fourth Column has data
Fifth Column has data

I am using below code
  private void radTreeListView1_CopyingCellClipboardContent(object sender, GridViewCellClipboardEventArgs e)
    {
      if (e.Value == null) return;

      if (e.Cell.Column.IsVisible == false)
      {
       // e.Value = string.Empty;
        return;
      }

      double result;
      if (double.TryParse(e.Value.ToString(), out result))
      {
        if (result == AttribAlphaData.NoAttribData)
          e.Value = e.Cell.Item is AttribEmptyNode ? string.Empty : "--";
      }
    }

    #endregion

  }

Please help me anyone it is kinda urgent...
 

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Gopala
Top achievements
Rank 1
Share this question
or