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...
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...