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

[Solved] customizing popup in radgrid.

3 Answers 146 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Narendra
Top achievements
Rank 2
Narendra asked on 12 Jun 2008, 06:21 AM
Hi there,

    Can anyone tell that... can we customizi the popup edit box for updating.

for example....
In grid i am showing 5 columns say.. ID,Name, address, Phone and email.
By clicking on edit..
a popup come showing only Name and address columns....where we can update...

Plz  help me.....

thanks in advance....

Regards,
Bobby

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 Jun 2008, 07:06 AM
Hi Narendra,

Try setting the ReadOnly property for the column which you do not want to show up in the EditForm to true.

ASPX:
 <telerik:GridBoundColumn DataField="Phone " HeaderText="Phone " UniqueName="Phone " ReadOnly="True" > 
        </telerik:GridBoundColumn> 

Thanks
Princy.
0
Narendra
Top achievements
Rank 2
answered on 12 Jun 2008, 12:20 PM

Hi Princy,

    Thanks for your valuable suggestion..
    But the problem is i am binding data to gird in the below format. then how can i change the things....
    If there is some other option please give the code......
The way i am binding data to grid is below.........

<

telerik:RadGrid ID="RadGrid6" AutoGenerateEditColumn="True" runat="server" AllowAutomaticDeletes="True"

AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowPaging="True"

AllowSorting="True" Skin="Hay" GridLines="None">

<PagerStyle Mode="NextPrevAndNumeric" />

<MasterTableView EditMode="PopUp" CommandItemDisplay="Top">

<RowIndicatorColumn Visible="False">

<HeaderStyle Width="20px"></HeaderStyle>

</RowIndicatorColumn>

<ExpandCollapseColumn Visible="False" Resizable="False">

<HeaderStyle Width="20px"></HeaderStyle>

</ExpandCollapseColumn>

<EditFormSettings CaptionFormatString="Edit ProductID: {0}" CaptionDataField="AddressTypeID" />

</MasterTableView>

</telerik:RadGrid>


Thanks & Regards,
Bobby

0
Princy
Top achievements
Rank 2
answered on 13 Jun 2008, 07:51 AM
Hi Bobby,

Are you having AutoGeneratedColumns in your Grid? Try with the following code snippet.

CS:
 
    protected void RadGrid2_ColumnCreated(object sender, GridColumnCreatedEventArgs e)  
    {  
        if (e.Column is GridBoundColumn)  
        {  
            GridBoundColumn col = (GridBoundColumn)e.Column;  
            if (col.UniqueName == "ProductName")  
            {  
                col.ReadOnly = true;  
            }  
        }  
    } 


Thanks
Princy.
Tags
Grid
Asked by
Narendra
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Narendra
Top achievements
Rank 2
Share this question
or