Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
161 views
Please find the attached actual and expected png images.  Actual image does not have gray background to the left of the arrow image of detail table. We would like to know the css so that actual image has gray background as expected image.

Please help.
Eyup
Telerik team
 answered on 09 Jun 2014
1 answer
159 views
Hi,
is it possible to increase height to Agenda View in RadScheduler?
Thanks
Nencho
Telerik team
 answered on 09 Jun 2014
3 answers
309 views
Hi gentlemans,

Here is my aspx code:
<telerik:GridTemplateColumn DataField="DA_RESLN" HeaderText="Date de résolution" UniqueName="DA_RESLN" SortExpression="DA_RESLN"
ShowFilterIcon="True" HeaderStyle-Width="120px" FilterControlWidth="100px"
AutoPostBackOnFilter="True" FilterDelay="2000">
    <ItemTemplate>
        <asp:Label ID="LabelDateResolution" Text='<%#Eval("DA_RESLN", "{0:yyyy-MM-dd}")%>' runat="server"></asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
        <telerik:RadDatePicker runat="server" ID="DatePickerDateResolution" SelectedDate='<%#Eval("DA_RESLN")%>' Calendar-Visible="True" ></telerik:RadDatePicker>
        <asp:CustomValidator ID="DatePickerDateResolution_Validator" runat="server" ErrorMessage="*Obligatoire" Display="Dynamic" ValidateEmptyText="True" ControlToValidate="DatePickerDateResolution" OnServerValidate="dtePickerDaReslnValidator_ServerValidate"></asp:CustomValidator>
    </EditItemTemplate>
</telerik:GridTemplateColumn>

I must be missing something here because the filter is rendered correctly and works perfectly except that it dosent show the calendar at right of the inputbox just like a GridDateTimeColumn does. Anyone ??

Thanks in advance,
Eyup
Telerik team
 answered on 09 Jun 2014
1 answer
180 views
I am using radmultipage for a wizard.
I have a grid on one of the tabs.

My grid has a lot of spacing/padding when it renders. The grids on separate pages look fine, they just look broken inside a tabstrip.
Also my combobox images do not load properly in edit mode.

I have attached images for both.

Below is my grid declaration:

<telerik:RadGrid ID="rgContingentBeneficiary" runat="server" OnNeedDataSource="rgContingentBeneficiary_NeedDataSource"
    OnInsertCommand="rgContingentBeneficiary_InsertCommand" OnUpdateCommand="rgContingentBeneficiary_UpdateCommand"
    OnItemCreated="rgContingentBeneficiary_ItemCreated" OnDeleteCommand="rgContingentBeneficiary_DeleteCommand"
    OnItemDataBound="rgContingentBeneficiary_ItemDataBound">
    <MasterTableView Width="750px" CommandItemDisplay="Bottom" EditMode="EditForms" DataKeyNames="BeneficiaryID,BeneficiaryPercent">
        <CommandItemSettings ShowRefreshButton="false" ShowExportToExcelButton="false" ShowExportToPdfButton="false"
            ShowExportToWordButton="false" ShowExportToCsvButton="false" ShowAddNewRecordButton="true"
            AddNewRecordText="Add New Beneficiary" />
        <Columns>
            <telerik:GridBoundColumn DataField="BeneficiaryID" UniqueName="BeneficiaryID" Display="false">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn HeaderText="Full Name" SortExpression="Beneficiary" UniqueName="Beneficiary"
                ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="44%"
                ItemStyle-Wrap="true">
                <ItemTemplate>
                    <%# Eval("Beneficiary")%>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Relationship" SortExpression="BeneficiaryRelationship"
                ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="30%"
                UniqueName="BeneficiaryRelationship">
                <ItemTemplate>
                    <%# Eval("BeneficiaryRelationship")%>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Percentage" SortExpression="BeneficiaryPercentage"
                HeaderStyle-Width="20%" UniqueName="BeneficiaryPercentage">
                <ItemTemplate>
                    <telerik:RadNumericTextBox ID="txtBeneficiaryPercentage" runat="server" DbValue='<%# Eval("BeneficiaryPercentage") %>'
                        Type="Percent" BorderStyle="None" BackColor="Transparent" NumberFormat-DecimalDigits="1">
                        <ClientEvents OnBlur="Blur" OnFocus="Focus" />
                    </telerik:RadNumericTextBox>
                </ItemTemplate>
                <FooterTemplate>
                    <telerik:RadTextBox ID="txtFooterTotal" runat="server" BorderStyle="None" BackColor="Transparent">
                        <ClientEvents OnLoad="Load" />
                    </telerik:RadTextBox>
                </FooterTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" EditText="Edit" CancelText="Cancel"
                HeaderStyle-Width="3%" UniqueName="EditCommandColumn">
                <ItemStyle />
            </telerik:GridEditCommandColumn>
            <telerik:GridButtonColumn ButtonType="ImageButton" ConfirmText="Delete this Beneficiary?"
                HeaderStyle-Width="3%" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                <ItemStyle HorizontalAlign="Center" />
            </telerik:GridButtonColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <PopUpSettings Modal="false" Width="650px" />
            <EditColumn UniqueName="EditCommandColumn">
            </EditColumn>
            <FormTemplate>
                <fieldset>
                    <legend><b>Current Designation</b></legend>
                    <table width="650px">
                        <tr>
                            <td colspan="6">
                                <asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableClientScript="true"
                                    DisplayMode="List" HeaderText="Please correct the errors below:" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                  
                            </td>
                            <td>
                                <asp:Label ID="Label1" runat="server" Text="Full Name:"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtFullName" runat="server" Width="150px" Text='<%# Eval("Beneficiary")%>'>
                                    <ReadOnlyStyle ForeColor="DarkGray" />
                                </telerik:RadTextBox>
                                <asp:RequiredFieldValidator ID="reqFullName" runat="server" ControlToValidate="txtFullName"
                                    Text="*" ErrorMessage="* Beneficiary Name is required"></asp:RequiredFieldValidator>
                            </td>
                            <td>
                                  
                            </td>
                            <td>
                                <asp:Label ID="Label3" runat="server" Text="Address 1:"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtAddress1" runat="server" Width="150px" Text='<%# Eval("Address1")%>'>
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                  
                            </td>
                            <td>
                                <asp:Label ID="Label8" runat="server" Text="Relationship:"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadComboBox ID="ddlRelationship" runat="server"  LoadingMessage="Loading Relationship..."
                                    DataSourceID="_dataSrcRelationship" DataTextField="BeneficiaryRelationship" DataValueField="BeneficiaryRelationship"
                                    MarkFirstMatch="True" ToolTip="Select a Relationship" AllowCustomText="false"
                                    Width="150px">
                                </telerik:RadComboBox>
                                <asp:RequiredFieldValidator ID="reqRelationship" runat="server" ControlToValidate="ddlRelationship"
                                    Text="*" ErrorMessage="* Relation Type is required"></asp:RequiredFieldValidator>
                            </td>
                            <td>
                                  
                            </td>
                            <td>
                                <asp:Label ID="Label10" runat="server" Text="Address 2:"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtAddress2" runat="server" Width="150px" Text='<%# Eval("Address2")%>'>
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                  
                            </td>
                            <td>
                                <asp:Label ID="Label7" runat="server" Text="Percentage:"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadNumericTextBox ID="txtPercentage" Width="150px" runat="server" Text='<%# Eval("BeneficiaryPercentage") %>'
                                    MinValue="0" MaxValue="100" MaxLength="4">
                                    <NumberFormat DecimalDigits="1" />
                                </telerik:RadNumericTextBox>
                                  
                                <asp:RequiredFieldValidator ID="reqPercentage" runat="server" ControlToValidate="txtPercentage"
                                    Text="*" ErrorMessage="* Percentage is required"></asp:RequiredFieldValidator>
                            </td>
                            <td>
                                  
                            </td>
                            <td>
                                <asp:Label ID="Label4" runat="server" Text="City:"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtCity" runat="server" Width="150px" Text='<%# Eval("City")%>'>
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                  
                            </td>
                            <td>
                                <asp:Label ID="Label2" runat="server" Text="Birth Date/Trust Date:"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadDatePicker ID="rdpBirthDate" runat="server" Width="150px" DbSelectedDate='<%# Eval("BeneficiaryBirthDate")%>'
                                    MinDate="1/1/1900">
                                    <ClientEvents OnDateSelected="OnDateSelected" />
                                    <DateInput ID="DateInput1" runat="server">
                                        <ClientEvents OnError="onDateError" OnBlur="onBlur" />
                                    </DateInput>
                                </telerik:RadDatePicker>
                                <asp:CustomValidator runat="server" ID="cvBirthDate" ClientValidationFunction="CustomValidate"
                                    Text="*" ErrorMessage="* Date should be valid and less than today's date." />
                            </td>
                            <td>
                                  
                            </td>
                            <td>
                                <asp:Label ID="Label5" runat="server" Text="State:"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadComboBox ID="ddlState" runat="server"  LoadingMessage="Loading State..."
                                    DataSourceID="_dataSrcStateList" DataTextField="StateCode" DataValueField="StateCode"
                                    MarkFirstMatch="False" ToolTip="Select a State" AllowCustomText="false" Width="100px">
                                </telerik:RadComboBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                  
                            </td>
                            <td>
                                <asp:Label ID="Label9" runat="server" Text="SSN/Tax ID:"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtBeneficiarySsn" runat="server" Width="150px" Text='<%# Eval("BeneficiarySsn")%>'>
                                </telerik:RadTextBox>
                            </td>
                            <td>
                                  
                            </td>
                            <td>
                                <asp:Label ID="Label6" runat="server" Text="Postal Code:"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadNumericTextBox ID="txtPostalCode" Width="150px" runat="server" Text='<%# Bind("PostalCode") %>'
                                    MinValue="00001" MaxValue="99999">
                                    <NumberFormat DecimalDigits="0" GroupSizes="5" />
                                </telerik:RadNumericTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                  
                            </td>
                            <td>
                                <asp:Label ID="Label12" runat="server" Text="Country:"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtCountry" runat="server" Width="150px" Text='<%# Eval("Country")%>'>
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="6" style="text-align: center">
                                <br />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="5" style="text-align: left">
                                  
                            </td>
                            <td style="text-align: left">
                                <telerik:RadButton ID="btnUpdate" runat="server" Text="OK" CommandArgument="Update record"
                                    CommandName='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "PerformInsert" : "Update" %>'>
                                    <Icon PrimaryIconUrl="../../App_Themes/Images/rbOk.jpg" PrimaryIconLeft="5"
                                        PrimaryIconTop="4"></Icon>
                                </telerik:RadButton>
                                  
                                <telerik:RadButton runat="server" ID="btnCancel" CommandName="Cancel" CommandArgument="Cancel Edit"
                                    Text="Cancel" CausesValidation="false">
                                    <Icon PrimaryIconUrl="../../App_Themes/Images/rbCancel.jpg" PrimaryIconLeft="5"
                                        PrimaryIconTop="4"></Icon>
                                </telerik:RadButton>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="6" style="text-align: center">
                                <br />
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>

