Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
150 views
Hi,

AsyncUpload Control  drop (carry) uploaded image file from "TemporaryFolder" to "TargetFolder" when any postback.

I want to control this drop fonction. I think a functionality like :   AsyncUpload1.AutoDrop = False;    And   AsyncUpload1.Commit();   

For ex:   error occurs when I run this code

1. I choose a image file via AsyncUpload 
2. AsyncUpload  upload Image File to Temprorary folder
3. I click to btn1  (I try to get Image File  Data in this moment and delete image file from Temp Folder after my process ) 
4. Error occurs


Do you have a solution for this scenario?


Could not find file 'D:\PRO\XBonWebSite\Co\Images\Test\Test\13801147907892e4jam1.jpg'.




    <asp:Panel ID="pnl1" runat="server">
        <asp:Label ID="lbl1" runat="server" Text="xx"></asp:Label>
        <telerik:RadAsyncUpload ID="AsyncUpload1" runat="server" OnFileUploaded="AsyncUpload1_FileUploaded" MaxFileSize="2097152" AllowedFileExtensions="jpg,png,gif"   AutoAddFileInputs="false" Localization-Select="Resim Ekle" Localization-Remove="Sil" TargetFolder="~/Co/Images/Test/Org/" TemporaryFolder="~/Co/Images/Test/Test/" HttpHandlerUrl="~/Co/Handlers/TelerikAsyncUploadHandler.ashx">
     </telerik:RadAsyncUpload>
    </asp:Panel>
    <asp:Button ID="btn1" runat="server" Text="btn1" OnClick="btn1_Click" />




  protected void Page_Load(object sender, EventArgs e)
    {
        lbl1.Text = DateTime.Now.ToString();
    }
    
protected void btn1_Click(object sender, EventArgs e)  
    {      
       var len = AsyncUpload1.UploadedFiles[0].InputStream.Length;    
    }

    
protected void AsyncUpload1_FileUploaded(object sender, Telerik.Web.UI.FileUploadedEventArgs e){
        lbl1.Text +=
" FileUploaded";  
    }





Haluk
Top achievements
Rank 1
 answered on 27 Sep 2013
5 answers
576 views
Hello,

i think my Problem has something to do with the fact that my button is in a different contentplaceholder.

I will explain it.

<asp:Content ID="Content2" ContentPlaceHolderID="cphContent" runat="server">
<telerik:RadTabStrip ID="radtsVermittlerBearbeiten" runat="server" Skin="Windows7" MultiPageID="rmpVermittlerBearbeiten"
    SelectedIndex="1" CssClass="tabStripVRbeTopBoarder" OnClientTabSelected="OnClientTabSelected">
    <Tabs>
        <telerik:RadTab IsSeparator="true" Width="3px">
        </telerik:RadTab>
        <telerik:RadTab Text="Allgemein" Value="1">
        </telerik:RadTab>
        <telerik:RadTab IsSeparator="true" Width="2px">
        </telerik:RadTab>
        <telerik:RadTab Text="Sparte" Value="2">
        </telerik:RadTab>
    </Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="rmpVermittlerBearbeiten" runat="server" SelectedIndex="1">
    <telerik:RadPageView ID="radpvSeparator1" runat="server" Enabled="false"></telerik:RadPageView>
    <telerik:RadPageView ID="radpvAllgemein" runat="server" CssClass="tabStipVRBe">
    </telerik:RadPageView>
    <telerik:RadPageView ID="radpvSeparator2" runat="server" Enabled="false"></telerik:RadPageView>
    <telerik:RadPageView ID="radpvSparte" runat="server" CssClass="tabStipVRBe">
    </telerik:RadPageView>
</telerik:RadMultiPage>
</asp:Content>

I have this RadTabStrip in this ContentPlaceHolderID="cphContent".

If someone click on any Tab i call this jquery Function:

function OnClientTabSelected(sender, eventArgs) {
    var tab = eventArgs.get_tab();
    var tabName = tab.get_text();
    switch (tabName) {
        case 'Allgemein':
            break;
        case 'Sparte':
            var radButton = $find("rbtnWeiterSpartenAnlegen");
            radButton.set_visible(true);
            break;
    };
}

in case "Sparte" i try to find "rbtnWeiterSpartenAnlegen" which is in a diffrent ContentPlaceHolder

