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

RadGrid HeaderStyle-Width <HeaderStyle width:> problem

7 Answers 273 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 2
Bill asked on 03 Mar 2010, 07:18 PM
In using the grid via the designer, I'm having all of my header styles duplicated

IF I put HeaderStyle-Width="50px" in the column definition, the designer
puts a <HeaderStyle Width="50px" /> at the bottom of the column definition duplicating the first entry.

7 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 05 Mar 2010, 11:14 AM
Hi Bill,

Please find attached a simple working application which is working as expected. Check it out and let me know what differs in your case.

All the best,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Bill
Top achievements
Rank 2
answered on 05 Mar 2010, 05:25 PM

I put this in the file while in split mode:


                    <telerik:GridBoundColumn DataField="subjects_supervisor" HeaderText="Supervisor's Name" 
                        SortExpression="subjects_supervisor" UniqueName="subjects_supervisor" HeaderStyle-Width="125px" 
                        ItemStyle-Width="125px">  
                        <FilterTemplate> 
                            <telerik:RadComboBox ID="rcbSupervisors" runat="server" DataTextField="Subjects_supervisor" 
                                DataValueField="Subjects_supervisor" AllowCustomText="true" DataSourceID="sdsSupervisors" 
                                MarkFirstMatch="true" Width="125px" AppendDataBoundItems="true"   
                                SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("subjects_supervisor").CurrentFilterValue %>' 
                                OnClientSelectedIndexChanged="FilterOnSupervisorsName">  
                                <Items> 
                                    <telerik:RadComboBoxItem Text="All" /> 
                                </Items> 
                            </telerik:RadComboBox> 
                            <telerik:RadScriptBlock ID="rsb3" runat="server">  
 
                                <script type="text/javascript">  
                                    function FilterOnSupervisorsName(sender, args) {  
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");  
                                        tableView.filter("subjects_supervisor", args.get_item().get_value(), "EqualTo");  
                                    }  
                                </script> 
 
                            </telerik:RadScriptBlock> 
                        </FilterTemplate> 
                    </telerik:GridBoundColumn> 
When I click on "Design view is out of sync with Source view. Click here to synchronize views."  I end up with this:

                    <telerik:GridBoundColumn DataField="subjects_supervisor" HeaderText="Supervisor's Name" 
                        SortExpression="subjects_supervisor" UniqueName="subjects_supervisor" HeaderStyle-Width="125px" 
                        ItemStyle-Width="125px">  
                        <FilterTemplate> 
                            <telerik:RadComboBox ID="rcbSupervisors" runat="server" DataTextField="Subjects_supervisor" 
                                DataValueField="Subjects_supervisor" AllowCustomText="true" DataSourceID="sdsSupervisors" 
                                MarkFirstMatch="true" Width="125px" AppendDataBoundItems="true"   
                                SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("subjects_supervisor").CurrentFilterValue %>' 
                                OnClientSelectedIndexChanged="FilterOnSupervisorsName">  
                                <Items> 
                                    <telerik:RadComboBoxItem Text="All" /> 
                                </Items> 
                            </telerik:RadComboBox> 
                            <telerik:RadScriptBlock ID="rsb3" runat="server">  
 
                                <script type="text/javascript">  
                                    function FilterOnSupervisorsName(sender, args) {  
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");  
                                        tableView.filter("subjects_supervisor", args.get_item().get_value(), "EqualTo");  
                                    }  
                                </script> 
 
                            </telerik:RadScriptBlock> 
                        </FilterTemplate> 
<HeaderStyle Width="125px"></HeaderStyle> 
 
 
<ItemStyle Width="125px"></ItemStyle> 
                    </telerik:GridBoundColumn> 
 
 
0
Bill
Top achievements
Rank 2
answered on 05 Mar 2010, 05:39 PM
I'm using ver: 2009.3.1314.35.

It doesn't happen every time, and I haven't been able to find the exact sequence of steps that causes it.
0
Bill
Top achievements
Rank 2
answered on 09 Mar 2010, 02:18 AM
The problem happens when I add new columns to an existing grid.
0
Pavlina
Telerik team
answered on 09 Mar 2010, 04:51 PM
Hello Bill,

Will it be convenient for you to prepare a short video(you can use Jing) which illustrates what you observed on your machine.

Greetings,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Bill
Top achievements
Rank 2
answered on 17 Mar 2010, 07:00 PM
I'll have to set up to do it from home - they're picky about what they'll let me install on my machine at work.
0
Pavlina
Telerik team
answered on 18 Mar 2010, 04:57 PM
Hi Bill,

The described problem is  very strange. We have not encountered it so far and we are not sure what could be the reason for experiencing the problem. Therefore we are looking forward to receiving a working project / live URL where we can reproduce the described issue.

Kind regards,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Bill
Top achievements
Rank 2
Answers by
Pavlina
Telerik team
Bill
Top achievements
Rank 2
Share this question
or