Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
453 views
ok, this error happens on export to excel from my radgrid.  I got everything working fine in it and then they wanted me to put on a looker service with a pop-up panel.  Since then it breaks, the export to excel, if I take out the code it works fine, i do not want it exported to excel.
it breaks on the follwoing line which is part of the radgri_ItemCreated  
pce.BehaviorID = behaviorID

How can I get around this to export the grid without the control

added peices to grid

<telerik:GridTemplateColumn>
                                             <ItemTemplate>
                                                <asp:Image ID="imgLooker" runat="server" ImageUrl="~/Images/ViewResources.gif" ImageAlign="Middle" BorderStyle="None" />
                                                <asp:PopupControlExtender ID="popInfo" runat="server" PopupControlID="pnlPop" TargetControlID="imgLooker" DynamicContextKey='<% #Eval("intRecId") %>' 
                                                DynamicControlID="pnlpop" DynamicServiceMethod="HelloWorld" Position="bottom"></asp:PopupControlExtender>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
  
 Protected Sub myRadGrid_ItemCreated(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles myRadGrid.ItemCreated
        If TypeOf e.Item Is GridCommandItem Then
            ScriptManager.GetCurrent(Page).RegisterPostBackControl(e.Item.FindControl("btnExport"))
        End If
  
        If TypeOf e.Item Is GridDataItem Then
            Dim pce As PopupControlExtender = TryCast(e.Item.FindControl("popInfo"), PopupControlExtender)
  
            Dim behaviorID As String = "pce_" + e.Item.RowIndex.ToString
            pce.BehaviorID = behaviorID
  
            Dim img As Image = DirectCast(e.Item.FindControl("imgLooker"), Image)
  
            Dim OnMouseOverScript As String = String.Format("$find('{0}').showPopup();", behaviorID)
            Dim OnMouseOutScript As String = String.Format("$find('{0}').hidePopup();", behaviorID)
  
            img.Attributes.Add("onmouseover", OnMouseOverScript)
            img.Attributes.Add("onmouseout", OnMouseOutScript)
        End If
    End Sub
  
  
  
FUll Grid layout
<telerik:RadGrid ID="myRadGrid" runat="server" Width="98%" BorderWidth="1px" CellPadding="6" GridLines="None" BorderColor="#404040" Skin="Web20" ShowFooter="true">
                            <ExportSettings HideStructureColumns="true" ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" FileName="Inventory"></ExportSettings>
                            <MasterTableView AutoGenerateColumns="false" DataKeyNames="intRecId" Name="MasterGrid" BorderColor="#404040" Font-Size="9" Font-Names="Veranda,arial,sans-serif" HeaderStyle-HorizontalAlign="Center" 
                            GridLines="Both" BorderWidth="1px" CommandItemDisplay="Top" HierarchyLoadMode="ServerBind" AllowPaging="true" PageSize="20" PagerStyle-Mode="NumericPages"><ItemStyle HorizontalAlign="Center"/>
                            <AlternatingItemStyle BackColor="#B0C4DE"  HorizontalAlign="Center" /><HeaderStyle ForeColor="White" Font-Bold="true" BorderColor="#404040" BorderWidth="1px" />
                                <CommandItemTemplate>
                                    <table width="100%">
                                        <tr>
                                            <td align="right"><asp:Button ID="btnExport" runat="server" CommandName="ExportToExcel" Text="Export Excel" /></td>
                                        </tr>
                                    </table>
                                </CommandItemTemplate>
                                <Columns>
                                        <telerik:GridTemplateColumn>
                                             <ItemTemplate>
                                                <asp:Image ID="imgLooker" runat="server" ImageUrl="~/Images/ViewResources.gif" ImageAlign="Middle" BorderStyle="None" />
                                                <asp:PopupControlExtender ID="popInfo" runat="server" PopupControlID="pnlPop" TargetControlID="imgLooker" DynamicContextKey='<% #Eval("intRecId") %>' 
                                                DynamicControlID="pnlpop" DynamicServiceMethod="HelloWorld" Position="bottom"></asp:PopupControlExtender>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn"></telerik:GridEditCommandColumn>
                                        <telerik:GridBoundColumn DataField="strCategory" HeaderText="CATEGORY" />
                                        <telerik:GridBoundColumn DataField="strManufacturer" HeaderText="MANUFACTURER" />
                                        <telerik:GridBoundColumn DataField="strmake" HeaderText="MAKE" />
                                        <telerik:GridBoundColumn DataField="strPoNum" HeaderText="PO #" />
                                        <telerik:GridBoundColumn DataField="strAssetNum" HeaderText="ASSET #" />
                                        <telerik:GridBoundColumn DataField="strSN" HeaderText="SN" />
                                        <telerik:GridBoundColumn DataField="fltCost" HeaderText="COST" />
                                        <telerik:GridBoundColumn DataField="FUND" HeaderText="FUND" />
                                        <telerik:GridBoundColumn DataField="ws" HeaderText="WTY_START" />
                                        <telerik:GridBoundColumn DataField="we" HeaderText="WTY_END" />
                                        <telerik:GridBoundColumn DataField="QTY" HeaderText="QTY" />
                                </Columns>
                                <EditFormSettings EditFormType="Template">
                                    <FormTemplate>
                                        <table width="100%">
                                            <tr>
                                                <td style="height:8px"></td>
                                            </tr>
                                            <tr>
                                                <td><b>EDIT DETAILS</b></td>
                                            </tr>
                                        </table>
                                        <table width="100%">
                                            <tr>
                                                <td style="width:50%" align="right">Enter PO </td>
                                                <td style="width:50%" align="left">
                                                    <asp:TextBox ID="txtPoNum" runat="server" Width="160px" Text='<%# Bind("strPoNum") %>'></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height:5px"></td>
                                            </tr>
                                            <tr>
                                                <td style="width:50%" align="right">Enter AssetTag </td>
                                                <td style="width:50%" align="left">
                                                    <asp:TextBox ID="txtAssetNum" runat="server" Width="160px" Text='<%# Bind("strAssetNum") %>'></asp:TextBox>
                                                </td>
                                            </tr>
                                                <tr>
                                                <td style="height:5px"></td>
                                            </tr>
                                            <tr>
                                                <td style="width:50%" align="right">Enter SN </td>
                                                <td style="width:50%" align="left">
                                                    <asp:TextBox ID="txtSn" runat="server" Width="160px" Text='<%# Bind("strSN") %>'></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height:5px"></td>
                                            </tr>
                                            <tr>
                                                <td style="width:50%" align="right">Enter Cost </td>
                                                <td style="width:50%" align="left">
                                                    <asp:TextBox ID="txtCost" runat="server" Width="160px" Text='<%# Bind("fltCost") %>'></asp:TextBox>
                                                    <asp:FilteredTextBoxExtender ID="txtCost_FTE" runat="server" Enabled="True" TargetControlID="txtCost" ValidChars="." FilterType="Custom, Numbers" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height:5px"></td>
                                            </tr>
                                            <tr>
                                                <td style="width:50%" align="right">Warranty Start </td>
                                                <td style="width:50%" align="left">
                                                    <asp:TextBox ID="txtWStart" runat="server" style="cursor:pointer; margin-right: 0px;"  Width="160px" Text='<%# Bind("ws") %>'></asp:TextBox>
                                                    <asp:CalendarExtender ID="txtWStart_CE" runat="server" Enabled="True" TargetControlID="txtWStart"></asp:CalendarExtender>
                                                </td>
                                            </tr>
                                                <tr>
                                                <td style="height:5px"></td>
                                            </tr>
                                            <tr>
                                                <td style="width:50%" align="right">Warranty End </td>
                                                <td style="width:50%" align="left">
                                                    <asp:TextBox ID="txtWEnd" runat="server" style="cursor:pointer; margin-right: 0px;"  Width="160px" Text='<%# Bind("we") %>'></asp:TextBox>
                                                    <asp:CalendarExtender ID="txtWEnd_CE" runat="server" Enabled="True" TargetControlID="txtWEnd"></asp:CalendarExtender>
                                                </td>
                                            </tr>
                                        </table>
                                        <table width="100%">
                                            <tr>
                                                <td>
                                                    <asp:LinkButton ID="lnkSubmit" runat="server" text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>' 
                                                    CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>'></asp:LinkButton>
                                                          
                                                    <asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="false" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="height:8px"></td>
                                            </tr>
                                        </table>
                                    </FormTemplate>
                                </EditFormSettings>
                            </MasterTableView>
                            </telerik:RadGrid>
Kevin
Top achievements
Rank 1
 answered on 23 Mar 2012
1 answer
132 views
Dear all,

I'm trying to setup a radtooltip that will appear (ShowEvent="OnFocus") when the user clicks on a radDatePicker. I've tried to set the TargetControlID to be the radDatePicker's ID, ID + "_wrapper" and also tried  ID + "_dateInput_text". Is this even possible? If so how can it be done?

Kind regards
Sidharth
Marin Bratanov
Telerik team
 answered on 23 Mar 2012
3 answers
140 views

 

I am experimenting with the Scheduler control that is part of he RadControls for ASP.NET AJAX version 2011.3.1305.35. Our customer has a requirement that the appointments in the month view show on two separate lines. e.g. a time range is on the first line and a name is on the second line. Is it possible to enlarge the appointments inthat particular view?

Thanks in advance.

Dave

Ivana
Telerik team
 answered on 23 Mar 2012
8 answers
168 views
We have had several users with this problem, but I am unable to replicate it on my system.  Near as I can tell, they edit a page, typing in text, save the page, and what is saved is not only the text they have typed but also many <br> tags both between the text that they've typed and after it.  Usually there are 5-21 lines of <br>s between text, but some of them have hundreds of <br>s after the text.  This is rendering our tool unusable.  We are currently using <!-- 2010.1.519.20 -->.  We thought initially that they were pasting from Word, but that is not the case.  We are trying to track users down and gather further information from them, and I'll report back any clarifying info I receive. Initial reports indicate it may be an IE issue and not a FF issue.  Any ideas people may have off the tops of your heads would be helpful.

Thanks!

Laurie
Laurie
Top achievements
Rank 2
 answered on 23 Mar 2012
1 answer
86 views
I have a radchart with names instead of numbers on the y axis.  However the names are getting cut off.  How can I add more space for them?

I've attached a picture so you can see what I'm talking about.
Javier
Top achievements
Rank 1
 answered on 23 Mar 2012
1 answer
93 views
Hi,

                           I am setting the restrict zone area dynamically on expand and collapse of slide panel.While the slide panel is in expanded mode my child window works fine on maximizing.But an issue occurs when my child window is maximized my slide panel goes behind the window on expansion or even the child window is placed to the extreme left the slide panel is unable to push the window to right.
                           I want my window functionality like outlook window.

Help me,

Thnx in advance
Marin Bratanov
Telerik team
 answered on 23 Mar 2012
3 answers
176 views
Hi,
I have a RadGrid which displays 250 rows and 18 Columns.
At present, because of our requirement, we can't allow paging.
The Header background color is Navy Blue and the Row Selected color is Light Blue.
However when I navigate between rows using the Keyboard down arrow, the Row Selected Color changes to the Header
background Color as it nears the viewable bottom area of the Grid and once it changes the color, any other row I select, the row selected color is the  Header background Color  not the original Light Blue I assigned.
Can you please let me know what might be the Issue?
Thanks
Srinivas
Andrey
Telerik team
 answered on 23 Mar 2012
1 answer
106 views
Hi, i want to know is exists any sample that show me how to add a combo (or check list) for display in may Scheduler only specific resource
Plamen
Telerik team
 answered on 23 Mar 2012
19 answers
240 views
Hi

               I have a RadAsyncUpload to upload the image. Using  another button named "UpLoad" generate the postback to upload the image.  Save the image in sql Server database in binary format. Retrieve the binary data from the database and set it to the datavalue property of the RadBinary image control. The radbinary image displays the image in it's original size.  I have set the width and height of the radbinary image as 200px but the the image is displayed in its original size.
 If i will generate a postback again then the image is set in 200px height and width. Please give the solution for this problem.
protected void Page_Load(object sender, EventArgs e)
        {
 
            binaryimage1.Height = Unit.Pixel(200);
            binaryimage1.Width = Unit.Pixel(200);
       
            b1.Click += new EventHandler(b1_Click);
 
        }
void b1_Click(object sender, EventArgs e)
        {
 
            foreach (Telerik.Web.UI.UploadedFile file in uploader.UploadedFiles)
            {
                byte[] bytes = new byte[file.ContentLength];
                string fname = file.FileName.ToString();
                int length = bytes.Length;
 
                file.InputStream.Read(bytes, 0, file.ContentLength);
 
                SqlConnection dbconn = new SqlConnection(strconn);
 
                try
                {
                    string Query = "INSERT INTO RadBinaryImageDemo (ImageData,ImageName) VALUES " + " (@imgdata,@imgname)";
                    SqlCommand cmd = new SqlCommand(Query, dbconn);
 
                    SqlParameter[] param = new SqlParameter[2];
 
                    cmd.Parameters.AddWithValue("@imgdata",bytes);
                    cmd.Parameters.AddWithValue("@imgname", file.FileName);
                    dbconn.Open();
                    cmd.ExecuteNonQuery();
                   
                    DataTable d1 = new DataTable();
                    string Query1 = "select ImageData from   RadBinaryImageDemo where ImageName='" + fname + "'";
                    SqlDataAdapter sqldadap = new SqlDataAdapter(Query1, dbconn);
                    sqldadap.Fill(d1);
 
                    byte[] imgdata = ((byte[])d1.Rows[0]["ImageData"]);
 
                    binaryimage1.DataValue = imgdata;
                     
                }
                finally
                {
                     
                        dbconn.Close();
                     
                }
            }
 
             
        }
danny lankar
Top achievements
Rank 1
 answered on 23 Mar 2012
3 answers
194 views
Hello.
I would like to set some settings in server-side.
So i want to enable bold and italics and font-size 22px and selected font Arial(those settings depend on user preferences)
I don't want to use ContentAreaCssFile(which can actually  set the font-weight bold but not make the B button look like it's pressed.Of course i can use js...).
Any ideas?Thanks.

tasos
Top achievements
Rank 1
 answered on 23 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?