Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
149 views
Hi I was using Rad grid with the custom template.I was facing the alignment issue. I have fixed the width also even though the alignment is differing for the browsers any other ways to do this. Please find the bellow code.

<telerik:RadGrid ID="grdInbound" runat="server" AutoGenerateColumns="false" AllowPaging="true"
                                AllowSorting="True" Width="100%" OnItemCreated="grdInbound_ItemCreated"
                                OnPageIndexChanged="grdInbound_PageIndexChanged" OnItemDeleted="grdInbound_ItemDeleted"
                                OnItemCommand="grdInbound_ItemCommand1" AllowAutomaticDeletes="True">                                
                                <HeaderStyle BorderStyle="Solid" Font-Bold="true" HorizontalAlign="Center" />
                                <ItemStyle HorizontalAlign="Left" Font-Underline="false" />
                                <AlternatingItemStyle HorizontalAlign="Left" Font-Underline="false" />
                                <MasterTableView CommandItemDisplay="Bottom">
                                    <Columns>
                                        <telerik:GridTemplateColumn HeaderText="Line" UniqueName="LINE_NUMBER" DataField="LINE_NUMBER">
                                            <ItemStyle HorizontalAlign="Left" Width="4%" />
                                            <HeaderStyle Width="4%" Wrap="true" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblSRNo" runat="server" ReadOnly="true" Text='<%# DataBinder.Eval (Container.DataItem, "LINE_NUMBER") %>'></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Product" UniqueName="OrderNumber" DataField="PRODUCT_CODE">
                                            <ItemStyle HorizontalAlign="Left" Width="11%" />
                                            <HeaderStyle Width="11%" Wrap="true" />
                                            <ItemTemplate>
                                                <asp:LinkButton ID="lnkOrderNumber" runat="server" OnClick="lnkOrderNumber_Click"
                                                    Text='<%# DataBinder.Eval(Container.DataItem, "PRODUCT_CODE") %>' ValidationGroup='<%# DataBinder.Eval(Container.DataItem, "SRORD_DET_ID") %>'>  <%--ValidationGroup='<%# uniquenumber()%>'--%>
                                                </asp:LinkButton>
                                                <asp:Label ID="lblsrorder" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "SRORD_DET_ID") %>'
                                                    Visible="false"></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Description" UniqueName="Description" DataField="PROD_DESC">
                                            <ItemStyle HorizontalAlign="Left" Width="22%" />
                                            <HeaderStyle Width="22%" Wrap="true" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblDescription" runat="server" Text='<%# TrimAndAppendDots(DataBinder.Eval (Container.DataItem, "PROD_DESC")) %>'></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Pallet Size" UniqueName="Pallet_Size" DataField="Pallet_Size">
                                            <ItemStyle HorizontalAlign="Left" Width="7%" />
                                            <HeaderStyle Width="7%" Wrap="true" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblPalletSize" runat="server" ReadOnly="true" Text='<%# DataBinder.Eval (Container.DataItem, "Pallet_Size") %>'></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Pack Size" UniqueName="PackSize" DataField="PRODSZ_CD">
                                            <ItemStyle HorizontalAlign="Left" Width="7%" />
                                            <HeaderStyle Width="7%" Wrap="true" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblPackSize" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "PRODSZ_CD") %>'></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Quantity" UniqueName="Quantity" DataField="QTTY_ORDERED">
                                            <ItemStyle HorizontalAlign="Right" Width="7%" />
                                            <HeaderStyle Width="7%" Wrap="true" />
                                            <ItemTemplate>
                                                <asp:Label ID="lnkQuantity" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "QTTY_ORDERED") %>'></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="UOM" UniqueName="UOM" DataField="PACKSHORT_DESC">
                                            <ItemStyle HorizontalAlign="Left" Width="3%" />
                                            <HeaderStyle Width="3%" Wrap="true" />
                                            <ItemTemplate>
                                                <asp:Label ID="lnkUOM" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "PACKSHORT_DESC") %>'></asp:Label>
                                                <asp:Label ID="lnkUOMHidden" runat="server" Visible="false" Text='<%# DataBinder.Eval(Container.DataItem, "PACKSIZE_ID") %>'></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Lot Code" UniqueName="LotCode" DataField="lot_code">
                                            <ItemStyle HorizontalAlign="Left" Width="12%" />
                                            <HeaderStyle Width="12%" Wrap="true" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblLotCode" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "lot_code") %>'></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Expiration Date" UniqueName="ExpirationDate"
                                            DataField="EXP_DT">
                                            <ItemStyle HorizontalAlign="Left" Width="10%" />
                                            <HeaderStyle Width="10%" Wrap="true" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblExpirationDate" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "EXP_DT") %>'></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Status" UniqueName="Status" DataField="STATUS">
                                            <ItemStyle HorizontalAlign="Left" Width="4%" />
                                            <HeaderStyle Width="4%" Wrap="true" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblStatus" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "STATUS") %>'></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn HeaderText="Available Qty" UniqueName="AvailableQty"
                                            DataField="QTTY_AVAILABLE">
                                            <ItemStyle HorizontalAlign="Right" Width="8%" />
                                            <HeaderStyle Width="8%" Wrap="true" />
                                            <ItemTemplate>
                                                <asp:Label ID="lnkAvailableQty" runat="server" Text='<%# DataBinder.Eval (Container.DataItem, "QTTY_AVAILABLE") %>'></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>  
                                         <telerik:GridTemplateColumn UniqueName="DeleteColumn" >
                                          <ItemStyle HorizontalAlign="Right" Width="3%" CssClass="MyImageButton"/>
                                            <HeaderStyle Width="3%" />
                                            <ItemTemplate>
                                                <asp:ImageButton ID="imgDelete" runat="server" CssClass="MyImageButton" ImageUrl="~/images/delete_icon.png"
                                                 CommandArgument="SRORD_DET_ID" CommandName="Delete" OnClientClick='<%# FormatMessage(Eval("PRODUCT_CODE") as string) %>'
                                            Text="Delete" />
                                            </ItemTemplate>                                          
                                        </telerik:GridTemplateColumn>                                  
                                        <%--<telerik:GridButtonColumn ButtonType="ImageButton" CommandArgument="SRORD_DET_ID"
                                            ConfirmTextFields="PRODUCT_CODE" ConfirmTextFormatString="Are you sure want to delete details for Product Code {0}?"
                                            CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" Visible="false">
                                            <HeaderStyle Width="3%" />
                                            <ItemStyle HorizontalAlign="Center" Width="3%" CssClass="MyImageButton" />
                                        </telerik:GridButtonColumn>--%>
                                    </Columns>
                                    <CommandItemTemplate>
                                        <table cellpadding="0" cellspacing="2px" width="100%">
                                            <tr align="left">
                                                <td width="4%"  align="left">
                                                    <telerik:RadTextBox ID="txtSRNo" runat="server" ReadOnly="true" Width="85%">
                                                    </telerik:RadTextBox>
                                                </td>
                                                <td align="left" width="11%" style="padding-left: 0px;">
                                                    <table cellpadding="0" cellspacing="0" width="95%">
                                                        <tr align="left">
                                                            <td align="left" width="85%">
                                                                <asp:TextBox ID="txtOrdNumGrid" runat="server" Width="91%" AutoPostBack="true" OnTextChanged="txtOrdNumGrid_OnTextChanged"
                                                                    TabIndex="14">
                                                                </asp:TextBox>
                                                            </td>
                                                            <td align="left" valign="middle" width="5%">
                                                                <asp:Image ID="imgOrdNumGrid" runat="server" Height="17px" ImageUrl="~/images/PopupButtonImage.bmp"
                                                                    Width="17px" ImageAlign="Right" TabIndex="15" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                                <td width="22%" style="padding-left: 2px;" align="left">
                                                    <telerik:RadTextBox ID="txtDescGrid" runat="server" Width="95%" ReadOnly="true"
                                                        TabIndex="16">
                                                    </telerik:RadTextBox>
                                                </td>
                                                <td width="7%" style="padding-left: 0px;" align="left">
                                                    <telerik:RadTextBox ID="txtPalletSizeGrid" runat="server" Width="90%" ReadOnly="true"
                                                        TabIndex="17">
                                                    </telerik:RadTextBox>
                                                </td>
                                                <td width="7%" style="padding-left: 0px;" align="left">
                                                    <telerik:RadTextBox ID="txtPackSizeGrid" runat="server"  Width="90%" ReadOnly="true"
                                                        TabIndex="17">
                                                    </telerik:RadTextBox>
                                                </td>
                                                <td width="6%" style="padding-left: 1px;" align="left">
                                                    <telerik:RadTextBox ID="txtQuantityGrid" runat="server" Width="90%" onkeypress="return numbersonly(event)"
                                                        TabIndex="18" FocusedStyle-HorizontalAlign="Right" DisabledStyle-HorizontalAlign="Right"
                                                        EmptyMessageStyle-HorizontalAlign="Right" EnabledStyle-HorizontalAlign="Right"
                                                        HoveredStyle-HorizontalAlign="Right" ReadOnlyStyle-HorizontalAlign="Right">
                                                    </telerik:RadTextBox>
                                                </td>
                                                <td align="left" width="5%" style="padding-left: 1px;">
                                                    <telerik:RadComboBox ID="ddlUOMGrid" runat="server" Width="95%" TabIndex="19">
                                                    </telerik:RadComboBox>
                                                </td>
                                                <td align="left" width="12%" style="padding-left: 1px;">
                                                    <telerik:RadComboBox ID="ddlLotCodeGrid" runat="server" Width="97%" AllowCustomText="true"
                                                        TabIndex="20" EnableViewState="true" MarkFirstMatch="true" MaxLength="20" EnableVirtualScrolling="true">
                                                    </telerik:RadComboBox>
                                                </td>
                                                <td align="left" width="10%" style="padding-left: 0px;">
                                                    <telerik:RadDatePicker ID="rdpExpDt" runat="server"  Width="99%" BorderColor="#688CAF"
                                                        TabIndex="21" Calendar-BorderColor="#688caf" DateInput-BorderColor="#688caf"
                                                        DatePopupButton-BorderColor="#688caf" Culture="en-US">
                                                        <DateInput BorderColor="#688CAF" DataFormatString="<%$Appsettings:dateformat%>">
                                                        </DateInput>
                                                        <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x"
                                                            BorderColor="#688CAF">
                                                        </Calendar>
                                                        <DatePopupButton ImageUrl="" HoverImageUrl="" BorderColor="#688CAF"></DatePopupButton>
                                                    </telerik:RadDatePicker>
                                                </td>
                                                <td align="left" width="6%" style="padding-left: 0px;">
                                                    <telerik:RadComboBox ID="ddlStatusGrid" runat="server" Width="90%" TabIndex="22">
                                                    </telerik:RadComboBox>
                                                </td>
                                                <td align="left" width="8%" style="padding-left: 0px;">
                                                    <telerik:RadTextBox ID="txtAvailQtyGrid" runat="server" Width="80%" ReadOnly="true"
                                                        TabIndex="23" FocusedStyle-HorizontalAlign="Right" DisabledStyle-HorizontalAlign="Right"
                                                        EmptyMessageStyle-HorizontalAlign="Right" EnabledStyle-HorizontalAlign="Right"
                                                        HoveredStyle-HorizontalAlign="Right" ReadOnlyStyle-HorizontalAlign="Right">
                                                    </telerik:RadTextBox>
                                                </td>
                                                 <td align="left" width="3%" style="padding-left: 0px;">
                                                </td>
                                            </tr>
                                        </table>
                                    </CommandItemTemplate>
                                </MasterTableView>                              
                            </telerik:RadGrid>
