Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
60 views
I have a grid, and I want to export it to pdf and attach the file to an e-mail.

It seems like after calling ExportToPdf() the file is always opened. Is it possible to just save the pdf without opening it first?


Regards, Jill-Connie Lorentsen
Daniel
Telerik team
 answered on 07 Dec 2012
9 answers
193 views
Hello

I need to sub class the RadComboBox, and i want the good syntax to override the SelectedValue,

Cause i my value isn't find on the list , i want to get the error.

public override string SelectedValue
    {
        get { return _SelectedValue; }
        set { _SelectedValue = value; }
         
    }

thanks
Olivier,
Cat Cheshire
Top achievements
Rank 1
 answered on 07 Dec 2012
4 answers
138 views
I have used telerik rad grid client-side programmatic binding. Every thing working fine but when we export data to pdf, it is asking password. How to open this pdf?

Radgrid.AutoGenerateColumns = true;
       Radgrid.MasterTableView.AllowPaging = true;
       Radgrid.MasterTableView.IsItemInserted = true;
       Radgrid.ExportSettings.OpenInNewWindow = true;
       Radgrid.AllowFilteringByColumn = false;
       Radgrid.ExportSettings.ExportOnlyData = true;
       Radgrid.ExportSettings.HideStructureColumns = true;
       Radgrid.MasterTableView.HierarchyDefaultExpanded = false;
       Radgrid.MasterTableView.NestedViewTemplate = null;
       Radgrid.MasterTableView.HierarchyDefaultExpanded = false;
       Radgrid.MasterTableView.ClearChildEditItems();
       Radgrid.ExportSettings.FileName = filename;
       Radgrid.ExportSettings.Excel.Format = GridExcelExportFormat.Html;
       Radgrid.MasterTableView.ExportToPdf();
        

Thanks in advance.
Daniel
Telerik team
 answered on 07 Dec 2012
1 answer
44 views
Hi

I have a page with a list of categories, represented as a RadGrid (called CategoryRadGrid).
To the right of this list I have another RadGrid (called CategoryDetailRadGrid) which basically shows detailed information about a row in the first grid.


So when you click on a row in CategoryRadGrid (containing a subset of info about a category), every detail about this category is shown in CategoryDetailRadGrid.

