Hi
I need to set the vertical alignment of the hirarchy grid image that shows when we make hierarchy grid, i have big data in its corresponding columns so the image is displayed vertical align middle but i want to show it at top, please help me how can i do this?
Thanks
Regards
Muzaffar Ali
I need to set the vertical alignment of the hirarchy grid image that shows when we make hierarchy grid, i have big data in its corresponding columns so the image is displayed vertical align middle but i want to show it at top, please help me how can i do this?
Thanks
Regards
Muzaffar Ali
6 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 18 Sep 2009, 04:50 AM
Hi Muzaffar,
Try setting the vertical alignment of the Expand/Collapse column in the PreRender event of the Grid and see whether it meets your requirement.
CS:
Regards
Shinu
Try setting the vertical alignment of the Expand/Collapse column in the PreRender event of the Grid and see whether it meets your requirement.
CS:
protected void RadGrid1_PreRender(object sender, EventArgs e) |
{ |
RadGrid1.MasterTableView.GetColumn("ExpandColumn").ItemStyle.VerticalAlign = VerticalAlign.Top; |
} |
Regards
Shinu
0

Muzaffar
Top achievements
Rank 1
answered on 18 Sep 2009, 05:31 AM
Its not working i have tried i also tried this one rgGoals.MasterTableView.DetailTables[0].GetColumn("ExpandColumn").ItemStyle.VerticalAlign = VerticalAlign.Top;
but its not working working too actually i have 4 grids in hierarchy and i want all of their group images to be top aligned
Regards
Muzaffar Ali
but its not working working too actually i have 4 grids in hierarchy and i want all of their group images to be top aligned
Regards
Muzaffar Ali
0

Shinu
Top achievements
Rank 2
answered on 18 Sep 2009, 05:35 AM
Hi Muzaffar,
Did the above given code work for the Master table(first level)? It would be nice if you could send the aspx code because the above given code worked perfectly on my end.
Shinu
Did the above given code work for the Master table(first level)? It would be nice if you could send the aspx code because the above given code worked perfectly on my end.
Shinu
0