<asp:Content ID="Content4" ContentPlaceHolderID="cphFooter" runat="server">
<div class="btnLeiste_zeile">
    <telerik:RadButton ID="rbtnWeiterSpartenAnlegen" runat="server" Text="Weiter" Width="150px"></telerik:RadButton>
</asp:Content>

The result is, i get null back. So what to do now?

I hope someone can help me. Thank you
Daniel
Top achievements
Rank 1
 answered on 27 Sep 2013
1 answer
145 views
Hello,

I am trying to achieve a combination of a stacked and unstacked Columnchart as shown in the screenshot.

If I set the Stacked property of all 3 series to true, the columns are shown stacked. If I set one to false and the others to true, none of them is stacked.

thanks
Stefan
Danail Vasilev
Telerik team
 answered on 27 Sep 2013
5 answers
238 views
What I would like to do is hide the title bar of the radwindow and use a close window linkbutton for a radwindow so it smore defined and people understand how to close the radwindow.  This will be no problem but what I need it to do is upon cl;ose of the radwindow I need the page to refresh itself by calling my page load sub so this way the changes they made in the radwindow are reflected on the page.  How can I do this?  Thank you
Shinu
Top achievements
Rank 2
 answered on 27 Sep 2013
3 answers
147 views

Having some difficulties working with the MasterTable and the DetailTable within my Grid.  I have it to the point I would like it but need some minor adjustments and I believe I have what I am looking for.
How do I get the CartID from the MasterTable passed to my DetailTable Datasource. 

<telerik:RadGrid ID="_grdHistory" runat="server" AutoGenerateColumns="False"
                    CellSpacing="0" GridLines="None">
                    <MasterTableView>
                    <DetailTables>
                    <telerik:GridTableView DataKeyNames="CartID" DataSourceID="SqlDataSource3" Width="100%" runat="server" EnableHeaderContextMenu="false">
                        <ParentTableRelation>
                            <telerik:GridRelationFields DetailKeyField="CartID" MasterKeyField="CartID">
                            </telerik:GridRelationFields>
                        </ParentTableRelation>
                        <Columns>
                            <telerik:GridBoundColumn SortExpression="CartID" HeaderText="CartID" DataField="CartID" UniqueName="CartID" Display="True">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="ItemName" HeaderText="Item Name" DataField="ItemName" UniqueName="ItemName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="ItemCnt" HeaderText="Item Cnt" DataField="ItemCnt" UniqueName="ItemCnt">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="TotItemCost" HeaderText="Item Cnt" DataField="TotItemCost" UniqueName="TotItemCost">
                            </telerik:GridBoundColumn>
                        </Columns>
                    </telerik:GridTableView>
 
                    </DetailTables>
 
 
                    <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
 
                    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
 
                        <Columns>
                            <telerik:GridHyperLinkColumn AllowSorting="False"
                                FilterControlAltText="Filter InvoiceID column" HeaderText="INVOICE #"
                                UniqueName="InvoiceID" DataNavigateUrlFields="InvoiceID"
                                DataNavigateUrlFormatString="OrderHistoryDetail.aspx?ID={0}"
                                DataTextField="InvoiceID" Target="_blank">
                            </telerik:GridHyperLinkColumn>
                            <telerik:GridBoundColumn DataField="Order_Date"
                                FilterControlAltText="Filter column1 column" HeaderText="ORDER DATE"
                                UniqueName="column1" DataFormatString="{0:MM/dd/yyyy}">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Order_Amt"
                                FilterControlAltText="Filter column1 column" HeaderText="ORDER AMOUNT"
                                UniqueName="column1" DataFormatString="{0:c}" ItemStyle-HorizontalAlign="Right">
                                <ItemStyle HorizontalAlign="Right"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="OrderedByName"
                                FilterControlAltText="Filter column1 column" HeaderText="ORDERED BY"
                                UniqueName="column1">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Shipped"
                                FilterControlAltText="Filter column1 column" HeaderText="SHIPPED"
                                UniqueName="column1" DataFormatString="{0:MM/dd/yyyy}">
                            </telerik:GridBoundColumn>
                            <telerik:GridHyperLinkColumn AllowSorting="False" DataTextField="FedExTrack"
                                DataNavigateUrlFields="FedExTrack"
                                FilterControlAltText="Filter column3 column"
                                ImageUrl="~/images/FedEx-Shipping-Box-icon.png"
                                DataNavigateUrlFormatString="http://www.fedex.com/Tracking?action=track&;tracknumbers={0}"
                                UniqueName="FedExTrack" Target="_blank">
                            </telerik:GridHyperLinkColumn>
                            <telerik:GridBoundColumn DataField="Approved"
                                FilterControlAltText="Filter column1 column" 
                                UniqueName="Approved" ItemStyle-HorizontalAlign="Right" Display="False">
                                <ItemStyle HorizontalAlign="Right"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CartID"
                                FilterControlAltText="Filter CartID column" 
                                UniqueName="CartID" ItemStyle-HorizontalAlign="Right" Display="False">
                                <ItemStyle HorizontalAlign="Right"></ItemStyle>
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
            </td></tr>
            </table>
        </td>
    </tr>
