Email functionality inside Rad Grid without using SMTP.

1 posts, 0 answers
  1. Priyanka
    Priyanka avatar
    34 posts
    Member since:
    Dec 2014

    Posted 08 Jun 2015 Link to this post

    Hi,
    I have to design a "send mail functionality" using Telerik Rad Grid. I want 4 columns in it.

    1st Column: under Edit Item Template: "To"
    2nd Column: under Edit Item Template: "CC"
    3rd column: under Edit Item Template: "Subject"
    4th Column: under Edit Item Template: "Content/Msg"

    When I click on "Add" button, I shall able to manually enter above 4 fields in "Edit Item Template" of Rad Grid Template columns.

    When I click on "Save" button these columns should be visible inside Rad Grid "Item template/Columns"

    I tried to design the .aspx code, based on functionality:

    <%@ Register TagPrefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
     
    <body>
        <form id="form1" runat="server">
        <div>
     
    <telerik:RadGrid ID="RGGST" runat="server"  AutoGenerateColumns="false">
              <mastertableview commanditemdisplay="None" autogeneratecolumns="false" datakeynames="MailID"
                insertitempageindexaction="ShowItemOnCurrentPage" ShowFooter="True">
                        <CommandItemSettings AddNewRecordText="New" />
                                        <Columns>
                                             
                                            <telerik:GridTemplateColumn UniqueName="MailTo" HeaderText="ID">
                                                <ItemTemplate>
                                                    <asp:Label ID="DeptProject" Text='<%# Eval("ChatTo") %>' runat="server"></asp:Label>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                   <wssawc:PeopleEditor AllowEmpty="true" ValidatorEnabled="true" ID="peTo"
                                                  runat="server" ShowCreateButtonInActiveDirectoryAccountCreationMode="true" SelectionSet="User"
                                                  SharePointGroup="To" Width="275px" MultiSelect="true" AutoPostBack="false" CommaSeparatedAccounts='<%# Bind("ChatTo") %>' />
                                                  <asp:CustomValidator ID="CustomValidator2" runat="server" ErrorMessage="To is required."
                                                  ClientValidationFunction ="validateSecond" EnableClientScript="true" Display="None"
                                                  ControlToValidate="peTo" SetFocusOnError="true"></asp:CustomValidator>
                                                </EditItemTemplate>
                                            </telerik:GridTemplateColumn>
     
                                             <telerik:GridTemplateColumn UniqueName="MailCc" HeaderText="Project/Phase/Dept Code">
                                                <ItemTemplate>
                                                    <asp:Label ID="ProjPhaseDeptCode" Text='<%# Eval("ChatCc") %>' runat="server"></asp:Label>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <wssawc:PeopleEditor AllowEmpty="true" ValidatorEnabled="true" ID="peCc"
                                                   runat="server" ShowCreateButtonInActiveDirectoryAccountCreationMode="true" SelectionSet="User"
                                                   SharePointGroup="Cc" Width="275px" MultiSelect="true" AutoPostBack="false" CommaSeparatedAccounts='<%# Bind("ChatTo") %>' />
                                                    <asp:CustomValidator ID="CustomValidator2" runat="server" ErrorMessage="To is required."
                                                  ClientValidationFunction ="validateSecond" EnableClientScript="true" Display="None"
                                                  ControlToValidate="peCc" SetFocusOnError="true"></asp:CustomValidator>
                                                </EditItemTemplate>
                                            </telerik:GridTemplateColumn>
                      
                                             <telerik:GridTemplateColumn UniqueName="MailSubject" HeaderText="Subject">
                                                <ItemTemplate>
                                                    <asp:Label ID="GSTTaxCode" Text='<%# Eval("ChatSubject") %>' runat="server"></asp:Label>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtChatSubj" runat="server"></asp:TextBox>
                                                    <%--<RequiredFieldValidator ForeColor="Red" Text="*This field is required"></RequiredFieldValidator>--%>
                                                </EditItemTemplate>
                                            </telerik:GridTemplateColumn>
     
                                           <telerik:GridTemplateColumn UniqueName="MailContent" HeaderText="Content">
                                                <ItemTemplate>
                                                    <asp:Label ID="GSTTaxCode" Text='<%# Eval("ChatContent") %>' runat="server"></asp:Label>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtChatSubj" runat="server"></asp:TextBox>
                                                    <%--<RequiredFieldValidator ForeColor="Red" Text="*This field is required"></RequiredFieldValidator>--%>
                                                </EditItemTemplate>
                                            </telerik:GridTemplateColumn>                                      
                                             
                                        </Columns>
                                        <EditFormSettings>
                                            <EditColumn ButtonType="ImageButton" />
                                        </EditFormSettings>
                                        <PagerStyle AlwaysVisible="True" PageSizeControlType="RadComboBox" />
                       </mastertableview>
                </telerik:RadGrid>
     
     
        </div>
        </form>
    </body>
    <wssawc:PeopleEditor /> this control is share point control.

    Please reply how to achieve it? Thanks in advance.

Back to Top