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

[Solved] Need help with Radgrid edit Template column

1 Answer 198 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sai raghavendra sudha besta
Top achievements
Rank 1
sai raghavendra sudha besta asked on 18 Sep 2009, 02:37 PM
Hi ,
i am stuck with a problem in radgrid.

i have a radgrid -- which has an edittemplate column and selectcolumn...
we are using a webusercontrol, in the edit template column and we are binding the data using the eval method.

the problem i am facing is, i am not able to find any events by which i can close the edit template, for this action, either i need to do a post back and then refresh the whole grid.

also when some one checks the row ( as we are using a check box for select column of the grid) the values in that particular row disappear, when we check the check box while the edit control is still visible.

<telerik:RadGrid ID="rgCampaignList" EnableViewState="true" Height="100%" GridLines = "none"
                    runat="server" AllowSorting="true" AllowMultiRowSelection="True" AllowAutomaticDeletes="true"
                    CssClass="GridMedium" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"
                    AllowPaging="True"
                    AllowFilteringByColumn="true" AutoGenerateColumns="false">
                    <HeaderContextMenu BackColor="White">
                    </HeaderContextMenu>
                    <HeaderStyle Font-Bold = "true" Wrap = "true" />
                    <PagerStyle AlwaysVisible = "true" Visible = "true" Position = "topAndBottom" />
                    <MasterTableView GridLines = "none" EnableViewState="true" Height="100%" EditMode="EditForms"
                        runat="server">
                      <PagerStyle AlwaysVisible = "true" Visible = "true" Position = "topAndBottom" />
                        <Columns>
                            <telerik:GridClientSelectColumn UniqueName="campapignsSelectColumn" HeaderText="Actions"
                                HeaderStyle-Width="20" Reorderable="false" />
                            <telerik:GridEditCommandColumn HeaderText="Edit" ButtonType="LinkButton" UniqueName="EditCommandColumn"
                                EditFormHeaderTextFormat="Edit Campaign" Reorderable="false">
                            </telerik:GridEditCommandColumn>
                            <telerik:GridTemplateColumn DataType="System.String" DataField="CampaignName" UniqueName="CampaignName"
                                SortExpression="CampaignName" HeaderText="Campaign" >
                                <ItemTemplate>
                                    <asp:LinkButton ID="btnCampaignName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "CampaignName") %>'
                                        CommandName="SelectCampaign" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            ............................................................................................................................................
                           ..............................................................................................................................................
                           </Columns>
                        <EditFormSettings FormMainTableStyle-BackColor="#FFFFE0" FormStyle-Height="100%"
                            FormStyle-Width="100%" FormCaptionStyle-Height="100%" EditColumn-Resizable="true"
                            UserControlName="../usercontrols/Campaigns_Edit.ascx" EditFormType="WebUserControl">
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                    <ClientSettings AllowColumnsReorder="true" ColumnsReorderMethod="reorder">
                        <DataBinding FilterParameterName="campaignname" FilterParameterType="String">
                        </DataBinding>
                        <ClientEvents />
                        <Selecting EnableDragToSelectRows="true" AllowRowSelect="True"></Selecting>
                    </ClientSettings>
                    <AlternatingItemStyle CssClass="GridMediumAlternate" />
                    <SelectedItemStyle CssClass="GridMediumSelected" />
                </telerik:RadGrid>


 please help me out on this one as i am stuck with this one and my deadline is approaching.

thank you very much for your help.








1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 21 Sep 2009, 08:14 AM
Hello,

Please refer to the following topics which discuss in detail how to update/insert records using WebUserControl custom edit form:
User Control Edit Form
Updating values using UserControl/FormTemplate

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
sai raghavendra sudha besta
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or