</table>
                    <asp:SqlDataSource ID="SqlDataSource3" ConnectionString="<%$ ConnectionStrings:PHConn %>"
                        SelectCommand="sp_getCartDetail" SelectCommandType="StoredProcedure"
                        runat="server">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="_grdHistory" Name="CartID"
                                PropertyName="SelectedValue" Type="Int32" />
                        </SelectParameters>
                    </asp:SqlDataSource>

Also what I would like to do is if column "Approved" is NULL/blank then change the 1st column to "Pending".  Likewise with FedExTrack, I would like to show it as blank and not show the image.  How can I go about accomplishing these two items.  Below is the code I started with but when I added the DetailTable it broke my logic.

Sub PopulateData()
    Try
        oConn.Open()
        Dim ocmd As New SqlCommand("sp_getOrderHistoryFilter", oConn)
        ocmd.CommandType = CommandType.StoredProcedure
        With ocmd.Parameters
            .Add(New SqlParameter("@asi_num", Session("asi_num")))
            .Add(New SqlParameter("@Date1", DBNull.Value))
            .Add(New SqlParameter("@Date2", DBNull.Value))
            .Add(New SqlParameter("@Area", DBNull.Value))
        End With
        reader = ocmd.ExecuteReader()
        Me._grdHistory.DataSource = reader
        Me._grdHistory.DataBind()
    Catch ex As Exception
 
    Finally
        oConn.Close()
    End Try
End Sub
 
Private Sub _grdHistory_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles _grdHistory.ItemDataBound
    If TypeOf e.Item Is GridDataItem Then
        'This does not appear to be working at this time.
        'Purpose is to display different text if the order has not been approved yet
        'If e.Item.Cells(8).Text = " " Then
        '    e.Item.Cells(1).Text = "Pending"
        '    e.Item.Cells(1).Font.Italic = True
        'End If
 
        'If e.Item.Cells(6).Text = " " Then 'Hide Shipping if there is no data
        '    e.Item.Cells(7).Text = ""
        'End If
    End If
 
End Sub







Princy
Top achievements
Rank 2
 answered on 27 Sep 2013
7 answers
241 views
I am throwing my arms up in the air.

I have a radwindow set to autosize. I have a fixed width and height div on my page. Sometimes the window opens correct, other times it opens with scroll bars. Please see attached images of me opening the exact item. (Ignore radwindow.png) Sometimes its right, sometimes not.

There does not seem to be any rhyme or reason for this. I really need help because I have to deliver this to the client 2 weeks ago.

Thanks


(btw, how do you delete a file from a post once its uploaded?)




Kim
Top achievements
Rank 1
 answered on 27 Sep 2013
3 answers
168 views

i had used GridGroupByField to display some information in group header.

as i need to add a checkbox to select all node/row, i had added a checkbox column in groupheadertemplate

but all the information in group header disappear after add the groupheadertemplate.