Nithya Rani
Top achievements
Rank 1
 answered on 28 Feb 2012
1 answer
152 views
I am using on load demand in radcombobox. it will populate combobox on item request using webmethod in my code-behind. now I also want to populate the same combobox on button click event in my page. so how we do that. any ideas please.

msigman
Top achievements
Rank 2
 answered on 28 Feb 2012
4 answers
182 views
Hi, I get the following error

[Exception: Cannot read the configuration/dictionary language parameters!]
   Telerik.Web.UI.SpellCheckHandlerNoSession.ProcessRequest(HttpContext context) +583
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

This happens when RadSpell makes a callback to Telerik.Web.UI.SpellCheckHandler.axd after starting a spell check in RadEditor. It works on other servers. Any pointers on where this might be coming from?
Hongyi
Top achievements
Rank 1
 answered on 28 Feb 2012
6 answers
194 views

We are having issues with our Mac Safari users when coping and pasting in the editor. The buttons in the toolbar do nothing and the short cuts do not work as well. At first I thought there was an issue on our end, but even the demos are your site do not work. 

 

Is there a workaround for this issue?

Janean Angeles
Top achievements
Rank 1
 answered on 28 Feb 2012
1 answer
94 views
Hi,
I have a word file saved in Database in a VarBinary Column (SQL 2008 server). I want to reconstruct this file for download on a button click. Please suggest how can I achieve this.
Thanks and Regards,
Deepika Karanth
Richard
Top achievements
Rank 1
 answered on 27 Feb 2012
