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

radgrid without edit option

3 Answers 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Venkatesh
Top achievements
Rank 1
Venkatesh asked on 16 Jan 2013, 11:50 AM
Hi,
Is it possible to have the radgrid in which there is no edit button.
Even if the existing rows are modified, the changed row is inserted.. How to achieve this?

Thanks

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Jan 2013, 12:02 PM
Hi,

One suggestion is that you can use Batch Server Update to achieve your scenario.

Regards,
Princy.
0
Venkatesh
Top achievements
Rank 1
answered on 16 Jan 2013, 01:21 PM
Hi Princy,
The scenario what i have is : on the page load, i am binding 5 empty rows to the radgrid. In the radgrid pre-render, i have set the IsItemInserted to true.

For the above rows, i dont want the edit pen icon, since for the user it is a Insert.

Thanks
0
Princy
Top achievements
Rank 2
answered on 17 Jan 2013, 09:44 AM
Hi,

Try the following code to achieve your scenario.
C#:
protected void RadGrid2_ItemDataBound(object sender, GridItemEventArgs e)
{
   if (e.Item is GridDataItem)
    {
        GridDataItem item = (GridDataItem)e.Item;
        if (item.ItemIndex<5)
        {
            ImageButton btn = (ImageButton)item["Uniquename"].Controls[0];
            btn.Visible = false;
        }
     }
}

Thanks,
Princy
Tags
Grid
Asked by
Venkatesh
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Venkatesh
Top achievements
Rank 1
Share this question
or