This is a migrated thread and some comments may be shown as answers.
Require a new column with edit button in it
3 Answers 29 Views
This is a migrated thread and some comments may be shown as answers.
Krishnan LN
Top achievements
Rank 1
Krishnan LN asked on 19 Feb 2010, 09:37 AM
Hi
I require a new column for edit link button in the self referencing radgrid. The edit button should not appear for the parent folder alone.

Krishnan

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 19 Feb 2010, 10:20 AM
Hi,

Please  try accessing the ExpandCollapse control in the ItemDataBound event  and check  if the button is visible and then hide the Edit button for that item as this will be the parent item.

You can access  the ExpandCollapse control and check its Visibility  as shown below:
((System.Web.UI.Control)(((System.Web.UI.WebControls.Button)(dataItem["ExpandColumn"].Controls[0])))).Visible


Thanks,
Shinu

0
Krishnan LN
Top achievements
Rank 1
answered on 19 Feb 2010, 11:28 AM
Hi shinu,
Thanks for your reply.

I still have the following issues

1)I have created a GridHyperLinkColumn column in radgrid. The first issue i have is it should be the last column in the grid but it is displaying as first column in the grid.

2) I need to change the default expand collapse button to plus/minus gif's

3) Im using a self referencing hierarchical grid. I have a columns called ID,Name,createdBy etc..The self referencing is done through the ID column. so the expand/collapse button is displayed for this column. Now i want to hide this ID column and show the expan/collapse button in the name column.


Regards,
Krishnan
0
Princy
Top achievements
Rank 1
answered on 20 Feb 2010, 07:50 AM
Hi,

You can use the SwapColumns method to change the position of the columns.
    RadGrid1.MasterTableView.SwapColumns(1, 2);
Also take a look at the link Reordering columns

You can set the CollaspeImageUrl and ExpandImageUrl as shown below to  customize the expand collapse column
 <ExpandCollapseColumn CollapseImageUrl="" ExpandImageUrl="" >
  </ExpandCollapseColumn>

Thanks,
Princy
Tags
Grid
Asked by
Krishnan LN
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Krishnan LN
Top achievements
Rank 1
Princy
Top achievements
Rank 1
Share this question
or