1 answer
265 views
I'm trying to change the RadTextBoxes to readonly but it's not taking the change.

((Telerik.Web.UI.RadTextBox)uiControl).ReadOnly = true;

I have this in the page load event
Richard
Top achievements
Rank 1
 answered on 27 Feb 2012
13 answers
372 views
Hello Telerik Team,
Rad Editor Not Working Design mode in IE9
but its working in HTML mode when i check in debug mode
i observe that it didnt rendering the (HTML,head,body text-area )
in its frame
<telerik:RadEditor  ExternalDialogsPath="~/UserControls/EditorDialogs/" NewLineBr="False" runat="server" ID="txtRadEditor" CssClass="emailBody RadEditorOverride"
                           SkinID="DefaultSetOfTools" Width="410" Height="435" EnableResize="false" EditModes="All"
                           ToolsFile="~/UserControls/Fippex/EditorTemplate/CustomToolFile.xml">
                           <ImageManager MaxUploadFileSize="2097152" />
                           <Content></Content>
                           <CssFiles>
                               <telerik:EditorCssFile Value="~/Style/editor.css" />
                           </CssFiles>
                       </telerik:RadEditor>

Please Help me with this out As Soon As Possible
Regards
Steve
Top achievements
Rank 1
 answered on 27 Feb 2012
