or
Is there a way to define a default width for an input control (CssClass) so that it can be overwritten inline via the controls width parameter?
Thanks,
Rich


| protected void RadGridLetters_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) |
| { |
| if (e.CommandName == "Print") |
| { |
| int letterId = (int)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["LetterId"]; |
| CreatePDF(letterId); |
| } |
| } |
| protected void RadGridLetters_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) |
| { |
| if (e.CommandName == "Print") |
| { |
| int letterId = (int)e.Item.OwnerTableView.DataKeyValues[6]["LetterId"]; |
| CreatePDF(letterId); |
| } |
| } |
| <Telerik:RadAjaxPanel ID="RadAjaxPanelLetters" runat="server" LoadingPanelID="RadAjaxLoadingPanel2" ClientEvents-OnRequestStart="onRequestStartLetters"> |
| <telerik:RadGrid ID="RadGridLetters" runat="server" GridLines="None" EnableEmbeddedSkins="false" Skin="RealMax" |
| AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowAutomaticDeletes="true" |
| DataSourceID="LinqDS_Letters" OnItemCommand="RadGridLetters_ItemCommand" |
| AllowPaging="True" AllowSorting="True" EnableHeaderContextMenu="True" |
| AllowFilteringByColumn="True" > |
| <ClientSettings EnableRowHoverStyle="true" > |
| <ClientEvents OnRowContextMenu="RowContextMenu" OnRowMouseOut="rowMouseOut" OnRowMouseOver="rowMouseOver" OnPopUpShowing="PopUpCentered" OnCommand="GridCommand" ></ClientEvents> |
| <Selecting AllowRowSelect="true" /> |
| </ClientSettings> |
| <HeaderContextMenu Skin="Office2007" EnableTheming="True"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </HeaderContextMenu> |
| <PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="false" /> |
| <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top" |
| DataKeyNames="LetterId" DataSourceID="LinqDS_Letters" EditMode="EditForms"> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <ItemStyle CssClass="RowMouseOut" /> |
| <AlternatingItemStyle CssClass="RowMouseOut" /> |
| <Columns> |
| <telerik:GridEditCommandColumn EditImageUrl="~/Images/Buttons/edit.gif" |
| ButtonType="ImageButton" CancelImageUrl="~/Images/Buttons/cancel.png" |
| Resizable="False"> |
| <HeaderStyle Width="16px" /> |
| <ItemStyle CssClass="CommandColumn" /> |
| </telerik:GridEditCommandColumn> |
| <Telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/Buttons/printer.png" Text="Print" CommandName="Print" > |
| <HeaderStyle Width="16px" /> |
| <ItemStyle CssClass="CommandColumn" /> |
| </Telerik:GridButtonColumn> |
| ... etc |
| var cancelAjaxLetters = false; |
| function GridCommand(sender, args) { |
| if (args.get_commandName() == "Print") cancelAjaxLetters = true; |
| } |
| function onRequestStartLetters(ajaxManager, eventArgs) { |
| if (cancelAjaxLetters) { |
| //alert("disabling Ajax"); |
| eventArgs.EnableAjax = false; |
| } |
| cancelAjaxLetters = false; |
| } |
| protected void RadGridLetters_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) |
| { |
| if (e.CommandName == "Print") |
| { |
| int letterId = (int)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["LetterId"]; |
| CreatePDF(letterId); |
| } |
| } |

pdf export: hard the page size 14/8.5(fan fold)
Plz guide me in case any option found..
Appu
| <MasterTableView EditMode="PopUp"> <Columns> |
| .... |
| <telerik:GridCheckBoxColumn DataField="IsActive" HeaderText="Is Active" /> |
| .... |
| </Columns> |
| <EditFormSettings EditFormType="Template" PopUpSettings-Modal="true"> |
| <FormTemplate> |
| ..... |
| <asp:CheckBox ID="CheckBox1" runat="server Checked='<%# Bind("IsActive") %>' /> |
| ..... |
| </FormTemplate> |
| </EditFormSettings> </MasterTableView> |
This Error "Cannot find a cell bound to column name 'goalname' " arises only when i insert "grdGoals.MasterTableView.HierarchyDefaultExpanded = true;" this statement in codebehind on click of Export to Excel.
Code:
| <telerik:RadGrid> |
| <MasterTableView Width="100%" Name="Master" HierarchyLoadMode="ServerBind" DataKeyNames="InvoiceId" |
| HorizontalAlign="NotSet" CommandItemDisplay="Top"> |
| <DetailTables> |
| <telerik:GridTableView Name="Detail" BackColor="White" AllowNaturalSort="true" runat="server" |
| DataKeyNames="invoiceidfkid" Width="100%"> |
| <ParentTableRelation> |
| <telerik:GridRelationFields MasterKeyField="InvoiceId" DetailKeyField="invoiceidfkid"> |
| </telerik:GridRelationFields> |
| </ParentTableRelation> |
| <Columns> |
| <telerik:GridBoundColumn HeaderText="invoiceidfkid" DataField="invoiceidfkid" Display="false" |
| SortExpression="invoiceidfkid" UniqueName="invoiceidfkid"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </telerik:GridTableView> |
| </DetailTables> |
| <Columns> |
| <telerik:GridBoundColumn HeaderText="InvoiceId" Display="false" DataField="InvoiceId" SortExpression="InvoiceId" |
| UniqueName="InvoiceId"> |
| <ItemStyle Width="0%" /> |
| <HeaderStyle ForeColor="Black" HorizontalAlign="Center" /> |
| </telerik:GridBoundColumn> |
| </MasterTableView> |
| </telerik:RadGrid> |