Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
123 views
Hi,

I am using the radGrid control to evaluate the product. I need clarification on following scenarios.
Please clarify on these how radGrid supports these:

1) I have a radGrid having morethan 10 rows, where one of the column is Date column.
2) can you give me an example of how to change the backcolor of the rows whose records with lessthan 1/1/2000 with black color
3) I had implemented the sorting on the radGrid with:
<telerik:radGrid AllowSorting="true" ..........>
<M....>
<Columns>
<telerik:GridBoundColumn SortExpression="fullname" ..........>
</Columns>

But unfortunately sorting is not happening on grid.

Please clarify the above thing. And the same implementation can I use in DotNetNuke?

Thanks,
Srinu dhulipalla
Princy
Top achievements
Rank 2
 answered on 28 Mar 2011
1 answer
86 views

Hello to all

I have a radtab, tabs are,

1.General

2.Entries

 

In the general tab,  I have radgrid in which u can add,edit,delete all the data.

 

In radgrid my columns are

 

Particulars        Type                            Length              Show

Document         Numeric                         10                  true

Document1       Alphanumeric               15                   true

 

 

And in the entries tab

Two labels generate dynamically and there text are

Document and Document1 and two textbox one is numeric textbox and other is Alphanumeric text box validated by filter textbox.

On updating data ,data save successfully.

Now the problem is that, on the retrieval time I m using  datalist to retrive data, when I use add new in radgrid, Entries tab is not updating means new lable and textbox  is not generated in entries tab and if user update the value of old textbox and then change the tab and again click on entries tab textbox data is removing

 

So what is the solution for that

Kate
Telerik team
 answered on 28 Mar 2011
4 answers
136 views
Hi ,

How to set edit mode on click of image button in the Radgrid. On Click of "ImgDemote" button i need enable the EditItemTemplate in the "Pending Status " Column. Which as RadComboBox and Save And Cancel Button in it. How enable edit mode and hide the Label field when edit is true. Please give me solution