how can i solve it ? thanks.

               <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" 
                    AllowMultiRowSelection="True" AllowPaging="True" AllowSorting="True" 
                    AutoGenerateColumns="False" CellSpacing="0" DataSourceID="ldsPayrollFlow" 
                    EnableAJAX="true" EnableAJAXLoadingTemplate="true" GridLines="None" 
                    LoadingTemplateTransparency="25" PageSize="100" Width="1180px">
  
                    <PagerStyle Mode="NumericPages"></PagerStyle>
                                   
                    <mastertableview datakeynames="SID" datasourceid="ldsPayrollFlow" 
                    grouploadmode="Client">
                        <commanditemsettings exporttopdftext="Export to Pdf"></commanditemsettings>
                        <rowindicatorcolumn>
                            <HeaderStyle Width="10px"></HeaderStyle>
                  
                        </rowindicatorcolumn>
                        <expandcollapsecolumn>
                            <HeaderStyle Width="10px"></HeaderStyle>
                  
                        </expandcollapsecolumn>
  
                        <groupbyexpressions>                                               
                        <telerik:GridGroupByExpression> 
                            <selectfields> 
                                <telerik:GridGroupByField FieldAlias="DisplayName" 
                                FieldName="DisplayName" HeaderText="Staff Name" HeaderValueSeparator="  : "></telerik:GridGroupByField> 
                            </selectfields> 
                            <groupbyfields> 
                                <telerik:GridGroupByField FieldName="DisplayName"></telerik:GridGroupByField> 
                            </groupbyfields>                         
                            </telerik:GridGroupByExpression> 
                        </groupbyexpressions> 
  
                        <groupheadertemplate>
                            <asp:CheckBox ID="GroupHeaderCheckBox" runat="server" 
                            OnClick="GroupToggleSelection(this);" ToggleType="CheckBox" ToolTip ="Select this staff">
                            </asp:CheckBox>     
                            <asp:Label ID="lb_staff_detail" runat="server" Text=""></asp:Label>                                                                                              
                        </groupheadertemplate>
  
                        <Columns>
  
                            <telerik:GridBoundColumn DataField="SID" HeaderText="SID" ReadOnly="True" 
                                SortExpression="SID" UniqueName="SID" Visible="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn AllowFiltering="true" DataField="StaffNo" 
                                HeaderStyle-Width="100" HeaderText="Staff Number" ReadOnly="True" 
                                SortExpression="StaffNo" UniqueName="StaffNo">
                                <ItemStyle BackColor="White" BorderColor="ActiveBorder" 
                                Font-Underline="false" ForeColor="Black" />
                            </telerik:GridBoundColumn>                            
                            <telerik:GridBoundColumn AllowFiltering="true" DataField="DisplayName" 
                                HeaderStyle-Width="100" HeaderText="Staff Name" ReadOnly="True" 
                                SortExpression="DisplayName" UniqueName="DisplayName"><ItemStyle 
                                BackColor="White" BorderColor="ActiveBorder" Font-Underline="false" 
                                ForeColor="black" />
                            </telerik:GridBoundColumn>                            
                            <telerik:GridBoundColumn AllowFiltering="true" DataField="Department" 
                                HeaderStyle-Width="100" HeaderText="Department" ReadOnly="True" 
                                SortExpression="Department" UniqueName="Department">
                                <ItemStyle BackColor="White" BorderColor="ActiveBorder" 
                                Font-Underline="false" ForeColor="Black" />
                            </telerik:GridBoundColumn>                            
                            <telerik:GridBoundColumn AllowFiltering="true" DataField="BasicSalaryMonthly" ItemStyle-CssClass="cellalignRight"
                                DataFormatString="{0:G}" HeaderStyle-Width="100" HeaderText="Basic Salary" ItemStyle-HorizontalAlign="Right" 
                                ReadOnly="True" SortExpression="BasicSalaryMonthly" 
                                UniqueName="BasicSalaryMonthly"><ItemStyle BackColor="White" 
                                BorderColor="ActiveBorder" Font-Underline="false" ForeColor="Black" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn AllowFiltering="true" DataField="AllowanceName" 
                                HeaderStyle-Width="150" HeaderText="Allowance Name" ReadOnly="True" 
                                SortExpression="AllowanceName" UniqueName="AllowanceName"><ItemStyle 
                                BackColor="White" BorderColor="ActiveBorder" Font-Underline="false" 
                                ForeColor="Black" />
                            </telerik:GridBoundColumn>                            
                            <telerik:GridBoundColumn AllowFiltering="true" DataField="AllowanceAmount" 
                                DataFormatString="{0:G}" HeaderStyle-Width="100" HeaderText="Amount" ItemStyle-HorizontalAlign="Right"
                                ReadOnly="True" SortExpression="AllowanceAmount" UniqueName="AllowanceAmount"><ItemStyle 
                                BackColor="White" BorderColor="ActiveBorder" Font-Underline="false" 
                                ForeColor="Black" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn AllowFiltering="true" DataField="UpdateDate" DataFormatString="{0:dd-MMM-yyyy}" 
                                HeaderStyle-Width="100" HeaderText="Last Updated Date" ReadOnly="True" DataType="System.DateTime" 
                                SortExpression="UpdateDate" UniqueName="UpdateDate"><ItemStyle 
                                BackColor="White" BorderColor="ActiveBorder" Font-Underline="false" 
                                ForeColor="Black" />
                            </telerik:GridBoundColumn>                            
                            <telerik:GridBoundColumn AllowFiltering="true" DataField="FlowDate" DataFormatString="{0:dd-MMM-yyyy}" 
                                HeaderStyle-Width="100" HeaderText="Last Flow Date" ReadOnly="True" DataType="System.DateTime" 
                                SortExpression="FlowDate" UniqueName="FlowDate"><ItemStyle 
                                BackColor="White" BorderColor="ActiveBorder" Font-Underline="false" 
                                ForeColor="Black" />
                            </telerik:GridBoundColumn>                            
                            <telerik:GridClientSelectColumn Display="false" HeaderStyle-Width="10" 
                                UniqueName="ClientSelectColumn" Visible="true"> 
                                </telerik:GridClientSelectColumn>
  
  
                            </Columns>
                  
                    </mastertableview>
                                <clientsettings>
                <selecting allowrowselect="true"></selecting>
                <ClientEvents OnRowSelecting="Selecting" />
