Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
363 views
Hi,

I am trying to export the contents of a RadGrid to PDF but one of the rows has a cell with a long text. When I export it to PDF that cell spans across multiple columns. I tried to set the wrap mode to true but it still didn't work. See code snippet below:

 

private void ConfigurePDFExport()

 

{

 

this.RadGridStaff.ExportSettings.OpenInNewWindow = true;

 

 

this.RadGridStaff.ExportSettings.ExportOnlyData = true;

 

 

this.RadGridStaff.ExportSettings.IgnorePaging = true;

 

 

this.RadGridStaff.ExportSettings.Pdf.PageTitle = "Staff Test";

 

 

this.RadGridStaff.ExportSettings.Pdf.PageHeight = Unit.Parse("210mm", CultureInfo.InvariantCulture);

 

 

this.RadGridStaff.ExportSettings.Pdf.PageWidth = Unit.Parse("297mm", CultureInfo.InvariantCulture);

 

 

this.RadGridStaff.MasterTableView.Columns.FindByUniqueName("EditCommandColumn").Visible = false;

 

 

this.RadGridStaff.MasterTableView.Columns.FindByUniqueName("IssueColumn").Visible = false;

 

 

this.RadGridStaff.ExportSettings.FileName = "Staff";

 

RadGridStaff.MasterTableView.GetColumn(

"LastName").ItemStyle.Wrap = true;
}

If anyone knows how to fix this problem, please let me know.

Thanks,

Marlon.

 

Daniel
Telerik team
 answered on 20 Jul 2010
1 answer
62 views
How to assign  GridButtonColumn header text assign at running time ?

MasterTableView.Columns[2].HeaderText="My header text" won't work for GridButtonColumn -ButtonType="LinkButton", only works for GridBondColumn.

Thanks!

 

Daniel
Telerik team
 answered on 20 Jul 2010
2 answers
197 views
Hi,
I would like to Import excel data into the RadGrid.
1. Export the grid into Excel file using Telerik export options (grid.MasterTableView.ExportToExcel())
2. User can update the Excel file and import the excel data to into the Grid using (oleDB connection)
3. I am getting error while  reading the data from excel file to data set like (External table is not in the expected format)
           xConnStr = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + path + ";Extended Properties=\"Excel 8.0;HDR=YES;\"";
           string strCom = " SELECT * FROM [" + sheetName + "$] ";
            DataSet sourceDataSet = new DataSet();
            OleDbConnection conn = new OleDbConnection(xConnStr);
            OleDbDataAdapter adapter = new OleDbDataAdapter();
            adapter.SelectCommand = new OleDbCommand(strCom, conn);
            adapter.Fill(sourceDataSet);
            conn.Close();

4. Any idea let me know ?

How to read the excel file that was created by  grid.MasterTableView.ExportToExcel()?

Thanks,
Sabarish.


Daniel
Telerik team
 answered on 20 Jul 2010
1 answer
149 views
i have a Master page and Content form.
i see this train page
i need a sample for using RadAjaxManagerProxy .
how to use this solution?
Cori
Top achievements
Rank 2
 answered on 20 Jul 2010
1 answer
92 views
here a help of ajax and user control :
http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/usercontrol/defaultcs.aspx

i need a sample with master page (No User Control)
Cori
Top achievements
Rank 2
 answered on 20 Jul 2010
2 answers
100 views
Hello I want to show a popup on mouseover of each redgridcell. please tell me how to do this.

my scenario is some thing like this...

In my ascx file i have a radgrid
 
<telerik:RadGrid ID="gvDayWiseCashReport" runat="server" AutoGenerateColumns="False"
                GridLines="None" OnItemDataBound="gvDayWiseCashReport_ItemDataBound">
                <MasterTableView>
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                </MasterTableView>
            </telerik:RadGrid>
In my code Behind on button click event i have written some code to populate radgrid