1 answer
175 views
Hi, is it possible to pick a color from a picture, instead from a palette. Or pick a color from anywhere in the browser. Thanks, Henry
Richard
Top achievements
Rank 1
 answered on 27 Feb 2012
1 answer
187 views
Hi,

I have RadGrid with AllowMultiRowSelection is true.

i.e. AllowMultiRowSelection="true"

But due to this we are not able to select any cell for copy / paste option.

Once we set AllowMultiRowSelection="false", it work fine for selection.

Please let us know to solution for the same.

Regards,
Shirish
Richard
Top achievements
Rank 1
 answered on 27 Feb 2012
1 answer
163 views
Hi,

I am new to telerik, please help me.

I want to reset my radfilter using following script

rfGridFilter.RootGroup.Expressions.Clear();
rfGridFilter.RecreateControl();

Above code runs well in other place in my page instead of page_load.
actually I got new requirement for my project that user can change the profile by selecting new profile in rad combo box profile list.
To accomplice this I am creating radgrid dynamically on page_init and doing datasetup() method on page_load for grid binding when page first time load or when user change profile.

My problem is that when user change profile I want to reset(clear radfilter) filter and after that I am calling datasetup method.
But my radgrid is still using previous filter expression while I am clearing my radfilter using above code.
I don't know where I am doing wrong. While above code runs well in other place This is creating problem when I am calling this before datasetup.
Please help me. Thanx in advance!!!
I am listing other code that I am using.

On page_init

//grid creation dynamic code

            // Main Grid Config & Code
            rgModuleGrid = new RadGrid();
            rgModuleGrid.ID = "rgModuleGrid";

            rgModuleGrid.ItemCreated += rgModuleGrid_ItemCreated;
            rgModuleGrid.ItemCommand += rgModuleGrid_ItemCommand;
            rgModuleGrid.PreRender += rgModuleGrid_PreRender;
            
            rgModuleGridSetup(profileId);//set all the grid properties and configuraion for mastertable view and clientsettings
            GridPlaceHolder.Controls.Add(rgModuleGrid);

On Page_load
////for clear radfilter when profile changes
if (Convert.ToInt32(ViewState["profileId"]) != profileId && IsPostBack)
                {                                        
                    rfGridFilter.RootGroup.Expressions.Clear();
                    rfGridFilter.RecreateControl();

                    DataSetup();
                }
                else
                {
                    DataSetup();                   
                }

My Datasetup method is:

protected void DataSetup()
{
////Here oadsMain is a open access data source controls and EmpByAVF, EmpByAVR and EmpByAVY is the ORM view that work just like table.
 oadsMain.ObjectContextProvider = "iTracker.Data.Orm.iProjectModel, iTracker.Data.Orm";
                if(profileId == 36)
                    oadsMain.TypeName = "iTracker.Data.Orm.EmpByAVF";
                else if(profileId == 37)
                    oadsMain.TypeName = "iTracker.Data.Orm.EmpByAVR";
                else if (profileId == 38)
                    oadsMain.TypeName = "iTracker.Data.Orm.EmpByAVY";

                oadsMain.EnableDelete = false;
                oadsMain.EnableUpdate = false;
                oadsMain.EnableInsert = false;
             
                oadsMain.StoreOriginalValuesInViewState = false;
                rgModuleGrid.DataSourceID = "oadsMain";               
 }             



 
Vinod
Top achievements
Rank 1
 answered on 27 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?