<%--                <resizing allowcolumnresize="True" allowrowresize="True" 
                    enablerealtimeresize="True" resizegridoncolumnresize="False"></resizing>--%>
            </clientsettings>
                </telerik:RadGrid>
Shinu
Top achievements
Rank 2
 answered on 27 Sep 2013
7 answers
551 views
I have a grid and a telerik button.  When I click the button I want a Save As prompt dialog to appear so the user can change the file name and save the file locally to whichever destination they choose.  But when I click on my button nothing happens?  I am testing this through localhost\ does this function not work unless its run from the actual server? Or should it behave the same even when running from localhost? Here is a copy of my grid.

                                                  <telerik:RadAjaxPanel ID="pnlUpload" runat="server" height="580px" width="980px" LoadingPanelID="lpnUpload">  

  <telerik:RadButton ID="cmdExportPayrolFile" runat="server" Enabled="False" Skin="Metro" Text="Export Payroll File">
                                                    </telerik:RadButton>

<telerik:RadGrid ID="dgExportReport" runat="server" AllowPaging="True" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" Skin="Sitefinity" Width="100%">
                                            <ExportSettings>
                                                <Csv ColumnDelimiter="Comma"
                                                     RowDelimiter="NewLine"
                                                     EncloseDataWithQuotes="False"
                                                     FileExtension ="txt"
                                                 />
                                            </ExportSettings>
                                            <MasterTableView PageSize="15">
                                                <Columns>
                                                    <telerik:GridBoundColumn DataField="EmplID" FilterControlAltText="" HeaderText="Emp Id" UniqueName="dgEmplID">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="FullName" FilterControlAltText="" HeaderText="Employee" UniqueName="dgLastName">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="CostCenterID" FilterControlAltText="" HeaderText="Cost Center" UniqueName="dgCostCenter">
                                                        <ItemStyle HorizontalAlign="Right" />
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn DataField="Total" DataFormatString="{0:$###,##0.00}" FilterControlAltText="" HeaderText="Total" UniqueName="dgTotal">
                                                        <ItemStyle HorizontalAlign="Right" />
                                                    </telerik:GridBoundColumn>
                                                </Columns>
                                                <PagerStyle PageSizeControlType="RadComboBox" />
                                            </MasterTableView>
                                            <PagerStyle PageSizeControlType="RadComboBox" />
                                            <FilterMenu EnableImageSprites="False">
                                            </FilterMenu>
                                        </telerik:RadGrid>
        </telerik:RadAjaxPanel>

========================
VB CODE BEHIND
=========================

    Protected Sub cmdExportPayrolFile_Click(sender As Object, e As EventArgs) Handles cmdExportPayrolFile.Click

        dgExportReport.MasterTableView.ExportToCSV()

    End Sub


Am I missing something in the grid properties? Does this feature only work if the page is run from the server and NOT localhost? I am populating the grid using advanced binding upon a combo box select index changed.

Thanks


Princy
Top achievements
Rank 2
 answered on 27 Sep 2013
1 answer
595 views
HI

   I have a master-detail rad grid - with data set. Autogenerate columns is off. It is autogenerating columns.
So now I have duplicate columns.

protected void Page_Load(object sender, EventArgs e)

{

if (!IsPostBack)

Setup();

}

protected void Setup()