CategoryDetailRadGrid has the column headers from CategoryRadGrid as rows with corresponding values for the category (hiding it's header of course).

Binding is done client-side.

What I want to do is this:
I want to be able to drag a row from CategoryDetailRadGrid to CategoryRadGrid (preferrably to the header section, containing column names) as to indicate that I want to extend CategoryRadGrid with a new column.
And I want to do this vice versa, i.e. drag a column from CategoryRadGrid to CategoryDetailRadGrid to remove it from CategoryRadGrid.

So far I've only managed to intercept the client event, OnRowDropped, when I drag a row from CategoryDetailRadGrid to the rows in CategoryRadGrid (which I as mentioned would like to be able to drag to the header part instead),

Any suggestions?

Regards

Christian
Maria Ilieva
Telerik team
 answered on 07 Dec 2012
1 answer
70 views
Hi ,

I have report page with rad controls,  the rad combo box has a compare validator . There is a clear button. If you do not select any thing in the combo box, the compare validator throws an error message but on clicking of clear button h message does not get cleared, it is clearing only after the second click on clear button. I have tried giving auto post back true for clear button but it did not cause any difference. Also if i remove the validator then all other messages get cleared on the very first click.

Please Help. Thanks in Advance
Cat Cheshire
Top achievements
Rank 1
 answered on 07 Dec 2012
9 answers
157 views
How can I set the current page index on client side.  I have used all of the below and none of them seem to change the index.

ClientEvents-OnDataBound

 

ClientEvents-OnDataBinding
ClientEvents-OnGridCreated
ClientEvents-OnGridCreating
ClientEvents-OnMasterTableViewCreated
ClientEvents-OnMasterTableViewCreating

 

 

 

Also, here is my code below:

function
rgSchoolMonitor_OnDataBinding()

 

{

 

var grid = $find("<%=rgSchoolMonitor.ClientID %>");

 

 

var masterTableView = grid.get_masterTableView();

 

 

 

var pageCount = masterTableView.get_pageCount();

 

 

if (pageCount > 1)

 

{

 

//Need to Iterate Through Pages

 

 

var pageIndex = masterTableView.get_currentPageIndex();

 

 

 

if ((pageIndex + 1) > (pageCount - 1))

 

{

masterTableView.set_currentPageIndex(0);

}

 

else

 

{

masterTableView.set_currentPageIndex((pageIndex + 1));

}

 

 

}

 

}


Thanks,
Nick
Eyup
Telerik team
 answered on 07 Dec 2012
3 answers
270 views
Hi,

I am liking this new control, but I have one challenge.
My data has a variable number of columns returned.
I would like to set the column widths (beyond the 1st one) to a fixed size.
However, the column widths appear to be adjusted to fill up the available space.

Any thoughts?

Jim

<telerik:RadPivotGrid ID="grdRACI" runat="server" AllowFiltering="False" DataSourceID="sqlRACI" ClientSettings-Scrolling-AllowVerticalScroll="false"
                        TotalsSettings-GrandTotalsVisibility="None" Skin="Vista" AggregatesLevel="-1" ColumnHeaderCellStyle-Width="100px" RowHeaderCellStyle-Width="400px"
                        AggregatesPosition="Columns" OnCellDataBound="grdRACI_CellDataBound" IsFilterCommandInProgress="False" DataCellStyle-Width="100px" RowHeaderTableLayout="Fixed" ColumnHeaderTableLayout="Fixed"
                        ShowColumnHeaderZone="False" ShowDataHeaderZone="False" ShowFilterHeaderZone="False">
                        <Fields>
                            <telerik:PivotGridRowField DataField="Task" UniqueName="column">
                            </telerik:PivotGridRowField>
                            <telerik:PivotGridColumnField DataField="RoleName" UniqueName="column1">
                            </telerik:PivotGridColumnField>
                            <telerik:PivotGridAggregateField DataField="RACI" Aggregate="Max" GrandTotalAggregateFormatString=""
                                UniqueName="column2">
                            </telerik:PivotGridAggregateField>
                        </Fields>
                        <TotalsSettings GrandTotalsVisibility="None" />
                        <ConfigurationPanelSettings Position="FieldsWindow" />
                    </telerik:RadPivotGrid>
 
    protected void grdRACI_CellDataBound(object sender, PivotGridCellDataBoundEventArgs e)
    {
        if (e.Cell is PivotGridColumnHeaderCell)
        {
            PivotGridColumnHeaderCell cell = e.Cell as PivotGridColumnHeaderCell;
            cell.HorizontalAlign = HorizontalAlign.Center;
            cell.Wrap = true;
        }
 
        if (e.Cell is PivotGridDataCell)
        {
            Color CFFD_Highlight = Color.Beige;
 
            PivotGridDataCell dataCell = e.Cell as PivotGridDataCell;
            if (dataCell != null)
            {
                switch (dataCell.Text)
                {
                    case ("1"):
                        dataCell.Text = "R";
                        break;
                    case ("2"):
                        dataCell.Text = "A";
                        break;
                    case ("3"):
                        dataCell.Text = "C";
                        break;
                    case ("4"):
                        dataCell.Text = "I";
                        break;
                    case ("5"):
                        dataCell.Text = "R/A";
                        break;
                    case ("10"):
                        dataCell.Text = "R";
                        dataCell.BackColor = CFFD_Highlight;
                        break;
                    case ("20"):
                        dataCell.Text = "A";
                        dataCell.BackColor = CFFD_Highlight;
                        break;
                    case ("30"):
                        dataCell.Text = "C";
                        dataCell.BackColor = CFFD_Highlight;
                        break;
                    case ("40"):
                        dataCell.Text = "I";
                        dataCell.BackColor = CFFD_Highlight;
                        break;
                    case ("50"):
                        dataCell.Text = "R/A";
                        dataCell.BackColor = CFFD_Highlight;
                        break;
                }
                dataCell.HorizontalAlign = HorizontalAlign.Center;
            }
        }
    }
Antonio Stoilkov
Telerik team
 answered on 07 Dec 2012
1 answer
116 views
How to hide previous and first page arrow buttons on page 1and nextand last page arrows
On last page
Princy
Top achievements
Rank 2
 answered on 07 Dec 2012
1 answer
57 views
How to give header to grid expand column.
Shinu
Top achievements
Rank 2
 answered on 07 Dec 2012
8 answers
479 views
I have a RadBinaryImage control which is displaying an image loaded using RadAsyncUpload.

I have an SQL table containing a 'Photo' column (image data type). How to pass the RadBinaryImage to the insert function which look like this:

Private Sub InsertPhotoIntoDB()
        Dim sMyConn As String = My.Settings.appDBConnString
        Dim myConnection As SqlConnection
        Dim myCommand As New SqlCommand
        myConnection = New SqlConnection(sMyConn)
 
        myConnection.Open()
 
        myCommand = New SqlCommand("INSERT INTO Photos(Photo) VALUES(@Photo)")
        myCommand.Connection = myConnection
 
        myCommand.Parameters.Add("@Photo", SqlDbType.Image, 0, "Photo")
        myCommand.Parameters("@Photo").Value = WhatDoIPutHere???
 
        myCommand.ExecuteNonQuery()
 
        myConnection.Close()
        myConnection.Dispose()
End Sub
Emil
Top achievements
Rank 2
 answered on 07 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?