<telerik:RadGrid ID="rgAchCashTransfer" runat="server" AllowMultiRowSelection="false"
                                                AllowPaging="true" ShowHeader="true" AutoGenerateColumns="False" loadingtemplatetransparency="25"
                                                Width="750px" OnItemDataBound="rgAchCashTransfer_ItemDataBound" Visible="false"
                                                OnNeedDataSource="rgAchCashTransfer_NeedDataSource"  OnItemCommand="rgAchCashTransfer_ItemCommand" GridLines="None" AllowSorting="True"
                                                Height="235px" AlternatingItemStyle-BackColor="AliceBlue" Skin="Office2007">
                                                <AlternatingItemStyle BackColor="AliceBlue"></AlternatingItemStyle>
                                                <MasterTableView TableLayout="Fixed" EditMode="InPlace" EnableNoRecordsTemplate="true">
                                                    <PagerStyle Mode="NextPrevAndNumeric" Visible="true" />
                                                    <NoRecordsTemplate>
                                                        <div>
                                                            No records to display</div>
                                                    </NoRecordsTemplate>
                                                    <Columns>
                                                        <telerik:GridBoundColumn DataField="OfficeCode" HeaderButtonType="TextButton" Visible="true"
                                                            HeaderText="Off" SortExpression="OfficeCode" UniqueName="OfficeCode">
                                                            <HeaderStyle HorizontalAlign="left" Width="30px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridTemplateColumn DataField="AccountNumber" HeaderButtonType="TextButton"
                                                            HeaderText="Account" UniqueName="AccountNumber" Visible="true">
                                                            <HeaderStyle HorizontalAlign="left" Width="50px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblAccount" Text='<%# DataBinder.Eval(Container.DataItem, "AccountNumber")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridTemplateColumn DataField="CashTransferID" HeaderButtonType="TextButton"
                                                            HeaderText="CashTransferID" UniqueName="CashTransferID" Visible="false">
                                                            <HeaderStyle HorizontalAlign="left" Width="0px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblCashTransferID" Text='<%# DataBinder.Eval(Container.DataItem, "CashTransferID")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridBoundColumn DataField="AccountName" HeaderButtonType="TextButton" Visible="true"
                                                            HeaderText="Name" SortExpression="AccountName" UniqueName="AccountName">
                                                            <HeaderStyle HorizontalAlign="left" Width="50px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="CashTransferTypeDescription" HeaderButtonType="TextButton"
                                                            Visible="true" HeaderText="Type" SortExpression="CashTransferTypeDescription"
                                                            UniqueName="CashTransferTypeDescription">
                                                            <HeaderStyle HorizontalAlign="left" Width="70px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridTemplateColumn DataField="Amount" HeaderButtonType="TextButton" HeaderText="Amount"
                                                            UniqueName="Amount" Visible="true">
                                                            <HeaderStyle HorizontalAlign="left" Width="60px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblAmount" Text='<%# DataBinder.Eval(Container.DataItem, "Amount")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridTemplateColumn DataField="TotalFee" HeaderButtonType="TextButton" HeaderText="Fee"
                                                            UniqueName="TotalFee" Visible="true">
                                                            <HeaderStyle HorizontalAlign="left" Width="50px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblTotalFee" Text='<%# DataBinder.Eval(Container.DataItem, "TotalFee")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridBoundColumn DataField="CurrencyCode" HeaderButtonType="TextButton" Visible="true"
                                                            HeaderText="Cur" SortExpression="CurrencyCode" UniqueName="CurrencyCode">
                                                            <HeaderStyle HorizontalAlign="left" Width="30px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridTemplateColumn DataField="ValidationCode" HeaderButtonType="TextButton"
                                                            HeaderText="Exc" UniqueName="ValidationCode" Visible="true">
                                                            <HeaderStyle HorizontalAlign="left" Width="30px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblExec" Text='<%# DataBinder.Eval(Container.DataItem, "ValidationCode")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridTemplateColumn DataField="BeneficiaryIndicator" HeaderButtonType="TextButton"
                                                            HeaderText="Ben." UniqueName="BeneficiaryIndicator" Visible="true">
                                                            <HeaderStyle HorizontalAlign="left" Width="50px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblBen" Text='<%# DataBinder.Eval(Container.DataItem, "BeneficiaryIndicator")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridTemplateColumn DataField="AccountIRAAdvancedTax" HeaderButtonType="TextButton"
                                                            HeaderText="IRA" UniqueName="AccountIRAAdvancedTax" Visible="true">
                                                            <HeaderStyle HorizontalAlign="left" Width="30px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblIRA" Text='<%# DataBinder.Eval(Container.DataItem, "AccountIRAAdvancedTax")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridBoundColumn DataField="WorkFlowStateDescription" HeaderButtonType="TextButton"
                                                            HeaderText="Pending Status" SortExpression="WorkFlowStateDescription" UniqueName="WorkFlowStateDescription">
                                                            <HeaderStyle HorizontalAlign="Center" Width="150px" />
                                                            <ItemStyle HorizontalAlign="Right" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridTemplateColumn DataField="WorkFlowStateDescription" HeaderButtonType="TextButton" HeaderText="Pending Status"
                                                            UniqueName="WorkFlowStateDescription" SortExpression="WorkFlowStateDescription" Visible="false">
                                                            <HeaderStyle HorizontalAlign="left" Width="0px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblWorkFlowStateDescription" Text='<%# DataBinder.Eval(Container.DataItem, "WorkFlowStateDescription")%>'></asp:Label>
                                                            </ItemTemplate>
                                                              
                                                            <EditItemTemplate>
                                                            <telerik:RadComboBox ID="cmbDemoteComments"  runat="server" EnableEmbeddedSkins="true" Skin="Vista">
                                                                        </telerik:RadComboBox>
                                                            <asp:ImageButton ID="ImgSaveDemote" ToolTip="Click here to Save" CommandName="SaveDemoteComment" ImageUrl="~/Img/savelong.gif"
                                                                    runat="server" />
                                                                <asp:ImageButton ID="ImgCancelDemote" ToolTip="Click here to Cancel"  CommandName="CancelDemoteComment"  ImageUrl="~/Img/cancellong.gif"
                                                                    runat="server" />
                                                            </EditItemTemplate>
                                                              
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridTemplateColumn DataField="Editable" HeaderButtonType="TextButton" HeaderText=""
                                                            UniqueName="Editable" Visible="false">
                                                            <HeaderStyle HorizontalAlign="left" Width="0px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblEditable" Text='<%# DataBinder.Eval(Container.DataItem, "Editable")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridTemplateColumn DataField="Demote" HeaderButtonType="TextButton" HeaderText=""
                                                            UniqueName="Demote" Visible="false">
                                                            <HeaderStyle HorizontalAlign="left" Width="0px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblDemote" Text='<%# DataBinder.Eval(Container.DataItem, "Demote")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridTemplateColumn DataField="Promote" HeaderButtonType="TextButton" HeaderText=""
                                                            UniqueName="Promote" Visible="false">
                                                            <HeaderStyle HorizontalAlign="left" Width="0px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblPromote" Text='<%# DataBinder.Eval(Container.DataItem, "Promote")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                         <telerik:GridTemplateColumn DataField="OverrideIndicator" HeaderButtonType="TextButton" HeaderText=""
                                                            UniqueName="OverrideIndicator" Visible="false">
                                                            <HeaderStyle HorizontalAlign="left" Width="0px" />
                                                            <ItemStyle HorizontalAlign="left" />
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblOverrideIndicator" Text='<%# DataBinder.Eval(Container.DataItem, "OverrideIndicator")%>'></asp:Label>
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridTemplateColumn DataField="Action" HeaderButtonType="TextButton" HeaderText="Action"
                                                            UniqueName="Action">
                                                            <HeaderStyle HorizontalAlign="Center" Width="90px" />
                                                            <ItemStyle HorizontalAlign="Center" />
                                                            <ItemTemplate>
                                                                <asp:ImageButton ID="ImgPromote" ToolTip="Click here to Promote" CommandName="Promote" ImageUrl="~/Img/CashDi7.gif"
                                                                    runat="server" />
                                                                <asp:ImageButton ID="ImgEdit" ToolTip="Click here to Edit"  ImageUrl="~/Img/CashDi2.gif"
                                                                    runat="server" />
                                                                <asp:ImageButton ID="ImgDemote" ToolTip="Click here to Demote" CommandName="Demote" ImageUrl="~/Img/CashDi8.gif"
                                                                    runat="server" />
                                                                    <asp:ImageButton ID="ImageOverride" ToolTip="Click here to Override"  CommandName="Override" ImageUrl="~/Img/Override.gif"
                                                                    runat="server" />
                                                            </ItemTemplate>
                                                        </telerik:GridTemplateColumn>
                                                    </Columns>
                                                </MasterTableView>
                                                <ClientSettings AllowExpandCollapse="true">
                                                    <Scrolling AllowScroll="True" ScrollHeight="50px" UseStaticHeaders="true" />
                                                    <Selecting AllowRowSelect="false" />
                                                </ClientSettings>
                                                <FilterMenu NotSelectedImageUrl="~/Skins/GridSkin/Ice/NotSelectedMenu.gif" SelectedImageUrl="~/Skins/GridSkin/Ice/SelectedMenu.gif">
                                                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                                </FilterMenu>
                                            </telerik:RadGrid>