{

DataTable oTableParent = new DataTable("Parent");

oTableParent.Columns.Add("PKey", Type.GetType("System.Int32"));

oTableParent.Columns.Add("Code", Type.GetType("System.String"));

oTableParent.Columns.Add("Description", Type.GetType("System.String"));

oTableParent.Rows.Add(1,"AAAAA","aaaaaaaaaaaaaaa");

oTableParent.Rows.Add(2,"BBBBB","bbbbbbbbbbbbbbb");

DataTable oTableChild = new DataTable("Child");

oTableChild.Columns.Add("ChildPKey", Type.GetType("System.Int32"));

oTableChild.Columns.Add("PKey", Type.GetType("System.Int32"));

oTableChild.Columns.Add("Code", Type.GetType("System.String"));

oTableChild.Columns.Add("Description", Type.GetType("System.String"));

oTableChild.Rows.Add(1,1, "AAAA-A", "aaaaaaaaaaaaaaa");

oTableChild.Rows.Add(2,1, "AAAA-B", "aaaaaaabbbbbbbb");

oTableChild.Rows.Add(3, 2, "BBBB-A", "bbbbbbbbaaaaaaa");

oTableChild.Rows.Add(4, 2, "BBBB-B", "bbbbbbbbbbbbbbb");

DataColumn[] oKeys = new DataColumn[1];

oKeys[0] = oTableParent.Columns[0];

oTableParent.PrimaryKey = oKeys;

DataSet oDS = new DataSet();

oDS.Tables.Add(oTableParent);

oDS.Tables.Add(oTableChild);

oDS.Relations.Add("Primary", oDS.Tables[0].Columns[0], oDS.Tables[1].Columns[1]);

RadGrid1.AutoGenerateColumns = false;

RadGrid1.DataSource = oDS;

RadGrid1.DataBind();

}


<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" Height="181px" Width="1091px" AllowSorting="True" DataMember="Parent">

<ClientSettings>

<Selecting AllowRowSelect="True" />

</ClientSettings>

<MasterTableView HierarchyLoadMode="ServerBind" AutoGenerateColumns="True" DataKeyNames="PKey" DataMember="Parent">

<DetailTables>

<telerik:GridTableView runat="server" AutoGenerateColumns="True" AllowSorting="False" DataMember="Child">

<%-- <ParentTableRelation>

<telerik:GridRelationFields DetailKeyField="PKey" MasterKeyField="PKey" />

</ParentTableRelation>--%>

<ParentTableRelation>

<telerik:GridRelationFields DetailKeyField="PKey" MasterKeyField="PKey" />

</ParentTableRelation>

<Columns>

<telerik:GridBoundColumn FilterControlAltText="Filter ChildPKey column" UniqueName="ChildPKey" DataType="System.Int32" HeaderText="ChildPKey" ReadOnly="True">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="PKey" FilterControlAltText="Filter PKey column" HeaderText="PKey" UniqueName="PKeyChild" DataType="System.Int32">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Code" FilterControlAltText="Filter Code column" HeaderText="Code" UniqueName="CodeChild">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Description" FilterControlAltText="Filter Description column" HeaderText="Description" UniqueName="DescriptionChild">

</telerik:GridBoundColumn>

</Columns>

</telerik:GridTableView>

</DetailTables>

<Columns>

<telerik:GridBoundColumn DataField="PKey" FilterControlAltText="Filter PKey column" HeaderText="PKey" UniqueName="PKey" DataType="System.Int32">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Code" FilterControlAltText="Filter Code column" HeaderText="Code" UniqueName="Code">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Description" FilterControlAltText="Filter Description column" HeaderText="Description" UniqueName="Description">

</telerik:GridBoundColumn>

<telerik:GridCheckBoxColumn DataType="System.Boolean" FilterControlAltText="Filter column column" UniqueName="column">

</telerik:GridCheckBoxColumn>

</Columns>

</MasterTableView>

</telerik:RadGrid>

Gary

Princy
Top achievements
Rank 2
 answered on 27 Sep 2013
8 answers
724 views
Is there any way of restricting the maximum width and height of images that people can use within the RadEditor?  Both at the point of upload and within the designer would be useful.

Users can upload images but some are uploading images that are far too large (dimensions) and they are breaking the layout of the page.

I think that one partial solution would be to override the save function in the image manager to resize the graphic but the user could still use the design view of the editor to drag the image to a size that is too large.

Thanks

Marco Antonio
Top achievements
Rank 1
 answered on 26 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?