Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
597 views
Hi,

I am trying to to bind the readonly property of a text box in Edit Item Template of rad grid as below, But it is not working. Please help me to achieve this.

<telerik:GridTemplateColumn DataField="invAmountToPay" SortExpression="invAmountToPay" UniqueName="invAmountToPay"
                                    Aggregate="Sum" DataType="System.Decimal" HeaderText="Amount To Pay"
                                    FooterAggregateFormatString="{0:N}" AllowFiltering="false">
                                    <EditItemTemplate>
                                        <asp:TextBox runat="server"
                                            ID="AmountToPayTextBox"
                                            Width="90px"
                                            Style="text-align: right"
                                            Text='<%# Eval("invAmountToPay","{0:N}") %>' 
                                            ReadOnly='<%# Eval("isReadOnly") %>'                                          
                                            DataFormatString="{0:N}">
                                        </asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="AmountToPayLabel" runat="server" Text='<%# Eval("invAmountToPay","{0:N}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle Width="100px" />
                                    <FooterStyle HorizontalAlign="Right" />
                                    <ItemStyle HorizontalAlign="Right" ForeColor="#0000ff" />
                                </telerik:GridTemplateColumn>





Princy
Top achievements
Rank 2
 answered on 22 May 2014
1 answer
186 views
I have a number of Ajaxified controls and panels using the RadAjaxManagerProxy. Everything works fine, except the following scenario: I have a panel (UpdatedControl) that shows or hides based on a radio button (AjaxControlID). I have another panel that shows or hides based on a dropdown list. The radio button controlled panel has a number of fields with validators attached. If the panel controlled from the radio button is shown, for every dropdownlist ajax call on the screen, all validation messages inside the radio button controlled panel will repeat. I've read that taking the validators outside the Ajaxified panel will fix the problem, but this is not feasible as the validation indicators need to appear next to the fields they are validating.
Shinu
Top achievements
Rank 2
 answered on 22 May 2014
3 answers
174 views
I have a ComboBox with a over 100 items in it. I expect that when the dropdown list appears, it would expand to show as many items as possible, given the browser's viewport, then show a scroll bar within the dropdownlist to allow selection of additional items. Instead the ComboBox's dropdown list expands up to the height of the entire page, meaning the user must scroll the entire page to see the list. Is there a way to configure the RadComboBox to function as desired?
Princy
Top achievements
Rank 2
 answered on 22 May 2014
15 answers
430 views
Hi,
I have a similar problem as mentioned in the following thread:
http://www.telerik.com/community/forums/aspnet-ajax/grid/issue-with-filtering-on-multiple-columns-when-mastertableview-enablecolumnsviewstate-false.aspx
I need to have the EnableColumnsViewState disabled and make the grid to be filtered by two columns. At the end of the thread mentioned it is said to create the FilterExpression over and over again. I tried to do that by saving the CurrentFilterValue and the CurrentFilterFunction and using the EvaluateFilterExpression method of the column.
But most of the time when the EvaluateFilterExpression is called it returns string.Empty even after I have reset the CurrentFilterValue and the CurrentFilterFunction of the column.

So my question is if there is another way to evaluate the FilterExpression. Or are there other properties to be set to evaluate a column's FilterExpression correctly?

Best regards

Ferdinand

Princy
Top achievements
Rank 2
 answered on 22 May 2014
2 answers
302 views
I have a RadGrid with child DetailsTables bound to Entity Data sources. This all works.

How do I add dynamically add a column to, say, a second-level Data Table, which gets the "MAX" value for the third-level Data Table.

For example:

 - Job Type 
  - Job  <--- [I need to show the Wage for the current â€‹Effective Date here]
     - Effective Date(s) + Wage

I figure I'll need to do this dynamically, as it's too tricky to determine the current effective date, e.g. (now <= Effective Date).First() . 

Anyway, not sure if I do this in ItemCreated for the OwnerTableView of the DetailsTable or in a higher-up event.

Thanks.
Peter
Top achievements
Rank 1
 answered on 22 May 2014
1 answer
149 views
I add
<telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload"></telerik:RadAsyncUpload>
to an empty .aspx web page
When selecting any file type it always shows the red Circle
I tried every possible properties of  RadAsyncUpload  I know such as MaxFileSize
I guess it may be a network issue , since we have a proxy in our network.
Any one have and Idea about this?
Boyan Dimitrov
Telerik team
 answered on 21 May 2014
4 answers
257 views
My combobox shows a background color and I am not able to figure out how to show a white background.
I also tried building a new style using the stylebuilder. It showed a white background when I was building it but wehn I used it in my website it came up with a gray background.

I want the combo to look like the first dropdown in the attached image (that is using an asp.net dropdownlist)