Venelin
Telerik team
 answered on 09 Jun 2014
1 answer
240 views
I've Two tabs, First tab where I've defined class = "k-state-active". In 2nd tab, i've few buttons & Grid. Based on button click I need Grid (in the 2nd tab) to be populated (server side) after the postback. I've below JQuery to show 2nd tab after postback which is not working.


$(function () {
   $('Button').click(function () {
       var tabstrip = $("#tabstrip").kendoTabStrip().data("kendoTabStrip");​​
       tabstrip.select(1);
    });
});

With above code, I'm getting first tab instead of 2nd tab after button click. Please help.
Alex Gyoshev
Telerik team
 answered on 09 Jun 2014
1 answer
95 views
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
 
 
           <telerik:RadGrid ID="radGridBooks" runat="server"
               AutoGenerateColumns="False"
               ShowFooter="True"
               CellSpacing="0"
               GridLines="None"
               Skin="Default"
               OnNeedDataSource="radGridBooks_NeedDataSource">
 
               <MasterTableView CommandItemDisplay="Top" EditMode="PopUp" GridLines="None" TableLayout="Fixed">
 
                   <CommandItemSettings AddNewRecordText="Add New Book" RefreshText="Refresh"></CommandItemSettings>
                   <Columns>
 
                       <telerik:GridEditCommandColumn></telerik:GridEditCommandColumn>
                       <telerik:GridBoundColumn DataField="ID" UniqueName="ID" HeaderText="Book ID"></telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="Name" HeaderText="Book Name">
                           <ColumnValidationSettings EnableRequiredFieldValidation="true" EnableModelErrorMessageValidation="true">
                               <RequiredFieldValidator ForeColor="Red" ErrorMessage="Required"></RequiredFieldValidator>
                           </ColumnValidationSettings>
                       </telerik:GridBoundColumn>
                       <telerik:GridButtonColumn Text="Del" CommandName="DeleteBook" CommandArgument="ID"></telerik:GridButtonColumn>
                   </Columns>
                   <EditFormSettings EditFormType="Template" CaptionDataField="ID" PopUpSettings-ScrollBars="Auto" PopUpSettings-Modal="True" PopUpSettings-ShowCaptionInEditForm="true">
                       <FormTemplate>
                           <table width="100%">
                               <tr>
                                   <td>Try</td>
                               </tr>
                           </table>
                       </FormTemplate>
                   </EditFormSettings>
               </MasterTableView>
               <ClientSettings EnableRowHoverStyle="true">
               </ClientSettings>
           </telerik:RadGrid>
 
       </telerik:RadAjaxPanel>



LOOK THIS PHOTO
Princy
Top achievements
Rank 2
 answered on 09 Jun 2014
1 answer
237 views
Hi Sir,

I put the Grid on the usercontrol, I have to set the usercontrol enabledviewstate="false", the problem is now the  OnItemCommand="MyGrid_ItemCommand" not fired or not triggered, that means when I click 'Edit' or other commandbutton ,nothing happen, If I set the enabledviewstate = 'true' for the usercontrol, everything works fine, but I need to disable the viewstate for whole usercontrol,  do you have some suggetions about this issue? how can I trigger/fire the OnItemCommand event when whole usercontrol  'EnableViewState'  is false.
Thanks

