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

Problem with postback in GridTemplateColumns

3 Answers 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Leonardo Amorim de Barros
Top achievements
Rank 1
Leonardo Amorim de Barros asked on 02 Oct 2008, 05:43 PM
 The event OnTextChanged of the RadNumerickPicker don't call the method DayOfWeek_TextChanged on the server-side. May you help with any idea of what's the problem?

            <telerik:RadGrid ID="Grid" runat="server" Skin="Office2007" HeaderStyle-Font-Size="X-Small" FooterStyle-Font-Size="X-Small" 
            AutoGenerateColumns="False"  AllowPaging="false" AllowMultiRowSelection="True" OnNeedDataSource="Grid_NeedDataSource"  
            ShowGroupPanel="false" GridLines="None" ShowFooter="true" FooterStyle-BackColor="WhiteSmoke"  
            FooterStyle-Font-Bold="true" Width = "99%" EnableViewState="True" 
            FooterStyle-ForeColor="Black" OnItemDataBound="Grid_ItemDataBound"  
            OnItemCreated="Grid_ItemCreated" meta:resourceKey="GridResource1"
                <ClientSettings AllowColumnsReorder="false"  ReorderColumnsOnClient="false"
                    <Selecting AllowRowSelect="True"  /> 
                    <Resizing AllowColumnResize="false"  /> 
                    <Scrolling AllowScroll="false" UseStaticHeaders="true"  /> 
                </ClientSettings> 
                <MasterTableView TableLayout="Fixed" > 
                    <Columns>  
                        <telerik:GridClientSelectColumn UniqueName="colSel" Visible="true"
                            <HeaderStyle Width="30px" /> 
                            <ItemStyle Width="30px" /> 
                        </telerik:GridClientSelectColumn> 
                        <telerik:GridBoundColumn Visible="True" DataField="ProjectName" UniqueName="ProjectName" meta:resourceKey="colProjectName"
                            <HeaderStyle Font-Bold="true" Width="155px" />                                             
                            <ItemStyle Width="170px" /> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridTemplateColumn Visible="True" UniqueName="DayOfWeek1"
                            <HeaderStyle Width="70px" /> 
                            <ItemStyle Width="70px" /> 
                            <ItemTemplate> 
                                <telerik:RadNumericTextBox ID="ntbDayOfWeek1" runat="server" Skin="Office2007" Width="50px" 
                                    Font-Names="Verdana" Font-Size="X-Small" OnTextChanged="DayOfWeek_TextChanged" AutoPostBack="true"
                                </telerik:RadNumericTextBox> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                    </Columns> 
                </MasterTableView> 
            </telerik:RadGrid> 

3 Answers, 1 is accepted

Sort by
0
Leonardo Amorim de Barros
Top achievements
Rank 1
answered on 03 Oct 2008, 02:41 PM
Hi,

While waiting a response from telerik, I solve the problem.

After hours trying to solve the problem, I realize that the RadNumericTextBox was the problem. Some properties are "ignored" when inside of a GridTemplateColumn ItemTemplate tag. For example, I set the MaxValue e MinValue properties of the control, but in runtime and inside of the templatecolumn these settings didn't work. So, I give up of the RadNumericTextBox and put an ASP TextBox. Well, everything now works fine and I can call a server-side method.

Is really a RadNumericTextBox bug or is anything I did wrong?

Best regards.
0
Missing User
answered on 06 Oct 2008, 12:26 PM
Hi Carlos,


Please find the attached project based on your code which works as expected at our side. Could you please modify it so the problem to appear and send us steps to reproduce the issue?

Kind regards,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Leonardo Amorim de Barros
Top achievements
Rank 1
answered on 06 Oct 2008, 01:26 PM
Ok, I will do it on wednesday because I have to finish some work until tomorrow.

Kind regards.
Tags
Grid
Asked by
Leonardo Amorim de Barros
Top achievements
Rank 1
Answers by
Leonardo Amorim de Barros
Top achievements
Rank 1
Missing User
Share this question
or