.RadComboBox_WebBlue
{
    color: #333;
    font: normal 12px "Segoe UI" ,Arial,Helvetica,sans-serif;
    line-height: 16px;
}
.RadComboBox_WebBlue .rcbInputCell, .RadComboBox_WebBlue .rcbArrowCell
{
    background-image: url('ComboBox/radFormSprite.png');
    _background-image: url('ComboBox/radFormSpriteIE6.png');
}
.RadComboBox_WebBlue .rcbInputCellLeft
{
    background-position: 0 0;
}
.RadComboBox_WebBlue .rcbInputCellRight
{
    background-position: 100% 0;
}
.RadComboBox_WebBlue .rcbInput
{
    color: #333;
    font: normal 12px "Segoe UI" ,Arial,Helvetica,sans-serif;
    line-height: 16px;
}
.RadComboBox_WebBlue .rcbEmptyMessage
{
    font-style: italic;
    color: #8a8a8a;
}
.RadComboBox_WebBlue .rcbArrowCellLeft
{
    background-position: 0 -176px;
}
.RadComboBox_WebBlue .rcbArrowCellRight
{
    background-position: -18px -176px;
}
.RadComboBox_WebBlue .rcbArrowCellLeft.rcbArrowCellHidden
{
    background-position: 0 0;
}
.RadComboBox_WebBlue .rcbArrowCellRight.rcbArrowCellHidden
{
    background-position: 100% 0;
}
.RadComboBox_WebBlue .rcbHovered .rcbInputCellLeft
{
    background-position: 0 -22px;
}
.RadComboBox_WebBlue .rcbHovered .rcbInputCellRight
{
    background-position: 100% -22px;
}
.RadComboBox_WebBlue .rcbHovered .rcbInput
{
    color: black;
}
.RadComboBox_WebBlue .rcbHovered .rcbArrowCellLeft
{
    background-position: -36px -176px;
}
.RadComboBox_WebBlue .rcbHovered .rcbArrowCellRight
{
    background-position: -54px -176px;
}
.RadComboBox_WebBlue .rcbHovered .rcbArrowCellLeft.rcbArrowCellHidden
{
    background-position: 0 -22px;
}
.RadComboBox_WebBlue .rcbHovered .rcbArrowCellRight.rcbArrowCellHidden
{
    background-position: 100% -22px;
}
.RadComboBox_WebBlue .rcbFocused .rcbInputCellLeft
{
    background-position: 0 -44px;
}
.RadComboBox_WebBlue .rcbFocused .rcbInputCellRight
{
    background-position: 100% -44px;
}
.RadComboBox_WebBlue .rcbFocused .rcbInput
{
    color: black;
}
.RadComboBox_WebBlue .rcbFocused .rcbArrowCellLeft
{
    background-position: -72px -176px;
}
.RadComboBox_WebBlue .rcbFocused .rcbArrowCellRight
{
    background-position: -90px -176px;
}
.RadComboBox_WebBlue .rcbFocused .rcbArrowCellLeft.rcbArrowCellHidden
{
    background-position: 0 -44px;
}
.RadComboBox_WebBlue .rcbFocused .rcbArrowCellRight.rcbArrowCellHidden
{
    background-position: 100% -44px;
}
.RadComboBox_WebBlue .rcbDisabled .rcbInputCellLeft
{
    background-position: 0 -66px;
}
.RadComboBox_WebBlue .rcbDisabled .rcbInputCellRight
{
    background-position: 100% -66px;
}
.RadComboBox_WebBlue .rcbDisabled .rcbInput
{
    color: #a5a5a5;
}
.RadComboBox_WebBlue .rcbDisabled .rcbArrowCellLeft
{
    background-position: -108px -176px;
}
.RadComboBox_WebBlue .rcbDisabled .rcbArrowCellRight
{
    background-position: -126px -176px;
}
.RadComboBox_WebBlue .rcbDisabled .rcbArrowCellLeft.rcbArrowCellHidden
{
    background-position: 0 -66px;
}
.RadComboBox_WebBlue .rcbDisabled .rcbArrowCellRight.rcbArrowCellHidden
{
    background-position: 100% -66px;
}
.RadComboBox_WebBlue .rcbReadOnly .rcbInputCellLeft
{
    background-position: 0 -88px;
}
.RadComboBox_WebBlue .rcbReadOnly .rcbInputCellRight
{
    background-position: 100% -88px;
}
.RadComboBox_WebBlue .rcbReadOnly .rcbInput
{
    color: #333;
}
.RadComboBox_WebBlue .rcbReadOnly .rcbArrowCellLeft
{
    background-position: -144px -176px;
}
.RadComboBox_WebBlue .rcbReadOnly .rcbArrowCellRight
{
    background-position: -162px -176px;
}
.RadComboBox_WebBlue .rcbReadOnly .rcbArrowCellLeft.rcbArrowCellHidden
{
    background-position: 0 -88px;
}
.RadComboBox_WebBlue .rcbReadOnly .rcbArrowCellRight.rcbArrowCellHidden
{
    background-position: 100% -88px;
}
.RadComboBox_WebBlue .rcbHovered .rcbReadOnly .rcbInputCellLeft
{
    background-position: 0 -110px;
}
.RadComboBox_WebBlue .rcbHovered .rcbReadOnly .rcbInputCellRight
{
    background-position: 100% -110px;
}
.RadComboBox_WebBlue .rcbHovered .rcbReadOnly .rcbInput
{
    color: black;
}
.RadComboBox_WebBlue .rcbHovered .rcbReadOnly .rcbArrowCellLeft
{
    background-position: -180px -176px;
}
.RadComboBox_WebBlue .rcbHovered .rcbReadOnly .rcbArrowCellRight
{
    background-position: -198px -176px;
}
.RadComboBox_WebBlue .rcbHovered .rcbReadOnly .rcbArrowCellLeft.rcbArrowCellHidden
{
    background-position: 0 -110px;
}
.RadComboBox_WebBlue .rcbHovered .rcbReadOnly .rcbArrowCellRight.rcbArrowCellHidden
{
    background-position: 100% -110px;
}
.RadComboBox_WebBlue .rcbFocused .rcbReadOnly .rcbInputCellLeft
{
    background-position: 0 -132px;
}
.RadComboBox_WebBlue .rcbFocused .rcbReadOnly .rcbInputCellRight
{
    background-position: 100% -132px;
}
.RadComboBox_WebBlue .rcbFocused .rcbReadOnly .rcbInput
{
    color: black;
}
.RadComboBox_WebBlue .rcbFocused .rcbReadOnly .rcbArrowCellLeft
{
    background-position: -216px -176px;
}
.RadComboBox_WebBlue .rcbFocused .rcbReadOnly .rcbArrowCellRight
{
    background-position: -234px -176px;
}
.RadComboBox_WebBlue .rcbFocused .rcbReadOnly .rcbArrowCellLeft.rcbArrowCellHidden
{
    background-position: 0 -132px;
}
.RadComboBox_WebBlue .rcbFocused .rcbReadOnly .rcbArrowCellRight.rcbArrowCellHidden
{
    background-position: 100% -132px;
}
.RadComboBox_WebBlue .rcbDisabled .rcbReadOnly .rcbInputCellLeft
{
    background-position: 0 -154px;
}
.RadComboBox_WebBlue .rcbDisabled .rcbReadOnly .rcbInputCellRight
{
    background-position: 100% -154px;
}
.RadComboBox_WebBlue .rcbDisabled .rcbReadOnly .rcbInput
{
    color: #a5a5a5;
}
.RadComboBox_WebBlue .rcbDisabled .rcbReadOnly .rcbArrowCellLeft
{
    background-position: -252px -176px;
}
.RadComboBox_WebBlue .rcbDisabled .rcbReadOnly .rcbArrowCellRight
{
    background-position: -270px -176px;
}
.RadComboBox_WebBlue .rcbDisabled .rcbReadOnly .rcbArrowCellLeft.rcbArrowCellHidden
{
    background-position: 0 -154px;
}
.RadComboBox_WebBlue .rcbDisabled .rcbReadOnly .rcbArrowCellRight.rcbArrowCellHidden
{
    background-position: 100% -154px;
}
.RadComboBoxDropDown_WebBlue
{
    border-color: #8a8a8a;
    color: #333;
    background: white;
    font: normal 12px "Segoe UI" ,Arial,Helvetica,sans-serif;
    line-height: 16px;
}
.RadComboBoxDropDown_WebBlue .rcbHeader, .RadComboBoxDropDown_WebBlue .rcbFooter
{
    color: #333;
    background-color: #eaeaea;
    background-image: url('Common/radFormSprite.png');
    _background-image: url('Common/radFormSpriteIE6.png');
    background-position: 0 -500px;
}
.RadComboBoxDropDown_WebBlue .rcbHeader
{
    border-bottom-color: #8a8a8a;
}
.RadComboBoxDropDown_WebBlue .rcbFooter
{
    border-top-color: #8a8a8a;
}
.RadComboBoxDropDown_WebBlue .rcbHovered
{
    color: black;
    background: #dfdfdf;
}
.RadComboBoxDropDown_WebBlue .rcbDisabled
{
    color: #a5a5a5;
    background-color: transparent;
}
.RadComboBoxDropDown_WebBlue .rcbLoading
{
    color: black;
    background: #dfdfdf;
}
.RadComboBoxDropDown_WebBlue .rcbItem em, .RadComboBoxDropDown_WebBlue .rcbHovered em
{
    color: black;
    background: #dfdfdf;
}
.RadComboBoxDropDown_WebBlue .rcbCheckAllItems
{
    color: #333;
    background-color: #eaeaea;
}
.RadComboBoxDropDown_WebBlue .rcbCheckAllItemsHovered
{
    color: #333;
    background-color: #eaeaea;
}
.RadComboBoxDropDown_WebBlue .rcbMoreResults
{
    border-top-color: #8a8a8a;
    color: #333;
    background-color: #eaeaea;
    background-position: 0 -500px;
    background-image: url('Common/radFormSprite.png');
    _background-image: url('Common/radFormSpriteIE6.png');
}
.RadComboBoxDropDown_WebBlue .rcbMoreResults a
{
    background-image: url('ComboBox/radFormSprite.png');
    _background-image: url('ComboBox/radFormSpriteIE6.png');
    background-position: -308px -181px;
}
.RadComboBoxDropDown_WebBlue .rcbSeparator
{
    color: #fff;
    background: #8a8a8a;
}
MBEN
Top achievements
Rank 2
Veteran
 answered on 21 May 2014