Regards

Princy
Top achievements
Rank 2
 answered on 09 Jun 2014
2 answers
311 views
I am in the process of changing from a GridView to a RadGrid and have been experiencing a few issues.

I am attempting to pull an "Active" token from my RadGrid that displays a lot of product information. I do not have the "Active" token being displayed to the user though. It is not set to a hidden value either. The token gets pulled when the user presses the Delete button inside a GridTemplateColumn on my RadGrid.

Before with the GridView, I could use System.Web.UI.DataBinder.Eval(e.Row.DataItem, "Active") and it would return whether or not the Active token was a 1 or a 0.

I currently have the following in VB.NET:

Protected Sub rgvMyGrid_RowCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgvMyGrid.ItemCommand
 
  If (e.CommandName = "DeleteMSDS") Then
    Dim myDelete As WinampButton = CType(e.Item.FindControl("btnDelete"), WinampButton)
    myDelete.CommandName = "DeleteMSDS"
    myDelete.CommandArgument = System.Web.UI.DataBinder.Eval(e.Item.DataItem, "MSDSID")
    If System.Web.UI.DataBinder.Eval(e.item.DataItem, "Active")
      myDelete.Attributes.Add("onClick", "javascript:return confirm('Are you sure you want to permanently delete this SDS / MSDS?');")
    End If
  End If


Before this worked like a charm, but I am having trouble. I have noticed that the System.Web.UI.DataBinder(e.Item.DataItem, "MSDSID") never returns anything. And in turn, it cannot find an instance of "Active" being used then.
Alexander
Top achievements
Rank 1
 answered on 06 Jun 2014
2 answers
279 views

Hi,


I am using RadGrid for an webapplication that runs on touch screen
monitor. It becomes very difficult for the users to scroll using the
standard sized scroll bars that come up in radgrid. Can someone please
advice on how to increase the scroll bar width.

image attach below

thanks
Marin
Telerik team
 answered on 06 Jun 2014
1 answer
143 views
I am using the "NeedDataSource" method to fill in a grid.  On the ItemDataBound I am setting the background colors for some values in a couple of column cells.  (Sub below)

This displays properly.  Dragging columns around works properly and the colors follow the cells.  However, when you do a grouping by dragging the column to the top of the grid the colors do not stay with the cells.

I have attached a before and after image...

Any ideas why this is moving?   I am setting the colors based on the FindByUniqueName identifier for the column.

Thanks,
Nathan


Protected Sub rgDispatch_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles rgDispatch.ItemDataBound
    '//Is it a GridDataItem
    If Not IsNothing(TryCast(e.Item, Telerik.Web.UI.GridDataItem)) Then
        'Get the instance of the right type
        Dim dataBoundItem As Telerik.Web.UI.GridDataItem = DirectCast(e.Item, Telerik.Web.UI.GridDataItem)
        'Set the desired color on the Status column based on the value
        Dim StatusColIndex As Integer = rgDispatch.Columns.FindByUniqueName("Status").OrderIndex
        Select Case dataBoundItem("Status").Text
            Case "Loading"
                dataBoundItem("Status").BackColor = System.Drawing.Color.Yellow
            Case "Loaded"
                dataBoundItem("Status").BackColor = System.Drawing.Color.DodgerBlue
            Case "Claimed"
                dataBoundItem("Status").BackColor = System.Drawing.Color.Orange
            Case "Started"
                dataBoundItem("Status").BackColor = System.Drawing.Color.FromArgb(19, 229, 19)  'Green color
            Case "Stopped"
                dataBoundItem("Status").BackColor = System.Drawing.Color.IndianRed
        End Select
        'Set the desired color on the Status column based on the value
        Dim MatReadyColIndex As Integer = rgDispatch.Columns.FindByUniqueName("MatReady").OrderIndex
        Select Case dataBoundItem("MatReady").Text
            Case "Yes"
                e.Item.Cells(MatReadyColIndex).BackColor = System.Drawing.Color.FromArgb(19, 229, 19)
            Case "No"
                e.Item.Cells(MatReadyColIndex).BackColor = System.Drawing.Color.IndianRed
        End Select
    End If
    If Not IsNothing(TryCast(e.Item, Telerik.Web.UI.GridPagerItem)) Then
        Dim pager As Telerik.Web.UI.GridPagerItem = DirectCast(e.Item, Telerik.Web.UI.GridPagerItem)
        Dim PagerLabel As Label = pager.FindControl("ChangePageSizeLabel")
        PagerLabel.Text = "Items per Page"
    End If
End Sub
Nathan
Top achievements
Rank 1
 answered on 06 Jun 2014
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?