protected void btnSearch_Click(object sender, EventArgs e)
    {
        DaysList daysforList = null;
        Month = int.Parse(ddlMonth.SelectedValue);
        Year = int.Parse(ddlYear.SelectedValue);
 
        GetDates dates = new GetDates();
        FirstDate = dates.GetFirstDayOfMonth(Month, Year);
        LastDate = dates.GetLastDayOfMonth(Month, Year);
 
        days = System.DateTime.DaysInMonth(int.Parse(ddlYear.SelectedItem.Value), int.Parse(ddlMonth.SelectedValue)).ToString();
        int NoofDays = int.Parse(days);
 
        DataSet ds = new DataSet();
        DateTime date;
        CustomSQLCommand command = new CustomSQLCommand(@"select distinct Purpose,Others from tbl_CashRequest req left join tbl_CashPurpose purpose
        on purpose.ID=req.CashPurposeID", false);
        ds = command.ExecuteDataSet();
 
        gvDayWiseCashReport.DataSource = null;
        gvDayWiseCashReport.MasterTableView.Columns.Clear();
        gvDayWiseCashReport.DataBind();
 
        gvDayWiseCashReport.DataSource = ds;
 
        GridBoundColumn boundColumn;
        boundColumn = new GridBoundColumn();
        boundColumn.DataField = "Purpose";
        gvDayWiseCashReport.MasterTableView.Columns.Add(boundColumn);
 
 
        for (int i = 1; i <= NoofDays; i++)
        {
            date = dates.GetDate(int.Parse(ddlMonth.SelectedValue), int.Parse(ddlYear.SelectedItem.Value), i);
            string strDay = date.DayOfWeek.ToString();
            int Day = 0;
            CustomSQLCommand getDay = new CustomSQLCommand(@"select ID from tbl_PreferedTransferDay where PrefferedDay='" + @strDay + "'", false);
            try { Day = int.Parse(getDay.ExecuteScalar()); }
            catch { }
 
            if (Day != 0 && Day != null)
            {
                daysforList = new DaysList();
                GridBoundColumn boundColumn1;
                boundColumn1 = new GridBoundColumn();
 
                boundColumn1.HeaderText = String.Format("{0:ddd, MMM d, yyyy}", date);
                gvDayWiseCashReport.MasterTableView.Columns.Add(boundColumn1);
                daysforList.Day = date;
                daysforList.DayID = Day;
 
                ListDays.Add(daysforList);
            }
            Day = 0;
        }
 
        gvDayWiseCashReport.DataBind();
         
    }
then in my item databound i have logics in which i am add values to each cell of radgrid. Here when i have some value on cell i have some data to show when user mouseovers on a particular cell.
Here i have some code in my itemdatabound
 
for (int i = 0; i < ListDays.Count; i++)
            {
                for (int j = 0; j < detList.Count; j++)
                {
                    if (e.Item.ItemIndex == detList[j].ItemIndex && ((i + 3) == detList[j].CellNo))
                    {
                         
                        e.Item.Cells[i + 3].ToolTip = e.Item.Cells[i + 3].ToolTip + " Request Remarks: " + detList[j].Remarks + " Requester ID :" + detList[j].RequestID + " Requested Installment Amount :" + detList[j].Amount + "\r\n";
 
                        string val = e.Item.Cells[i + 3].ToolTip;
                                           }
                }
            }
 
I have logics in my itemdatabound which i have not given here.
 
in my item databound i am displaying with the using normal tooltip but if i want to do the same for a pop up or radtooltip, How can i do this? i dont want any more control in my radgrid and i have some repeated data for same cell so i have stored it in tooltip and used when repeated data  comes i have used the same tooltip and other value. please tell me how can i do this.
shahid Aleem
Top achievements
Rank 1
 answered on 20 Jul 2010
3 answers
111 views
For some reason, whenever I start an upload/process in IE, it first shows the RadProgress Area for a few seconds, I watch the progress display change over time, then for no apparent reason, it forwards me to a new URL that displays an error message.  So, for example, if I started at: http://localhost:50194/ImportData.aspx, I wind up at http://localhost:50194/ImportData.aspx?RadUrid=2d7295a3-719d-4012-a7bf-6c2e5167960a.  Not sure what the RadUrid is.

This does not happen in FireFox. 

Aaron
Top achievements
Rank 2
 answered on 20 Jul 2010
1 answer
296 views

Hello.
I’m currently working with RadControls_for_ASP.NET_AJAX_2010_1_519_dev

I have a RadAsyncUpload and two asp buttons in the same form, Cancel and OK.
When pressed the Ok button, a server side event is raised and I get the file name, extension and content type from the file just uploaded looking at RadAsyncUpload.UploadedFileCollection.
So far so good.

My problem is that I need to know when looking into UploadedFileCollection if the file was removed using the integrated Remove button in RadAsyncUpload.
UploadedFileCollection doesn’t seem to be affected by the Remove operation made, as the file item still remains there.

What am I missing?


Alberto
Top achievements
Rank 1
 answered on 20 Jul 2010
1 answer
122 views
Hello:

Are there any known issues with disabling a button on the client in WebKit browsers?  I would like to disable the buttons on the client, for example when the page is sumbmitted. This works fine without RadFormDecorator, but with RadFormDecorator, it doesn't work in Safari or Chrome.  The button gets disabled, but style doesn't change.  I was hoping for something that would be seamless between when the decorator is in use or not use so I don't have any custom javascript just for RadFormDecorator and can remove or disable it at will.  Here is a quick example aspx page that correcly changes the style in Firefox and IE, but not in Chrome/Safari.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
    <telerik:RadScriptBlock runat="server" ID="RadScriptBlock1">
    <script type="text/javascript">
        function test() {
            document.getElementById('<%= btnTest.ClientID %>').disabled = true;
        }
    </script>
    </telerik:RadScriptBlock>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <telerik:RadFormDecorator enabled="true" runat="server" ID="RadFormDecorator1" DecoratedControls="Buttons" />
        <asp:Button runat="server" ID="btnTest" Text="Disable Me" />
        <br />
        <br />
        <input type="button" value="Go" onclick="test();" />
    </div>
    </form>
</body>
</html>
Petio Petkov
Telerik team
 answered on 20 Jul 2010
1 answer
126 views
Hi Telerik team


I am using the radeditor's CustomToolStrip to group number of links and I configure the whole editor in the xml file.  here is the link toolstrip

 <EditorToolStrip name="Links" PopupHeight="250px"  Text="Insert Links">
      <EditorTool name="InsertHyperlink" Text="Insert aaa"/>
      <EditorTool name="InsertLinkForwardToAFriend" Text="Insert bbbb" />
      <EditorTool name="InsertLinkToReferAFriend" Text="Insert Refer a Friend Link" />
      <EditorTool name="InsertSmartShare" Text="Insert Smart Share Link" />
      <EditorTool name="InsertBookmark" Text="Insert Bookmark"/>
      <EditorTool name="InsertLandingPage" Text ="Insert Link To Landing Page "/>
      <EditorTool name="InsertLinkToForm" Text="Insert Link To Form" />
      <EditorTool name="InsertLinkToSubForm" Text="Insert Link To Subscription Form" />
      <EditorTool name="InsertPrefCentre" Text ="Insert Link To Preference Centre "/>
      <EditorTool name="InsertWebVer" Text =" Insert Link To Web Version"/>
      <EditorTool name="InsertUnsub" Text ="Insert Unsubscribe Link "/>
      <EditorTool name="InsertLinkToFile" Text="Insert Link to File"/>
    </EditorToolStrip>  

It always display "Insert aaa" when I hover this toolStrip, what I want is to display "Insert Links" .

I hope it does make sense.
Dobromir
Telerik team
 answered on 20 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?