5 answers
283 views
We are facing an issue in radgrid batch editing for cell, if you try to enter a 4 digit value for decimal, it adds a comma in the value and gives the following error upon saving changes:

System.Exception: 1,200.00 is not a valid value for Decimal. ---> System.FormatException: Input string was not in a correct format.

Also tested it on rad grid demo site and same issue is there as well:

http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultvb.aspx

Please try entering a 4 digit value for column 'UnitPrice', after entering the value it will add a comma and show error on save changes, however the error is different.

Thanks
Angel Petrov
Telerik team
 answered on 21 May 2014
2 answers
140 views
I have a piechart, binding data from a storedprocedure. I am getting 2 columns  one is Age and BusinessTotal. Based on Age column data, Color should be showed. Please let me know how to accomplish this.

<telerik:RadHtmlChart runat="server" ID="RadHtmlChart3" Width="300" Height="300" Transitions="true">
                    <Appearance>
                         <FillStyle BackgroundColor="White"></FillStyle>
                    </Appearance>                  
                    <Legend>
                         <Appearance BackgroundColor="White" Position="Right" Visible="false">
                         </Appearance>
                    </Legend>
                    <PlotArea>
                         <Appearance>
                              <FillStyle BackgroundColor="White"></FillStyle>
                         </Appearance>
                         <Series>
                              <telerik:PieSeries DataFieldY="BusinessTotal"  StartAngle="90" >
                                   <LabelsAppearance Visible="false" Position="InsideEnd" DataFormatString="{0:N0}">
                                   </LabelsAppearance>
                                   <TooltipsAppearance Color="White"  DataFormatString="{0:N0}"></TooltipsAppearance>
                         


