Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
164 views
Hi,

  I m having a Telerik Grid(telerik.aspnetajax.radgrid.2008.Q2). I m having Templete Columns . I want to merge the Grid when two  rows contaings the same value in the first call record.
eg this is my aspx page code. Please give me the solution for merging witn  template columns.

THanks in Advanc


                        <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="Both" AutoGenerateColumns="False"
                            Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" Width="100%" EnableEmbeddedSkins="False" ShowStatusBar="false" OnItemDataBound="RadGrid1_ItemDataBound"
                           
                            Height="510px" TabIndex="0">
                            <MasterTableView Width="100%" ShowFooter="false">
                                <NoRecordsTemplate>
                                    <asp:Label ID="lblMesg" runat="server" Text="No relevant information exists">
                                    </asp:Label>
                                </NoRecordsTemplate>
                                <Columns>
                                    <telerik:GridTemplateColumn Display="true" UniqueName="TemplateColumn"
                                        HeaderText="Select"  >
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkSelect" runat="server" AutoPostBack="true" CssClass="Data_List" /></td>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                 
                                    <telerik:GridTemplateColumn Display="false" UniqueName="TemplateColumn"
                                        >
                                        <ItemTemplate>
                                            <asp:TextBox runat="server" ID="txtBftId" Text='<%#DataBinder.Eval(Container.DataItem,"BFT_ID") %>'
                                                SkinID="LoginText"></asp:TextBox>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn Display="true" UniqueName="TemplateColumn"
                                        HeaderText="Services">
                                        <ItemTemplate>
                                            <asp:TextBox runat="server" ID="txtServices" Text='<%#DataBinder.Eval(Container.DataItem,"SERVICES") %>'
                                                SkinID="LoginText"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvServices" runat="server" ControlToValidate="txtServices"
                                                ErrorMessage="Please Enter Service name">*</asp:RequiredFieldValidator>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn UniqueName="TemplateColumn1">
                                        <HeaderTemplate>
                                            <table id="tblStandBenefit" cellspacing="0" cellpadding="0" border="0"
                                                align="left" width="100%">
                                                <tr width="100%">
                                                    <td colspan="2" width="100%" align="center">
                                                        Standard Benefit
                                                    </td>
                                                </tr>
                                                <tr width="100%" align="center">
                                                    <td width="50%" align="center">
                                                        HMO
                                                    </td>
                                                    <td width="50%" align="center">
                                                        PPO
                                                    </td>
                                                </tr>
                                            </table>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <table id="tblStandBenefitval" cellspacing="0" cellpadding="0" border="0" width="100%">
                                                <tr width="100%">
                                                    <td width="50%" align="center">
                                                        <asp:CheckBox ID="chkHMOStdBft" runat="server" AutoPostBack="true" CssClass="Data_List" /></td>
                                                    <td width="50%" align="center">
                                                        <asp:CheckBox ID="chkPPOStdBft" runat="server" AutoPostBack="true" CssClass="Data_List" /></td>
                                                </tr>
                                            </table>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn UniqueName="TemplateColumn1"
                                       >
                                        <HeaderTemplate>
                                            <table id="tblBenefitRider" cellspacing="0" cellpadding="0" border="0" width="100%">
                                                <tr width="100%" align="center">
                                                    <td colspan="2" width="100%">
                                                        Benefit Rider
                                                    </td>
                                                </tr>
                                                <tr width="100%" align="center">
                                                    <td width="50%" align="center">
                                                        HMO
                                                    </td>
                                                    <td width="50%" align="center">
                                                        PPO
                                                    </td>
                                                </tr>
                                            </table>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <table id="tblBenefitRiderVal" cellspacing="0" cellpadding="0" border="0" width="100%">
                                                <tr width="100%">
                                                    <td width="50%" align="center">
                                                        <asp:CheckBox ID="chkHMOBR" runat="server" AutoPostBack="true" CssClass="Data_List" /></td>
                                                    <td width="50%" align="center">
                                                        <asp:CheckBox ID="chkPPOBR" runat="server" AutoPostBack="true" CssClass="Data_List" /></td>
                                                </tr>
                                            </table>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn UniqueName="TemplateColumn1"
                                        >
                                        <HeaderTemplate>
                                            <table id="tblDiscountService" cellspacing="0" cellpadding="0" border="0" width="100%">
                                                <tr align="center" width="100%">
                                                    <td colspan="2" width="100%">
                                                        Discount Service
                                                    </td>
                                                </tr>
                                                <tr width="100%" align="center">
                                                    <td width="50%" align="center">
                                                        HMO
                                                    </td>
                                                    <td width="50%" align="center">
                                                        PPO
                                                    </td>
                                                </tr>
                                            </table>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <table id="tblDiscountServiceVal" cellspacing="0" cellpadding="0" border="0" width="100%">
                                                <tr width="100%" align="center">
                                                    <td width="50%" align="center">
                                                        <asp:CheckBox ID="chkDscHMO" runat="server" AutoPostBack="true" CssClass="Data_List" /></td>
                                                    <td width="50%" align="center">
                                                        <asp:CheckBox ID="chkDscPPO" runat="server" AutoPostBack="true" CssClass="Data_List" /></td>
                                                </tr>
                                            </table>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn UniqueName="TemplateColumn1"
                                       >
                                        <HeaderTemplate>
                                            <table id="tblSubcontractedOut" cellspacing="0" cellpadding="0" border="0" width="100%">
                                                <tr width="100%" align="center">
                                                    <td colspan="2" width="100%" align="center">
                                                        Sub-Contracted Out
                                                    </td>
                                                </tr>
                                                <tr width="100%" align="left">
                                                    <td width="50%" align="center">
                                                        HMO
                                                    </td>
                                                    <td width="50%" align="left">
                                                        PPO
                                                    </td>
                                                </tr>
                                            </table>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <table id="tblSubcontractedOutVal" cellspacing="0" cellpadding="0" border="0" width="100%">
                                                <tr width="100%" align="center">
                                                    <td width="50%%" align="center">
                                                        <asp:CheckBox ID="chkSubconHMO" runat="server" AutoPostBack="true" CssClass="Data_List" /></td>
                                                    <td width="50%" align="center">
                                                        <asp:CheckBox ID="chkSubconPPO" runat="server" AutoPostBack="true" CssClass="Data_List" /></td>
                                                </tr>
                                            </table>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn UniqueName="TemplateColumn1"
                                       >
                                        <HeaderTemplate>
                                            <table id="tblNameOfProv" cellspacing="0" cellpadding="0" border="0" class="GridHeader_WFM"
                                                width="100%">
                                                <tr width="100%">
                                                    <td colspan="2" width="100%" align="center">
                                                        Name of Provider
                                                    </td>
                                                </tr>
                                            </table>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <table id="tblNameOfProvVal" cellspacing="0" cellpadding="0" border="0" width="100%">
                                                <tr width="100%" align="center">
                                                    <td colspan="2" width="100%" align="center">
                                                        <asp:TextBox runat="server" ID="txtNameofProv" Text='<%#DataBinder.Eval(Container.DataItem,"SUB_CONTRACTED_PROV") %>'
                                                            SkinID="LoginText" MaxLength="254"></asp:TextBox>
                                                </tr>
                                            </table>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                </Columns>
                                <ExpandCollapseColumn
                                   >
                                    <HeaderStyle Width="20px" />
                                </ExpandCollapseColumn>
                                <RowIndicatorColumn >
                                    <%--<HeaderStyle Width="20px" />--%>
                                </RowIndicatorColumn>
                                <PagerStyle
                                    />
                                <EditFormSettings>
                                    <EditColumn 
                                       >
                                    </EditColumn>
                                </EditFormSettings>
                                <CommandItemSettings   />
                
                            </MasterTableView>
                            <FilterMenu EnableTheming="True" Skin="Office2007" EnableEmbeddedSkins="False">
                                <CollapseAnimation Duration="200" Type="OutQuint" />
                            </FilterMenu>
                            <PagerStyle
                                />
                            <ClientSettings>
                                <Scrolling AllowScroll="false" UseStaticHeaders="false" />
                            </ClientSettings>
               
                        </telerik:RadGrid>
