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

RadGridLocalizer & EditFormSettings & Ajax

4 Answers 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jean-Yves
Top achievements
Rank 1
Jean-Yves asked on 25 May 2009, 06:31 PM
Hi,

I find something, maybe you can help me. 

Il my Page_Load I put : 
RadGridFacturatio.MasterTableView.EditFormSettings.EditColumn.ButtonType = GridButtonColumnType.ImageButton;

In the aspx page I put : 
 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGridFacturatio">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridFacturatio" LoadingPanelID="RadAjaxLoadingPanel"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
       </AjaxSettings>
</telerik:RadAjaxManager>

And when I Insert or update I have this error : 
'Erreur d'exécution Microsoft JScript: Sys.WebForms.PageRequestManagerServerErrorException: Une erreur s'est produite, car un contrôle avec l'id 'ctl00$body$RadGridFacturation$ctl00$ctl02$ctl02$PerformInsertButton' n'a pas été trouvé ou un autre contrôle est assigné au même ID après la publication. Si l'ID n'est pas assigné, définissez explicitement la propriété ID des contrôles qui déclenchent les événements de publication pour éviter cette erreur.'
This, mean that there is 2 controls with the same ID.

But, when I put : 
<EditFormSettings>
     <EditColumn ButtonType="ImageButton"></EditColumn>
</EditFormSettings>

and comment : 
//RadGridFacturatio.MasterTableView.EditFormSettings.EditColumn.ButtonType = GridButtonColumnType.ImageButton;

It work very well !
Do you have an idea ?


Thank

Jean-Yves

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 26 May 2009, 04:10 AM
HI Jean,

This error can come if you have set the same UniqueName for more than one column. Can you check your aspx code and see whether you have set the same UniqueName for more than one column. Also try sending your entire aspx code.

Shinu
0
Jean-Yves
Top achievements
Rank 1
answered on 26 May 2009, 07:57 AM
Hi,

Thank you for your help.
In fact I don't put UniqueName on my Edit Columns, so may be it's this because I have :
<telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton"  Text="<%$ Resources:RadGrid, SupprimerText %>">     </telerik:GridButtonColumn>

AND

<telerik:GridEditCommandColumn ButtonType="ImageButton" EditText="<%$ Resources:RadGrid, EditText %>">
                                </telerik:GridEditCommandColumn>

Without UniqueName.
I'll try in few hours... if it work.
0
Jean-Yves
Top achievements
Rank 1
answered on 26 May 2009, 04:34 PM
Hi,

I put a UniqueName as you sayed but it don't work.

So, I put : 
protected void Page_Load(object sender, EventArgs e)
{
            radGrid.MasterTableView.EditFormSettings.EditColumn.ButtonType = GridButtonColumnType.ImageButton;
}

And I have : 
<telerik:RadGrid ID="RadGridFacturation" runat="server" 
                    DataSourceID="LinqDataSourceFacturation" AllowSorting="True" 
                    GridLines="None" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true">
                    <MasterTableView DataSourceID="LinqDataSourceFacturation" AutoGenerateColumns="False" 
                        DataKeyNames="IdFacturation" CommandItemDisplay="Top">
                        <Columns>
                            <telerik:GridButtonColumn UniqueName="CmdDelete" CommandName="Delete" ButtonType="ImageButton"  Text="<%$ Resources:RadGrid, SupprimerText %>">
                            </telerik:GridButtonColumn>
                            <telerik:GridBoundColumn DataField="IdFacturation" DataType="System.Int32" 
                                HeaderText="IdFacturation" ReadOnly="True" SortExpression="IdFacturation" 
                                UniqueName="IdFacturation" Visible="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="IdAvenant" DataType="System.Int32" 
                                HeaderText="IdAvenant" SortExpression="IdAvenant" UniqueName="IdAvenant" Visible="false" ReadOnly="true">
                            </telerik:GridBoundColumn>
                            <telerik:GridDropDownColumn HeaderText="Code terme" DataSourceID="LinqDataSourceCodeTerme" DropDownControlType="RadComboBox" 
                                ListTextField="Libelle" ListValueField="Code" DataField="CodeTerme">
                            </telerik:GridDropDownColumn>
                            <telerik:GridBoundColumn DataField="Commentaire" HeaderText="Commentaire" 
                                SortExpression="Commentaire" UniqueName="Commentaire">
                            </telerik:GridBoundColumn>
                            <telerik:GridNumericColumn DataField="MontantTerme" DataType="System.Decimal" 
                                HeaderText="Montant" SortExpression="MontantTerme" NumericType="Currency" 
                                UniqueName="MontantTerme" HeaderStyle-Width="90px">
                            </telerik:GridNumericColumn>
                            <telerik:GridDateTimeColumn DataField="DateFacturationPrevisionnelle" 
                                DataType="System.DateTime" HeaderText="Date de facturation previsionnelle" 
                                SortExpression="DateFacturationPrevisionnelle" 
                                UniqueName="DateFacturationPrevisionnelle"
                                DataFormatString="{0:dd/MM/yyyy}">
                            </telerik:GridDateTimeColumn>
                            <telerik:GridDateTimeColumn DataField="DateFacturation" DataType="System.DateTime" 
                                HeaderText="Date de facturation" SortExpression="DateFacturation" 
                                UniqueName="DateFacturation"
                                DataFormatString="{0:dd/MM/yyyy}">
                            </telerik:GridDateTimeColumn>
                            <telerik:GridDateTimeColumn DataField="DatePaiementPrevisionnelle" 
                                DataType="System.DateTime" HeaderText="Date de paiement previsionnelle" 
                                SortExpression="DatePaiementPrevisionnelle" 
                                UniqueName="DatePaiementPrevisionnelle"
                                DataFormatString="{0:dd/MM/yyyy}">
                            </telerik:GridDateTimeColumn>
                            <telerik:GridDateTimeColumn DataField="DatePaiement" DataType="System.DateTime" 
                                HeaderText="Date de paiement" SortExpression="DatePaiement" 
                                UniqueName="DatePaiement"
                                DataFormatString="{0:dd/MM/yyyy}">
                            </telerik:GridDateTimeColumn>
                            <telerik:GridCheckBoxColumn DataField="IsTVATerme" DataType="System.Boolean" 
                                HeaderText="TVA" SortExpression="IsTVATerme" UniqueName="IsTVATerme">
                            </telerik:GridCheckBoxColumn>
                            <telerik:GridEditCommandColumn UniqueName="CmdEdit" ButtonType="ImageButton" EditText="<%$ Resources:RadGrid, EditText %>">
                            </telerik:GridEditCommandColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>

This don't work. I have the same error message.
0
Sebastian
Telerik team
answered on 29 May 2009, 10:35 AM
Hello Jean-Yves,

This is indeed a strange issue and unfortunately I am not able to determine the exact cause of it from the provided details. Can you please verify that the viewstate of the grid/page is not disabled and you use the latest release 2009.1.527 of the product?

If the issue persists, the best means to progress in our investigation is to send a working subset of your project attached to a formal support ticket. We will examine your complete code logic in detail and will get back to you with more info on the subject.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Jean-Yves
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Jean-Yves
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or