Muzaffar
Top achievements
Rank 1
answered on 18 Sep 2009, 05:49 AM
Hi Shinu thnx for quick reply sorry about the confusion it is working on outer grid but text was short i could not test properly now please tell me how can it be done on its inner grids sending the html as sample
<telerik:RadGrid ID="rgGoals" runat="server" OnItemDataBound="rgGoals_ItemDataBound"
OnInsertCommand="rgGoals_InsertCommand" OnUpdateCommand="rgGoals_UpdateCommand"
OnDeleteCommand="rgGoals_DeleteCommand" OnItemCommand="rgGoals_ItemCommand" AllowAutomaticDeletes="True"
ShowStatusBar="True" Width="100%" AutoGenerateColumns="False" PageSize="20" AllowPaging="True"
GridLines="None" Skin="Vista" OnDetailTableDataBind="rgGoals_DetailTableDataBind" OnPreRender="rgGoals_PreRender">
<PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
<MasterTableView Name="Goal" GridLines="None" HierarchyLoadMode="ServerBind" DataKeyNames="Year,SCDS,GoalID">
<Columns>
<telerik:GridBoundColumn UniqueName="Description" HeaderText="Goal" DataField="ShortDescription">
<HeaderStyle Font-Bold="True" />
<ItemStyle Width="500px" HorizontalAlign="Left" VerticalAlign="Top" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="DateCreated" HeaderText="Date Created" DataField="DateCreated"
DataType="System.DateTime" DataFormatString="{0:M/dd/yyyy}" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<ItemStyle Width="100px" />
<HeaderStyle Font-Bold="True" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="DateModified" HeaderText="Date Modified" DataField="LastModified"
DataFormatString="{0:M/dd/yyyy}" DataType="System.DateTime" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<ItemStyle Width="100px" />
<HeaderStyle Font-Bold="True" />
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table>
<tr>
<td>
<strong>Goal</strong></td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td colspan="3">
<asp:TextBox ID="txtShortDescription" runat="server" Text='<%# Bind( "ShortDescription" ) %>'
Width="750px" Height="70px" TextMode="MultiLine" BackColor="LightYellow"></asp:TextBox>
<br />
<asp:RequiredFieldValidator ID="rvGoalAlready" runat="server" ErrorMessage="* Goal already exists"
ControlToValidate="txtShortDescription" EnableClientScript="False" ValidationGroup="Desc"
Style="white-space: nowrap"></asp:RequiredFieldValidator><br />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtShortDescription"
Style="white-space: nowrap" ErrorMessage="* Goal Description is required" ValidationGroup="Desc"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td>
</td>
<td colspan="2">
</td>
</tr>
</table>
</FormTemplate>
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
</EditFormSettings>
<DetailTables>
<telerik:GridTableView runat="server" Name="Objective" HierarchyLoadMode="ServerBind"
DataKeyNames="ObjectiveID" NoDetailRecordsText="No records to display." Width="100%">
<DetailTables>
<telerik:GridTableView AllowCustomPaging="false" AllowPaging="false" runat="server"
Name="Strategy" HierarchyLoadMode="ServerBind" DataKeyNames="StrategyID,ObjectiveID"
CommandItemDisplay="Top" NoDetailRecordsText="No records to display." Width="100%">
<DetailTables>
<telerik:GridTableView AllowCustomPaging="false" AllowPaging="false" runat="server"
Name="Action" HierarchyLoadMode="ServerBind" DataKeyNames="ActionID,StrategyID"
CommandItemDisplay="Top" NoDetailRecordsText="No records to display." Width="100%">
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table bgcolor="#ffffff" border="0" cellpadding="5" cellspacing="0" width="100%">
<colgroup>
<col width="20%">
<col width="80%">
</colgroup>
<tbody>
<tr>
<td colspan="2" bgcolor="#e8e8e8">
<strong>Create Action:</strong></td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr>
<td style="height:0px; vertical-align:top; padding-top:5px;">
<strong>Enter Action:</strong>
</td>
<td>
<asp:TextBox ID="txtAction" runat="server" CssClass="inputtxt" Text='<%# Bind("ActionDescription") %>'
Height="68px" TextMode="MultiLine" Width="400px" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"></asp:TextBox>
<asp:RequiredFieldValidator ID="rvActionAlready" runat="server" ControlToValidate="txtAction"
ErrorMessage="* Action already exists" ValidationGroup="GroupStrategy" EnableClientScript="False">
</asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rvfAction" runat="server" ControlToValidate="txtAction"
ErrorMessage="* Action is required" ValidationGroup="Group"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<strong>Person Responsible:</strong></td>
<td>
<asp:TextBox ID="txtPersonResponsible" runat="server" CssClass="inputtxt" Style="width: 400px"
Text='<%# Bind("PersonResponsible") %>' BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvPersonResponsible" runat="server" ControlToValidate="txtPersonResponsible"
ErrorMessage="*" ValidationGroup="Group"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<strong>Measurement:</strong></td>
<td>
<asp:TextBox ID="txtMeasurement" runat="server" CssClass="inputttxt" Style="width: 400px"
Text='<%# Bind("Measurement") %>' BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvMeasurement" runat="server" ControlToValidate="txtMeasurement"
ErrorMessage="*" ValidationGroup="Group"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<strong>Resources Needed:</strong></td>
<td>
<asp:TextBox ID="txtResNeeded" runat="server" CssClass="inputttxt" Style="width: 400px"
Text='<%# Bind("ResourcesNeeded") %>' BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvResNeeded" runat="server" ControlToValidate="txtResNeeded"
ErrorMessage="*" ValidationGroup="Group"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<strong>Start Date:</strong></td>
<td style="text-align: left;">
<div style="width: 400px;">
<telerik:RadDatePicker ID="radStartDatePicker" runat="server" Culture="English (United States)"
DbSelectedDate='<%# Bind("StartDate") %>' BorderColor="Black" >
<Calendar ID="Calendar1" UseColumnHeadersAsSelectors="False" runat="server" UseRowHeadersAsSelectors="False"
ViewSelectorText="x" ShowRowHeaders="false">
</Calendar>
</telerik:RadDatePicker>
<asp:RequiredFieldValidator ID="rfvStartDatePicker" runat="server" ControlToValidate="radStartDatePicker"
ErrorMessage="*" ValidationGroup="Group"></asp:RequiredFieldValidator>
<asp:Label ID="lblDateError" Text="Start Date cannot be greater than End Date." runat="server"
Visible="false" ForeColor="red">
</asp:Label>
</div>
</td>
</tr>
<tr>
<td>
<strong>End Date:</strong></td>
<td style="text-align: left;">
<div style="width: 160px;">
<telerik:RadDatePicker ID="radEndDatepicker" runat="server" Culture="English (United States)"
DbSelectedDate='<%# Bind("EndDate") %>'>
<Calendar ID="Calendar2" ShowRowHeaders="false" UseColumnHeadersAsSelectors="False"
UseRowHeadersAsSelectors="False" ViewSelectorText="x" runat="server">
</Calendar>
</telerik:RadDatePicker>
<asp:RequiredFieldValidator ID="rfvEndDatepicker" runat="server" ControlToValidate="radEndDatepicker"
ErrorMessage="*" ValidationGroup="Group"></asp:RequiredFieldValidator>
</div>
</td>
</tr>
<tr>
<td>
</td>
<td style="text-align: left">
<asp:Button ID="btnSaveEditAction" runat="server" Text='Save & Add Another' CommandName="Insert"
ValidationGroup="Group"></asp:Button>
<asp:Button ID="btnSaveAndCloseAction" runat="server" Text="Save & Close " CommandName="Update"
CommandArgument="1" ValidationGroup="Group"></asp:Button>
<asp:Button ID="btnInsertSaveAndCloseAction" runat="server" CommandArgument="2" CommandName="Insert"
Text="Save & Close" ValidationGroup="Group" />
or
<asp:LinkButton ID="lnkBtnCancel" runat="server" CommandName="Cancel" ForeColor="Maroon"><b>Cancel</b></asp:LinkButton>
</td>
</tr>
</tbody>
</table>
</FormTemplate>
</EditFormSettings>
<Columns>
<telerik:GridBoundColumn UniqueName="column2" DataField="ActionDescription" HeaderButtonType="TextButton"
HeaderText="Action" ReadOnly="True" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<HeaderStyle Font-Bold="true" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PersonResponsible" HeaderText="Person Responsible"
UniqueName="PersonResponsible" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<HeaderStyle Font-Bold="true" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Measurement" HeaderText="Measurement" UniqueName="Measurement" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<HeaderStyle Font-Bold="true" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ResourcesNeeded" HeaderText="Resources Needed"
UniqueName="ResourcesNeeded" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<HeaderStyle Font-Bold="true" />
</telerik:GridBoundColumn>
<telerik:GridDateTimeColumn DataField="StartDate" DataFormatString="{0:M/dd/yyyy}"
HeaderText="Start Date" UniqueName="column" DataType="System.DateTime" MaxLength="9" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<HeaderStyle Font-Bold="true" />
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="EndDate" DataFormatString="{0:M/dd/yyyy}"
HeaderText="End Date" UniqueName="column3" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<HeaderStyle Font-Bold="true" />
</telerik:GridDateTimeColumn>
<telerik:GridTemplateColumn HeaderText="Edit" UniqueName="Edit" ItemStyle-VerticalAlign="Top">
<ItemTemplate>
<asp:ImageButton ID="imgBtnEdit" CommandArgument='<%# Eval("ActionID") %>' CommandName="Edit"
runat="server" ImageUrl="~/App_Themes/MainTheme/Images/icon_table_edit.png" />
</ItemTemplate>
<HeaderStyle Font-Bold="true" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Delete" UniqueName="Delete" ItemStyle-VerticalAlign="Top">
<ItemTemplate>
<asp:ImageButton ID="imgBtnDelete" CommandArgument='<%# Eval("ActionID") %>' CommandName="Delete"
OnClientClick="return confirms('Are you sure you want to delete this Action?')"
runat="server" ImageUrl="~/App_Themes/MainTheme/Images/icon_table_delete.png" />
</ItemTemplate>
<HeaderStyle Font-Bold="true" />
</telerik:GridTemplateColumn>
</Columns>
<CommandItemSettings AddNewRecordText="Add Action" RefreshImageUrl="../../App_Themes/MainTheme/Images/b_shade_rt2.png"
RefreshText="" />
</telerik:GridTableView>
</DetailTables>
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table cellpadding="0" cellspacing="0" border="0" style="width: 100%;">
<tr>
<td style="width: 2%;">
</td>
<td style="width: 96%;">
<br />
<div>
<strong>Enter Strategy </strong>
<br />
</div>
<div>
<table style="width: 100%;" cellpadding="0" cellspacing="0">
<tr>
<td>
<asp:TextBox Height="95px" ID="txtStrategy1" Text='<%# Bind("strActionsDescription") %>'
BackColor="LightYellow" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"
CssClass="inputtxt w700" runat="server" TextMode="MultiLine"
Width="700px"></asp:TextBox>
<asp:HiddenField ID="hdObjectiveID" Value='<%# Bind("ObjectiveID") %>' runat="server" />
</td>
</tr>
<tr>
<td>
<asp:RequiredFieldValidator ID="rvStrategyAlready" runat="server" ControlToValidate="txtStrategy1"
ErrorMessage="* Strategy already exists" ValidationGroup="GroupStrategy" EnableClientScript="False"></asp:RequiredFieldValidator><br />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtStrategy1"
ErrorMessage="* Strategy is required" ValidationGroup="GroupStrategy"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="height: 21px; text-align: center;">
<asp:Button ID="btnSaveEdit" runat="server" Text='Save & Add Another' CommandName="Insert"
ValidationGroup="GroupStrategy"></asp:Button>
<asp:Button ID="btnSaveAndClose" runat="server" Text="Save & Close " CommandName="Update"
CommandArgument="1" ValidationGroup="GroupStrategy"></asp:Button>
<asp:Button ID="btnInsertSaveAndClose" runat="server" CommandArgument="2" CommandName="Insert"
Text="Save & Close" ValidationGroup="GroupStrategy" />
or
<asp:LinkButton ID="lnkBtnCancel" runat="server" CommandName="Cancel" ForeColor="Maroon"><b>Cancel</b></asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
<td style="width: 2%;">
</td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
<Columns>
<telerik:GridBoundColumn HeaderText="Strategy" DataField="StrActionsDescription"
UniqueName="ObjectiveDescription">
<HeaderStyle Font-Bold="true" />
<ItemStyle Width="90%" />
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn UniqueName="Edit" HeaderText="Edit">
<ItemTemplate>
<asp:ImageButton ID="imgEdit" runat="server" CommandName="Edit" ImageUrl="~/App_Themes/MainTheme/Images/icon_table_edit.png"
ToolTip="Edit" />
</ItemTemplate>
<HeaderStyle Font-Bold="True" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="Delete" HeaderText="Delete">
<ItemTemplate>
<asp:ImageButton ID="imgDelete" runat="server" CommandName="Delete" ImageUrl="~/App_Themes/MainTheme/Images/icon_table_delete.png"
ToolTip="Delete Strategy" OnClientClick="return confirms('Are you sure you want to delete the Strategy?')" />
</ItemTemplate>
<HeaderStyle Font-Bold="True" />
</telerik:GridTemplateColumn>
</Columns>
<CommandItemSettings AddNewRecordText="Add Strategy" RefreshImageUrl="../../App_Themes/MainTheme/Images/b_shade_rt2.png"
RefreshText="" />
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridBoundColumn HeaderText="Objective" DataField="ObjectiveDescription"
UniqueName="ObjectiveDescription">
<HeaderStyle Font-Bold="true" />
</telerik:GridBoundColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
<ExpandCollapseColumn Visible="True">
</ExpandCollapseColumn>
</MasterTableView>
<HeaderContextMenu Skin="WebBlue">
<CollapseAnimation Duration="200" Type="OutQuint" />
</HeaderContextMenu>
<FilterMenu Skin="WebBlue">
<CollapseAnimation Duration="200" Type="OutQuint" />
</FilterMenu>
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
<StatusBarSettings LoadingText="" ReadyText="" />
</telerik:RadGrid>
<telerik:RadGrid ID="rgGoals" runat="server" OnItemDataBound="rgGoals_ItemDataBound"
OnInsertCommand="rgGoals_InsertCommand" OnUpdateCommand="rgGoals_UpdateCommand"
OnDeleteCommand="rgGoals_DeleteCommand" OnItemCommand="rgGoals_ItemCommand" AllowAutomaticDeletes="True"
ShowStatusBar="True" Width="100%" AutoGenerateColumns="False" PageSize="20" AllowPaging="True"
GridLines="None" Skin="Vista" OnDetailTableDataBind="rgGoals_DetailTableDataBind" OnPreRender="rgGoals_PreRender">
<PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
<MasterTableView Name="Goal" GridLines="None" HierarchyLoadMode="ServerBind" DataKeyNames="Year,SCDS,GoalID">
<Columns>
<telerik:GridBoundColumn UniqueName="Description" HeaderText="Goal" DataField="ShortDescription">
<HeaderStyle Font-Bold="True" />
<ItemStyle Width="500px" HorizontalAlign="Left" VerticalAlign="Top" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="DateCreated" HeaderText="Date Created" DataField="DateCreated"
DataType="System.DateTime" DataFormatString="{0:M/dd/yyyy}" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<ItemStyle Width="100px" />
<HeaderStyle Font-Bold="True" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="DateModified" HeaderText="Date Modified" DataField="LastModified"
DataFormatString="{0:M/dd/yyyy}" DataType="System.DateTime" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<ItemStyle Width="100px" />
<HeaderStyle Font-Bold="True" />
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table>
<tr>
<td>
<strong>Goal</strong></td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td colspan="3">
<asp:TextBox ID="txtShortDescription" runat="server" Text='<%# Bind( "ShortDescription" ) %>'
Width="750px" Height="70px" TextMode="MultiLine" BackColor="LightYellow"></asp:TextBox>
<br />
<asp:RequiredFieldValidator ID="rvGoalAlready" runat="server" ErrorMessage="* Goal already exists"
ControlToValidate="txtShortDescription" EnableClientScript="False" ValidationGroup="Desc"
Style="white-space: nowrap"></asp:RequiredFieldValidator><br />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtShortDescription"
Style="white-space: nowrap" ErrorMessage="* Goal Description is required" ValidationGroup="Desc"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td>
</td>
<td colspan="2">
</td>
</tr>
</table>
</FormTemplate>
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
</EditFormSettings>
<DetailTables>
<telerik:GridTableView runat="server" Name="Objective" HierarchyLoadMode="ServerBind"
DataKeyNames="ObjectiveID" NoDetailRecordsText="No records to display." Width="100%">
<DetailTables>
<telerik:GridTableView AllowCustomPaging="false" AllowPaging="false" runat="server"
Name="Strategy" HierarchyLoadMode="ServerBind" DataKeyNames="StrategyID,ObjectiveID"
CommandItemDisplay="Top" NoDetailRecordsText="No records to display." Width="100%">
<DetailTables>
<telerik:GridTableView AllowCustomPaging="false" AllowPaging="false" runat="server"
Name="Action" HierarchyLoadMode="ServerBind" DataKeyNames="ActionID,StrategyID"
CommandItemDisplay="Top" NoDetailRecordsText="No records to display." Width="100%">
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table bgcolor="#ffffff" border="0" cellpadding="5" cellspacing="0" width="100%">
<colgroup>
<col width="20%">
<col width="80%">
</colgroup>
<tbody>
<tr>
<td colspan="2" bgcolor="#e8e8e8">
<strong>Create Action:</strong></td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr>
<td style="height:0px; vertical-align:top; padding-top:5px;">
<strong>Enter Action:</strong>
</td>
<td>
<asp:TextBox ID="txtAction" runat="server" CssClass="inputtxt" Text='<%# Bind("ActionDescription") %>'
Height="68px" TextMode="MultiLine" Width="400px" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"></asp:TextBox>
<asp:RequiredFieldValidator ID="rvActionAlready" runat="server" ControlToValidate="txtAction"
ErrorMessage="* Action already exists" ValidationGroup="GroupStrategy" EnableClientScript="False">
</asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="rvfAction" runat="server" ControlToValidate="txtAction"
ErrorMessage="* Action is required" ValidationGroup="Group"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<strong>Person Responsible:</strong></td>
<td>
<asp:TextBox ID="txtPersonResponsible" runat="server" CssClass="inputtxt" Style="width: 400px"
Text='<%# Bind("PersonResponsible") %>' BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvPersonResponsible" runat="server" ControlToValidate="txtPersonResponsible"
ErrorMessage="*" ValidationGroup="Group"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<strong>Measurement:</strong></td>
<td>
<asp:TextBox ID="txtMeasurement" runat="server" CssClass="inputttxt" Style="width: 400px"
Text='<%# Bind("Measurement") %>' BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvMeasurement" runat="server" ControlToValidate="txtMeasurement"
ErrorMessage="*" ValidationGroup="Group"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<strong>Resources Needed:</strong></td>
<td>
<asp:TextBox ID="txtResNeeded" runat="server" CssClass="inputttxt" Style="width: 400px"
Text='<%# Bind("ResourcesNeeded") %>' BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvResNeeded" runat="server" ControlToValidate="txtResNeeded"
ErrorMessage="*" ValidationGroup="Group"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<strong>Start Date:</strong></td>
<td style="text-align: left;">
<div style="width: 400px;">
<telerik:RadDatePicker ID="radStartDatePicker" runat="server" Culture="English (United States)"
DbSelectedDate='<%# Bind("StartDate") %>' BorderColor="Black" >
<Calendar ID="Calendar1" UseColumnHeadersAsSelectors="False" runat="server" UseRowHeadersAsSelectors="False"
ViewSelectorText="x" ShowRowHeaders="false">
</Calendar>
</telerik:RadDatePicker>
<asp:RequiredFieldValidator ID="rfvStartDatePicker" runat="server" ControlToValidate="radStartDatePicker"
ErrorMessage="*" ValidationGroup="Group"></asp:RequiredFieldValidator>
<asp:Label ID="lblDateError" Text="Start Date cannot be greater than End Date." runat="server"
Visible="false" ForeColor="red">
</asp:Label>
</div>
</td>
</tr>
<tr>
<td>
<strong>End Date:</strong></td>
<td style="text-align: left;">
<div style="width: 160px;">
<telerik:RadDatePicker ID="radEndDatepicker" runat="server" Culture="English (United States)"
DbSelectedDate='<%# Bind("EndDate") %>'>
<Calendar ID="Calendar2" ShowRowHeaders="false" UseColumnHeadersAsSelectors="False"
UseRowHeadersAsSelectors="False" ViewSelectorText="x" runat="server">
</Calendar>
</telerik:RadDatePicker>
<asp:RequiredFieldValidator ID="rfvEndDatepicker" runat="server" ControlToValidate="radEndDatepicker"
ErrorMessage="*" ValidationGroup="Group"></asp:RequiredFieldValidator>
</div>
</td>
</tr>
<tr>
<td>
</td>
<td style="text-align: left">
<asp:Button ID="btnSaveEditAction" runat="server" Text='Save & Add Another' CommandName="Insert"
ValidationGroup="Group"></asp:Button>
<asp:Button ID="btnSaveAndCloseAction" runat="server" Text="Save & Close " CommandName="Update"
CommandArgument="1" ValidationGroup="Group"></asp:Button>
<asp:Button ID="btnInsertSaveAndCloseAction" runat="server" CommandArgument="2" CommandName="Insert"
Text="Save & Close" ValidationGroup="Group" />
or
<asp:LinkButton ID="lnkBtnCancel" runat="server" CommandName="Cancel" ForeColor="Maroon"><b>Cancel</b></asp:LinkButton>
</td>
</tr>
</tbody>
</table>
</FormTemplate>
</EditFormSettings>
<Columns>
<telerik:GridBoundColumn UniqueName="column2" DataField="ActionDescription" HeaderButtonType="TextButton"
HeaderText="Action" ReadOnly="True" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<HeaderStyle Font-Bold="true" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PersonResponsible" HeaderText="Person Responsible"
UniqueName="PersonResponsible" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<HeaderStyle Font-Bold="true" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Measurement" HeaderText="Measurement" UniqueName="Measurement" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<HeaderStyle Font-Bold="true" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ResourcesNeeded" HeaderText="Resources Needed"
UniqueName="ResourcesNeeded" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<HeaderStyle Font-Bold="true" />
</telerik:GridBoundColumn>
<telerik:GridDateTimeColumn DataField="StartDate" DataFormatString="{0:M/dd/yyyy}"
HeaderText="Start Date" UniqueName="column" DataType="System.DateTime" MaxLength="9" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<HeaderStyle Font-Bold="true" />
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="EndDate" DataFormatString="{0:M/dd/yyyy}"
HeaderText="End Date" UniqueName="column3" ItemStyle-HorizontalAlign="Left" ItemStyle-VerticalAlign="Top">
<HeaderStyle Font-Bold="true" />
</telerik:GridDateTimeColumn>
<telerik:GridTemplateColumn HeaderText="Edit" UniqueName="Edit" ItemStyle-VerticalAlign="Top">
<ItemTemplate>
<asp:ImageButton ID="imgBtnEdit" CommandArgument='<%# Eval("ActionID") %>' CommandName="Edit"
runat="server" ImageUrl="~/App_Themes/MainTheme/Images/icon_table_edit.png" />
</ItemTemplate>
<HeaderStyle Font-Bold="true" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Delete" UniqueName="Delete" ItemStyle-VerticalAlign="Top">
<ItemTemplate>
<asp:ImageButton ID="imgBtnDelete" CommandArgument='<%# Eval("ActionID") %>' CommandName="Delete"
OnClientClick="return confirms('Are you sure you want to delete this Action?')"
runat="server" ImageUrl="~/App_Themes/MainTheme/Images/icon_table_delete.png" />
</ItemTemplate>
<HeaderStyle Font-Bold="true" />
</telerik:GridTemplateColumn>
</Columns>
<CommandItemSettings AddNewRecordText="Add Action" RefreshImageUrl="../../App_Themes/MainTheme/Images/b_shade_rt2.png"
RefreshText="" />
</telerik:GridTableView>
</DetailTables>
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table cellpadding="0" cellspacing="0" border="0" style="width: 100%;">
<tr>
<td style="width: 2%;">
</td>
<td style="width: 96%;">
<br />
<div>
<strong>Enter Strategy </strong>
<br />
</div>
<div>
<table style="width: 100%;" cellpadding="0" cellspacing="0">
<tr>
<td>
<asp:TextBox Height="95px" ID="txtStrategy1" Text='<%# Bind("strActionsDescription") %>'
BackColor="LightYellow" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"
CssClass="inputtxt w700" runat="server" TextMode="MultiLine"
Width="700px"></asp:TextBox>
<asp:HiddenField ID="hdObjectiveID" Value='<%# Bind("ObjectiveID") %>' runat="server" />
</td>
</tr>
<tr>
<td>
<asp:RequiredFieldValidator ID="rvStrategyAlready" runat="server" ControlToValidate="txtStrategy1"
ErrorMessage="* Strategy already exists" ValidationGroup="GroupStrategy" EnableClientScript="False"></asp:RequiredFieldValidator><br />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtStrategy1"
ErrorMessage="* Strategy is required" ValidationGroup="GroupStrategy"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="height: 21px; text-align: center;">
<asp:Button ID="btnSaveEdit" runat="server" Text='Save & Add Another' CommandName="Insert"
ValidationGroup="GroupStrategy"></asp:Button>
<asp:Button ID="btnSaveAndClose" runat="server" Text="Save & Close " CommandName="Update"
CommandArgument="1" ValidationGroup="GroupStrategy"></asp:Button>
<asp:Button ID="btnInsertSaveAndClose" runat="server" CommandArgument="2" CommandName="Insert"
Text="Save & Close" ValidationGroup="GroupStrategy" />
or
<asp:LinkButton ID="lnkBtnCancel" runat="server" CommandName="Cancel" ForeColor="Maroon"><b>Cancel</b></asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
<td style="width: 2%;">
</td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
<Columns>
<telerik:GridBoundColumn HeaderText="Strategy" DataField="StrActionsDescription"
UniqueName="ObjectiveDescription">
<HeaderStyle Font-Bold="true" />
<ItemStyle Width="90%" />
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn UniqueName="Edit" HeaderText="Edit">
<ItemTemplate>
<asp:ImageButton ID="imgEdit" runat="server" CommandName="Edit" ImageUrl="~/App_Themes/MainTheme/Images/icon_table_edit.png"
ToolTip="Edit" />
</ItemTemplate>
<HeaderStyle Font-Bold="True" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="Delete" HeaderText="Delete">
<ItemTemplate>
<asp:ImageButton ID="imgDelete" runat="server" CommandName="Delete" ImageUrl="~/App_Themes/MainTheme/Images/icon_table_delete.png"
ToolTip="Delete Strategy" OnClientClick="return confirms('Are you sure you want to delete the Strategy?')" />
</ItemTemplate>
<HeaderStyle Font-Bold="True" />
</telerik:GridTemplateColumn>
</Columns>
<CommandItemSettings AddNewRecordText="Add Strategy" RefreshImageUrl="../../App_Themes/MainTheme/Images/b_shade_rt2.png"
RefreshText="" />
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridBoundColumn HeaderText="Objective" DataField="ObjectiveDescription"
UniqueName="ObjectiveDescription">
<HeaderStyle Font-Bold="true" />
</telerik:GridBoundColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
<ExpandCollapseColumn Visible="True">
</ExpandCollapseColumn>
</MasterTableView>
<HeaderContextMenu Skin="WebBlue">
<CollapseAnimation Duration="200" Type="OutQuint" />
</HeaderContextMenu>
<FilterMenu Skin="WebBlue">
<CollapseAnimation Duration="200" Type="OutQuint" />
</FilterMenu>
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
<StatusBarSettings LoadingText="" ReadyText="" />
</telerik:RadGrid>
0
Accepted

Shinu
Top achievements
Rank 2
answered on 18 Sep 2009, 06:56 AM
Hi,
Give a try with the following code snippet in the ItemCreated event of RadGrid and see if it is working.
CS:
Regards
Shinu
Give a try with the following code snippet in the ItemCreated event of RadGrid and see if it is working.
CS:
protected void RadGrid2_ItemCreated(object sender, GridItemEventArgs e) |
{ |
if (e.Item is GridDataItem) |
{ |
GridDataItem item = (GridDataItem)e.Item; |
item.OwnerTableView.GetColumn("ExpandColumn").ItemStyle.VerticalAlign = VerticalAlign.Top; |
} |
} |
Regards
Shinu
0

Muzaffar
Top achievements
Rank 1
answered on 18 Sep 2009, 07:26 AM
Thnx Shinu that works great i appreciate.
Regards
Muzaffar Ali
Regards
Muzaffar Ali