laila
Top achievements
Rank 1
 asked on 20 Dec 2008
1 answer
86 views
I want to incorporate the expression of the tab form in RadEditor.
http://www.barelyfitz.com/projects/tabber/index.php
I hope it come true.

best regards,

KATADA
Rumen
Telerik team
 answered on 20 Dec 2008
4 answers
136 views
Hello,

I have a RadComboBox control which I bind to on the loading of a page.  For some reason, when the page posts back or posts back asynch (using the RadAjaxManager approach), it's losing those values.  I'm binding to this control from code-behind using the DataSource property; I set the DataTextField and DataValueField properties too.

This was working, and as of recently, this stopped working.

Any ideas?
Yana
Telerik team
 answered on 20 Dec 2008
5 answers
782 views

Hi,

I am creating Rad Menu dynamically. Following is the code. Even I tried following code in Page_Load().
But still its not working...

Why? Can anyone help me?


public partial class _Default : System.Web.UI.Page
{
    RadMenu menu;

  
    protected override void CreateChildControls()
    {
        base.CreateChildControls();
        menu = new RadMenu();
        menu.ID = "radmenucontrol";

        menu.Items.Add(new RadMenuItem("Google", "http://www.google.com"));
        menu.Items.Add(new RadMenuItem("Google1", "http://www.google.com"));
        menu.Items.Add(new RadMenuItem("Google2", "http://www.google.com"));
        menu.Items.Add(new RadMenuItem("Google", "http://www.google.com"));
        menu.Items.FindItemByText("Google").Items.Add(new RadMenuItem("Yahoo", "Default.aspx"));
        menu.Items.FindItemByText("Google").Items.Add(new RadMenuItem("Yahoo1", "Default.aspx"));
       
        this.Controls.Add(menu);       
        menu.ItemClick += new RadMenuEventHandler(menu_ItemClick);
    }

