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

[Solved] VerticalAlign attribute from MasterTableView only apply to alternate rows?

2 Answers 223 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mqsash
Top achievements
Rank 1
mqsash asked on 26 Mar 2013, 06:00 PM
Hi

I'm using telerik.web.ui version 2013.1.220.35 and was wondering if the following is a known bug.
On a radgrid when I apply an "ItemStyle-VerticalAlign" property in the MasterTableView, instead of in the individual columns, then (at least for) the GridEditCommandColumn and GridDropDownColumn, the style gets applied to every alternate row only.

For the skeletal mark up listed below, notice that the MasterTableView defines ItemStyle-VerticalAlign="Top".
See attached screenshot for this markup. you will see that the Edit Image and the text in the "Type"  column is "Top" aligned only on alternate rows. To make these values Top aligned on every row, I need to specify the ItemStyle-VerticalAlign on each column.

So I was wondering if 
a - This is a known issue with specifying  ItemStyle-VerticalAlign in the MasterTableView
b - There is a way so that I can specify this value in a single place on the radgrid so that it correctly applies to all columns.

<telerik:RadGrid
    ID="NotesGrid"
    runat="server"
    DataSourceID="sqlGetNotes">
 
    <MasterTableView
      ItemStyle-VerticalAlign="Top ">
 
      <Columns>
 
        <telerik:GridEditCommandColumn
          ButtonType="ImageButton"
          UniqueName="EditCommandColumn"
          HeaderText="Edit"
          HeaderTooltip="Edit Note"
          HeaderStyle-width="80px"
          HeaderStyle-HorizontalAlign="Center"
          ItemStyle-HorizontalAlign="Center"
          ItemStyle-CssClass="MyImageButton" />
 
        <telerik:GridDropDownColumn
          UniqueName="Note_Type"
          DataField="Note_Type"
          HeaderText="Type"
          DataSourceID="sqlNoteTypesLookupList"
          ListValueField="Note_Type"
          ListTextField="Note_Type"
          DropDownControlType="RadComboBox"  />
 
      </Columns>
    </MasterTableView>
  </telerik:RadGrid>


Thanks

2 Answers, 1 is accepted

Sort by
0
mqsash
Top achievements
Rank 1
answered on 28 Mar 2013, 05:01 PM
Can someone at telerik comment on this issue please?
0
Galin
Telerik team
answered on 30 Mar 2013, 11:36 AM
Hi,

I have tried setting the property ItemStyle-VerticalAlign to top and it works as expected. In case you want to add styles for every row you should use the property AlternatingItemStyle as well.

I hope this helps.

Kind regards,
Galin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
mqsash
Top achievements
Rank 1
Answers by
mqsash
Top achievements
Rank 1
Galin
Telerik team
Share this question
or