Databinding : C#
protected void GetBusinessData(string metricName)
        {
                SqlCommand cmdProc = new SqlCommand("[oss].[SelectSalespersonBusinessAge]", SqlConnection);
                cmdProc.CommandType = CommandType.StoredProcedure;
                cmdProc.Parameters.AddWithValue("@LoginName", loginName);
                cmdProc.Parameters.AddWithValue("@MetricYear", metricYear);
                cmdProc.Parameters.AddWithValue("@MetricMonth", metricMonth);

                SqlDataAdapter adp = new SqlDataAdapter();
                adp.SelectCommand = cmdProc;
                adp.Fill(dt);
                RadHtmlChart3.DataSource = dt;
                RadHtmlChart3.DataBind();
                if (dt.Rows[0]["age"].ToString() == "7-12 Months")
                {
                  //Yellow color should be assigned for this part
                  
                }
                if (dt.Rows[1]["age"].ToString() == "12+ Months")
                {
                   //REd for this
                }              
}
              




Neetha
Top achievements
Rank 1
 answered on 21 May 2014
5 answers
370 views
Here is my scenario:

I have a RadGrid with RADAjaxManager rights to update itself. In markup, I have some GridTemplateColumns that contain custom buttons. The rest of the columns get populated via AutoGenerateColumns="true" from the NeedsDataSource event of the grid.

I am using the ItemDataBound event of the grid to setup each GridDataItem, setting some buttons' enabled property and some images based on the grid's data. This is working great to load the grid, and it persists after sorting, paging, and filtering.

The problem that I'm running into is when I click one of the custom buttons, it will properly run through the ItemCommand event of the grid, but then the buttons' enabled state and the images that I set are wiped away. Since my code to set these things up is in the grid's ItemDataBound event and that does not fire after the ItemCommand is fired, I'd like to know what event should I be using to set enabled/image URL type properties of the grid cells?

Thanks!

-Scott
Scott
Top achievements
Rank 1
 answered on 21 May 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?