    void menu_ItemClick(object sender, RadMenuEventArgs e)
    {
        Response.Redirect("http://www.google.com");     
    }
}

Savan
Top achievements
Rank 1
 answered on 20 Dec 2008
1 answer
90 views

Hi,

    Rad grid is used to update record on double click, It uses ObjectDataSource and has a TypeName which points to a business layer type, Update happens fine.  We have a validation in stored procedure, when stored procedure fails in updating, it returns a status updation failed, could you suggest me

1. how to get the status form business layer and present the status to user ?

2. Another observation update fails in IE6, but works in IE 7 and Firefox - Is there any Common fix for this issue.

Regards,
Martin

Sebastian
Telerik team
 answered on 20 Dec 2008
3 answers
135 views
There is an ItemTemplate, HeaderTemplate, FooterTemplate, but all these deal with the dropdown. How can I customize what is shown in the actual input box. Each item can have an image, I would like to show this image even when nothing is dropped down, similar to how the new button works on this page: http://demos.telerik.com/aspnet-ajax/ToolBar/Examples/Functionality/FirstLook/DefaultCS.aspx but with a RadComboBox.

Thanks.
Veselin Vasilev
Telerik team
 answered on 20 Dec 2008
5 answers
632 views
Hi

How to add templatecolumn and edittemplatecolumn dynamically for the existing radgrid. Please answer , It is very urgent.

Thanks in Advance
azhagu
Top achievements
Rank 1
 answered on 20 Dec 2008
1 answer
123 views
I know I can set the ContentAreaCss in a .skin file.. but wondering if possible to do so from within the web.config?
Rumen
Telerik team
 answered on 20 Dec 2008
7 answers
283 views
Hi,
     I use DataFormatString  for mobile number. It works fine. The issue i face is... When the value binding to this field is empty or null then the formatting looks like ()-

I need Mobile no to look like   (123)456-7890
If the binding number is empty then it looks like ()-
I need the formatting should not applied if binding mobile is empty or null. So the data displayed will be blank.

<telerik:GridBoundColumn DataType="System.Int64" HeaderButtonType="TextButton" DataField="MobileNo" DataFormatString="{0:(###)###-####}" HeaderText="Mobile"
                                                                            UniqueName="MobileNo">
                                                                            <ItemStyle  HorizontalAlign="Left" />
                                                                            <HeaderStyle HorizontalAlign="Center" />
                                                                        </telerik:GridBoundColumn>

Please help to get ride of this issue

Thanks
Happy coding...  ;-)
Daniel
Telerik team
 answered on 20 Dec 2008
1 answer
110 views
Hi all,

just to report a mistake in the help page:
http://www.telerik.com/help/aspnet-ajax/client-side-binding.html -

in the middle of the page, you say:

To optimize even more the grid client-side data binding you can get both data and total items count in a single request. Example:
... 
[WebMethod(EnableSession = true)] 
public Dictionary<string, object> GetDataAndCount(int startRowIndex, int maximumRows, List<GridSortExpression> sortExpression, List<GridFilterExpression> filterExpression) 
{ 
   Dictionary<string, object> data = new Dictionary<string, object>(); 
   data.Add("data", GetData(startRowIndex, maximumRows, sortExpression, filterExpression)); 
   data.Add("count", (int)Session["Count"]); 
   return data; 
} 
... 

But actually the key "data" and "count" should be "Data" and "Count", otherwise they won't be recognized. The JSON output you may trace here (http://demos.telerik.com/TelerikCompressionModule/) proof this.

Thanks,
Enrico Foschi


Sebastian
Telerik team
 answered on 20 Dec 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?