protected void rgAchCashTransfer_ItemCommand(object source, GridCommandEventArgs e)
        {
            if (e.CommandName.ToUpper(CultureInfo.InvariantCulture) == "Demote".ToUpper(CultureInfo.InvariantCulture))
            {
                GridColumn editedItem = (GridColumn)rgAchCashTransfer.MasterTableView.GetColumn("WorkFlowStateDescription");
                e.Item.Edit = true;
                  
                 
            }
        }
        protected void rgAchCashTransfer_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem dataItem = (GridDataItem)e.Item;
                ImageButton ImgEdit = dataItem.FindControl("ImgEdit") as ImageButton;
                ImageButton ImgPromote = dataItem.FindControl("ImgPromote") as ImageButton;
                ImageButton ImgDemote = dataItem.FindControl("ImgDemote") as ImageButton;
                ImageButton ImageOverride = dataItem.FindControl("ImageOverride") as ImageButton;
  
                Label lblEditable = dataItem.FindControl("lblEditable") as Label;
                Label lblDemote = dataItem.FindControl("lblDemote") as Label;
                Label lblPromote = dataItem.FindControl("lblPromote") as Label;
                Label lblAmount = dataItem.FindControl("lblAmount") as Label;
                Label lblTotalFee = dataItem.FindControl("lblTotalFee") as Label;
                Label lblCashTransferID = dataItem.FindControl("lblCashTransferID") as Label;
                Label lblAccount = dataItem.FindControl("lblAccount") as Label;
                Label lblExec = dataItem.FindControl("lblExec") as Label;
                Label lblBen = dataItem.FindControl("lblBen") as Label;
                Label lblIRA = dataItem.FindControl("lblIRA") as Label;
                Label lblOverrideIndicator = dataItem.FindControl("lblOverrideIndicator") as Label;
                decimal AmountValue = Convert.ToDecimal(lblAmount.Text);
                lblAmount.Text = FormatCurrency(AmountValue);
  
                decimal TotalFeeValue = Convert.ToDecimal(lblTotalFee.Text);
                lblTotalFee.Text = FormatCurrency(TotalFeeValue);
  
                if (lblIRA.Text.ToString().Equals(Constants.VALUE_1))
                    lblIRA.Text = Constants.YES;
                else
                    lblIRA.Text = Constants.NO;
  
                if (lblExec.Text.ToString().Equals(Constants.VALUE_1))
                    lblExec.Text = Constants.VIEW;
                else
                    lblExec.Text = "";
  
                ChangeForeColor(lblBen);
  
                if (lblPromote.Text.ToString().Equals(Constants.VALUE_1))
                    ImgPromote.Visible = true;
                else
                    ImgPromote.Visible = false;
                if (lblDemote.Text.ToString().Equals(Constants.VALUE_1))
                    ImgDemote.Visible = true;
                else
                    ImgDemote.Visible = false;
                if (lblEditable.Text.ToString().Equals(Constants.VALUE_1))
                    ImgEdit.Visible = true;
                else
                    ImgEdit.Visible = false;
                if (lblOverrideIndicator.Text.ToString().Equals(Constants.VALUE_1))
                    ImageOverride.Visible = true;
                else
                    ImageOverride.Visible = false;
  
  
  
            }
            else
            {
  
                if ((e.Item is GridEditableItem && ((GridEditableItem)e.Item).IsInEditMode))
                {
                   // e.Item.Edit = true;
  
                    GridEditableItem editedItem = (GridEditableItem)e.Item;
                    RadComboBox editor = (RadComboBox)editedItem.FindControl("cmbDemoteComments");
                      
                }
            }
        }
Princy
Top achievements
Rank 2
 answered on 28 Mar 2011
10 answers
155 views
I'm building a module for DNN Pro 5.6.1 using the built in Telerik (version 2010.1.309.35) controls.  The intention of the app is to filter a List(of T) using the radFilter control.  I have the mechanics worked out and everything is working as designed.  I'm building the list of filtered columns dynamically in the page_init method.

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
    Try
        BindFilterAttributes()
    Catch ex As Exception
        ProcessModuleLoadException(Me, ex)
    End Try
End Sub
Private Sub BindFilterAttributes()
    For Each thisFieldEditor As RadFilterDataFieldEditor In Me.FieldEditors
        rflFilter.FieldEditors.Add(thisFieldEditor)
    Next
End Sub

With each click on the control, whether to add or remove filter conditions or to change the filter in any way the control gets progressively slower.  At first the control completes it's postback in less than one second.  After twenty clicks, the control takes about three seconds to return for each click.   

Has anyone else experienced this behavior?  Are there methods I could use to reduce the number of postbacks, reduce the amount of data going back and forth to the server, or in any other way improve the performance?
Tsvetina
Telerik team
 answered on 28 Mar 2011
1 answer
74 views
I have several admin pages with Radgrids utilizing popup editforms.  Everything was working fine.

I was sent a new set of css files and a new layout, and now the edit popups show, but are disabled along with the rest of the screen.  I am assuming it has something to do with the myriad of div tags being implemented, but since I have very limited experience with this kind of thing, I have no idea where to start figuring this out.  Any thoughts would be appreciated.
Shinu
Top achievements
Rank 2
 answered on 28 Mar 2011
1 answer
73 views
I see showNext which works, but I dont see a showPrev...?
Princy
Top achievements
Rank 2
 answered on 28 Mar 2011
1 answer
207 views
Hi All ,

I use the radcombobox and the event onkeypressing() ,when i type text on radcombobox i can't get the current text completely  ,
Ex:
i set Loadondemand=false ( i can't use this feature bcos everything must process on Client site)
i want to get the whole text , that user has typed.
And in this event i receive 2 parameters , sender  and eventArgs

but i don't know how to get completely the text , it always miss latest characters,

Pls help me .


Shinu
Top achievements
Rank 2
 answered on 28 Mar 2011
9 answers
473 views
Hi,

I'm working on a time sheet application that has a dropdownlist on the first column to select the charge code.  The requirements I have is that this column be read-only in edit mode to disallow the user to change the charge code.  I've seen some code examples online, but they don't completely solve the problem because sometimes the charge codes are inactivated for a user, so they will no longer show up on in the dropdownlist, which throws an error. 

Is there a way to switch this to readonly on the PreRender, or otherwise prevent the dropdownlist from databinding?

Thanks!
Jayesh Goyani
Top achievements
Rank 2
 answered on 28 Mar 2011
1 answer
114 views
how can i get the value in gridnumeric column
Shinu
Top achievements
Rank 2
 answered on 28 Mar 2011
4 answers
228 views
Hi,
In my RadPanelBar, the item text is wrapped if it's too long . The problem is when I hover the mouse over the item, only the first line changes color and this is confusing to user. Is it possible for both(or all) lines of text for that text to change color on mouse over ?

Thanks
Steele
Top achievements
Rank 1
 answered on 28 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?