Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
142 views

I have a RadMenu that I've set up for lightweight rendering. I have the following on the page to remove the icon column:

div.RadMenu .rmGroup:before
{
    width: 0px; /*remove the colored stripe from the left side*/
}
 
div.RadMenu .rmGroup .rmLink
{
    padding-left: 0px; /*remove the text padding from the left side*/
}
 
div.RadMenu .rmGroup .rmSeparator
{
    margin-left: 0px;/*stretch the separator*/
}

 

This works great except for the first menu item. Due to its length, I have that menu set as a two-column menu. Unfortunately, the background for the icon column continues to show up in the first column of this menu item (see the attached screenshot.) I found that I can turn off this background by unchecking .RadMenu .rmGroup.rmMultiGroup in the DOM explorer in my browser, but when I set that to:

 

.RadMenu .rmGroup.rmMultiGroup {
    background: none;
}

 

the background continues to show up.

What should I be doing to get rid of this column?

Thank you!

bdrennen
Top achievements
Rank 1
 answered on 13 Dec 2018
1 answer
224 views
I need to disable some rows in grid view based on the condition. i tried to disable the row. But when i click on row then it's getting highlighted and able to edit.
Vessy
Telerik team
 answered on 13 Dec 2018
2 answers
1.2K+ views
Hello,I have a radgrid with some bound columns. In one of the bound columns, it has ImageButton. All I want is Javascript function when I click the button i want to get value of this row of the button.

It means when I click ImageButton 'CizelgeAc' I want to get EKD_ID of this selected row. my javascript function is 'cizelgeAc1(this,event)


<telerik:GridTemplateColumn HeaderText="Kurs Prog. Çiz." UniqueName="KursProgCiz" DataField="EKD_ID" SortExpression="EKD_ID" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" AllowFiltering="false">
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="CizelgeAc" CommandName="ES" runat="server" CausesValidation="false" OnClientClick="cizelgeAc1(this,event)"
                                                        Visible='<%# (((((string)Eval("EGT_TIPI").ToString() == "V"))) ? true : false) %>'
                                                        ImageUrl="~/Images/AddRecord.gif" />
                                                    <asp:Label runat="server" Visible='<%# (((((string)Eval("EGT_TIPI").ToString() == "A"))) ? true : false) %>' Text="-"></asp:Label>
                                                    <%--                                                    <asp:Image ID="imageKursProgCiz" runat="server" ImageUrl="~/Images/Cancel.gif" Visible='<%# (((((string)Eval("EGT_TIPI").ToString() == "A"))) ? true : false) %>' />                                                  --%>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>

Javascript Function : 

function cizelgeAc1(button, args) {
                var row = Telerik.Web.UI.Grid.GetFirstParentByTagName(button, "tr");
                //guarantee to get to the table row
                while (!(row.id && row.id.indexOf("__") > -1)) {
                    row = Telerik.Web.UI.Grid.GetFirstParentByTagName(button, "tr");
                }
 
                //get index
                var index = row.id.split("__")[1];
 
                //get all table data items
                var tableId = row.id.split("__")[0];
                var tableView = $find(tableId);
                tableView.get_dataItems();
                //find the data item related to the row id
                var dataItem = $find(row.id);
                var grid = button;
                var MasterTable = EgitimTalepleriRadGrid.get_masterTableView();
                 var cell= grid.get_masterTableView().get_dataItems()[0].get_cell("EKD_ID").innerHTML;
 
            }

I got the row index but I couldn't reach value of 'EKD_ID' in this way.

Ilaya
Top achievements
Rank 1
 answered on 13 Dec 2018
1 answer
74 views

     Is it possible to have it highlight the 1st level a color, the side and then add padding to to wrap it in the same   Similar to this example

https://cdn.shopify.com/s/files/1/0035/7279/3459/files/microbit-if-statement-for-robots-button-is-pressed_large.png?v=1530304913

 

The blue being the 1st level and the green being the 2nd level.

 

Attached a grid we are currently using with the blue square where we want it to be a blue background.

 

Marin Bratanov
Telerik team
 answered on 12 Dec 2018
1 answer
163 views

Hello,

I have a page with rad tab there is in that there is radiobuttons. Radwindow is opening  from server side. On click of radiobutton radwindow should open without postback. I have used update panel for stoping postback so when i am clicking on radiobutton radwindow is opening without postback bt when i want to close , cancle , ok radwindow that time page is getting postback for that plz help me to stop postback.

Below I have attached code which i have tried:

javascript code

<script type="text/javascript">
function ExtraFixedFnctn1(arg) {
            if (arg) {
                $get("<%= hdfPrompt1.ClientID %>").value = arg;
                __doPostBack();
            }
            else if (!arg) {
                $get("<%= hdfPrompt1.ClientID %>").value = arg;
                    __doPostBack();
                }
        }
        function ExtraFixedFnctn2(arg) {
            if (arg) {
                $get("<%= hdfPrompt2.ClientID %>").value = arg;
                __doPostBack();
            }
            else if (!arg) {
                $get("<%= hdfPrompt2.ClientID %>").value = arg;
                        __doPostBack();
                    }
            }
            function ExtraFixedFnctn3(arg) {
                if (arg) {
                    $get("<%= hdfPrompt3.ClientID %>").value = arg;
                    __doPostBack();
                }
                else if (!arg) {
                    $get("<%= hdfPrompt3.ClientID %>").value = arg;
                        __doPostBack();
                    }
            }
            function ExtraFixedFnctn4(arg) {
                if (arg) {
                    $get("<%= hdfPrompt4.ClientID %>").value = arg;
                    __doPostBack();
                }
                else if (!arg) {
                    $get("<%= hdfPrompt4.ClientID %>").value = arg;
                    __doPostBack();
                }
        }
</script>

.aspx code

<telerik:RadWindowManager ID="RadWindowManager2" runat="server" Skin="Office2007">
    </telerik:RadWindowManager>
    <asp:HiddenField runat="server" ID="hdfPrompt1" Value="" />
    <asp:HiddenField runat="server" ID="hdfPrompt2" Value="" />
    <asp:HiddenField runat="server" ID="hdfPrompt3" Value="" />
    <asp:HiddenField runat="server" ID="hdfPrompt4" Value="" />
 <asp:UpdatePanel ID="Updatepanel1" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
<telerik:RadPageView runat="server" ID="TaxInfo" TabIndex="2" Font-Names="Arial" ForeColor="DarkBlue">
                <br />
                 
                <table>
                    <tr>
                        <td style="text-align: center;" colspan="4">
                            <asp:Label runat="server" ID="lblTaxInfoError" SkinID="Error" ForeColor="Red"></asp:Label>
                        </td>
                    </tr>
                </table>
 
                <div align="left" style="padding-left: 5px">
                    <table>
                        <tr>
                            <td style="text-align: center; font-weight: bold; font-size: medium; text-decoration: underline; font-family: Arial, Helvetica, sans-serif;" colspan="2">Federal</td>
                            <td style="text-align: center; font-weight: bold; font-size: medium; text-decoration: underline; font-family: Arial, Helvetica, sans-serif;" colspan="2">State</td>
                            <td></td>
                        </tr>
                        <tr>
                            <td style="text-align: left; padding-left: 4px" class="auto-style23" colspan="2">
                                 
 
                            </td>
 
                            <td style="text-align: left">
                                <asp:Label ID="Label6" ForeColor="Red" runat="server" Text="*"></asp:Label>Withholding State: </td>
 
                            <td>
                                <div class="selectWrapper" style="border: 1px  solid red">
                                    <asp:DropDownList ID="ddlStateWithHoldingState" runat="server" CssClass="selectBox">
                                    </asp:DropDownList>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left">Marital Status: </td>
                            <td class="auto-style17">
                                <div class="selectWrapper">
                                    <asp:DropDownList ID="ddlFedMarital" runat="server" CssClass="selectBox">
                                    </asp:DropDownList>
                                </div>
                            </td>
                            <td style="text-align: left">Marital Status:
                            </td>
                            <td>
                                <div class="selectWrapper">
                                    <asp:DropDownList ID="ddlStateMarital" runat="server" CssClass="selectBox">
                                    </asp:DropDownList>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left" class="auto-style18">Exemptions:
                            </td>
                            <td class="auto-style19">
                                <asp:TextBox ID="txtFedExempt" runat="server" Width="30px" MaxLength="2" onfocus="this.select()" CssClass="input"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="reFederalExemptions" runat="server" ValidationGroup="EmployeeUpdate" ControlToValidate="txtFedExempt" ValidationExpression="^\d+$" ErrorMessage="Only numeric values are allowed." ForeColor="red" SetFocusOnError="true" Font-Size="Small"></asp:RegularExpressionValidator>
                            </td>
                            <td style="text-align: left" class="auto-style18">Exemptions:
                            </td>
                            <td class="auto-style18">
                                <asp:TextBox ID="txtStateExempt" onfocus="this.select()" runat="server" Width="30px" MaxLength="2" CssClass="input"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="reStateExemptions" runat="server" ControlToValidate="txtStateExempt" ValidationExpression="^\d+$" ValidationGroup="EmployeeUpdate"
                                    ErrorMessage="Only numeric values are allowed." ForeColor="red" SetFocusOnError="true"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <asp:RadioButton ID="rbFedExtra" runat="server" Text="Extra" OnCheckedChanged="rbFedExtra_CheckedChanged" GroupName="R1" AutoPostBack="true" />
                                <asp:RadioButton ID="rbFedFixed" runat="server" Text="Fixed" OnCheckedChanged="rbFedFixed_CheckedChanged" GroupName="R1" AutoPostBack="true" />
                            </td>
                            <td></td>
                            <td>
                                <asp:RadioButton ID="rbStateExtra" runat="server" Text="Extra" OnCheckedChanged="rbStateExtra_CheckedChanged" GroupName="R2" AutoPostBack="true" />
                                <asp:RadioButton ID="rbStateFixed" runat="server" Text="Fixed" OnCheckedChanged="rbStateFixed_CheckedChanged" GroupName="R2" AutoPostBack="true" />
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left">Extra Withholding:
                            </td>
                            <td class="auto-style17">
                                <asp:RadioButton ID="rbFedExtraDollar" runat="server" Text="$" GroupName="Radio1" OnCheckedChanged="rbFedExtraDollar_CheckedChanged" AutoPostBack="true" Checked="true" />
                                <asp:RadioButton ID="rbFedExtraPercent" runat="server" Text="%" GroupName="Radio1" OnCheckedChanged="rbFedExtraPercent_CheckedChanged" AutoPostBack="true" />
                                <telerik:RadNumericTextBox ID="txtFEDExtraWH" runat="server" Width="70px" NumberFormat-DecimalDigits="2" SelectionOnFocus="SelectAll" mask="nnnnnn.nn" MaxValue="999999.99" MinValue="000000.00" AllowOutOfRangeAutoCorrect="False"></telerik:RadNumericTextBox>
                                <br />
                                 
                                <asp:RegularExpressionValidator runat="server" ID="revFedExtraPercent" ControlToValidate="txtFEDExtraWH" Enabled="false"
                                    ErrorMessage="Enter value between 0 to 100" ForeColor="Red" ValidationGroup="EmployeeUpdate"
                                    ValidationExpression="^100(\.0{0,2}?)?$|^\d{0,2}(\.\d{0,2})?$" Display="Dynamic" SetFocusOnError="True">                    
                                </asp:RegularExpressionValidator>
                            </td>
                            <td style="text-align: left">Extra Withholding:
                            </td>
                            <td>
                                <asp:RadioButton ID="rbStateExtraDollar" runat="server" Text="$" GroupName="Radio2" OnCheckedChanged="rbStateExtraDollar_CheckedChanged" AutoPostBack="true" Checked="true" />
                                <asp:RadioButton ID="rbStateExtraPercent" runat="server" Text="%" GroupName="Radio2" AutoPostBack="true" OnCheckedChanged="rbStateExtraPercent_CheckedChanged" />
                                <telerik:RadNumericTextBox ID="txtStateExtraWH" runat="server" Width="70px" NumberFormat-DecimalDigits="2" SelectionOnFocus="SelectAll" mask="nnnnnn.nn" AllowOutOfRangeAutoCorrect="False" MaxValue="999999.99" MinValue="000000.00"></telerik:RadNumericTextBox>
                                <br />
                                
                                <asp:RegularExpressionValidator runat="server" ID="revStateExtraPercent" ControlToValidate="txtStateExtraWH" Enabled="false"
                                    ErrorMessage="Enter value between 0 to 100" ForeColor="Red" ValidationGroup="EmployeeUpdate"
                                    ValidationExpression="^100(\.0{0,2}?)?$|^\d{0,2}(\.\d{0,2})?$" Display="Dynamic" SetFocusOnError="True">                    
                                </asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <br />
                        <tr>
                            <td style="text-align: left">Fixed Withholding:
                            </td>
                            <td class="auto-style17">
                                <asp:RadioButton ID="rbIsDollarFederal" runat="server" Text="$" GroupName="Radio" AutoPostBack="true" OnCheckedChanged="rbIsDollarFederal_CheckedChanged" Checked="true" />
                                <asp:RadioButton ID="rbIsPercentFederal" runat="server" Text="%" GroupName="Radio" AutoPostBack="true" OnCheckedChanged="rbIsPercentFederal_CheckedChanged" />
                                <telerik:RadNumericTextBox ID="txtFedFixedWH" runat="server" Enabled="true" Width="70px" NumberFormat-DecimalDigits="2" SelectionOnFocus="SelectAll" mask="nnnnnn.nn" MaxValue="999999.99" MinValue="000000.00" AllowOutOfRangeAutoCorrect="False"></telerik:RadNumericTextBox>
                                <br />
                                <%--<asp:RegularExpressionValidator runat="server" ID="revdedamt" ValidationExpression="^[0-9]\d{0,9}(\.\d{1,2})?%?$" ValidationGroup="EmployeeUpdate"
                                    ErrorMessage="Enter only positive integer" ForeColor="Red" ControlToValidate="RadtxtFixedFederalWithholding" Display="Dynamic">
                                </asp:RegularExpressionValidator>
                                <br />--%>
                                <asp:RegularExpressionValidator runat="server" ID="rvFedWithholding" ControlToValidate="txtFedFixedWH" Enabled="false"
                                    ErrorMessage="Enter value between 0 to 100" ForeColor="Red" ValidationGroup="EmployeeUpdate"
                                    ValidationExpression="^100(\.0{0,2}?)?$|^\d{0,2}(\.\d{0,2})?$" Display="Dynamic" SetFocusOnError="True">                    
                                </asp:RegularExpressionValidator>
                                
                            </td>
                            <td style="text-align: left">Fixed Withholding:
                            </td>
                            <td>
                                <asp:RadioButton ID="rbIsDollarState" runat="server" Text="$" GroupName="Radio4" AutoPostBack="true" OnCheckedChanged="rbIsDollarState_CheckedChanged" Checked="true" />
                                <asp:RadioButton ID="rbIsPercentState" runat="server" Text="%" GroupName="Radio4" AutoPostBack="true" OnCheckedChanged="rbIsPercentState_CheckedChanged" />
                                <telerik:RadNumericTextBox ID="txtStateFixedWH" runat="server" Enabled="true" Width="70px" NumberFormat-DecimalDigits="2" SelectionOnFocus="SelectAll" mask="nnnnnn.nn" MaxValue="999999.99" MinValue="000000.00" AllowOutOfRangeAutoCorrect="False"></telerik:RadNumericTextBox>
                                <br />
                                 
                                <asp:RegularExpressionValidator runat="server" ID="rvStateWithholding" ControlToValidate="txtStateFixedWH" Enabled="false"
                                    ErrorMessage="Enter value between 0 to 100" ForeColor="Red" ValidationGroup="EmployeeUpdate"
                                    ValidationExpression="^100(\.0{0,2}?)?$|^\d{0,2}(\.\d{0,2})?$" Display="Dynamic" SetFocusOnError="True">                    
                                </asp:RegularExpressionValidator>
                               </td>
                        </tr>
 
                        <tr>
 
                            <td></td>
                            <td></td>
                            <td>
                                <asp:Label ID="Label7" ForeColor="Red" runat="server" Text="*" />SUI State:
                            </td>
                            <td>
                                <div class="selectWrapper" style="border: 1px  solid red">
                                    <asp:DropDownList ID="ddlSUIState" runat="server" CssClass="selectBox">
                                    </asp:DropDownList>
                                </div>
                            </td>
                        </tr>
                        <tr>
 
                            <td></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td style="text-align: left">Non-taxable pay only:
                            </td>
                            <td class="auto-style17">
                                <asp:CheckBox ID="chkNonTaxableApayAmount" runat="server" AutoPostBack="true" OnCheckedChanged="chkNonTaxableApayAmount_CheckedChanged"></asp:CheckBox>
                            </td>
                            <td style="text-align: left; visibility: hidden">Local Marital Status:
                            </td>
                            <td style="visibility: hidden">
                                <div class="selectWrapper">
                                    <asp:DropDownList ID="ddlLocalMaritalStatus" runat="server" CssClass="selectBox">
                                    </asp:DropDownList>
                                </div>
                            </td>
 
                        </tr>
                        <tr>
                            <td style="text-align: left">OASDI Exempt:
                            </td>
                            <td class="auto-style17">
                                <asp:CheckBox ID="chkOASDIExempt" runat="server"></asp:CheckBox>
                            </td>
                            <td style="text-align: left; visibility: hidden">Local Exemptions:
                            </td>
                            <td style="visibility: hidden">
                                <asp:TextBox ID="txtLocalExemptions" runat="server" Width="30px" MaxLength="2"></asp:TextBox>
                            </td>
 
                        </tr>
                        <tr>
                            <td style="text-align: left">Medicare Exempt:
                            </td>
                            <td class="auto-style17">
                                <asp:CheckBox ID="chkMedicareExempt" runat="server"></asp:CheckBox>
                            </td>
                            <td style="text-align: left; visibility: hidden">Extra Local Withholding:
                            </td>
                            <td style="visibility: hidden">
                                <telerik:RadNumericTextBox ID="RadtxtExtraLocalWithholding" runat="server" Width="70px" NumberFormat-DecimalDigits="2" SelectionOnFocus="SelectAll" mask="nnnnnn.nn"></telerik:RadNumericTextBox>
 
                            </td>
 
                        </tr>
                        <tr>
 
                            <td style="text-align: left; visibility: hidden">Fixed Local Withholding:
                            </td>
                            <td style="visibility: hidden">
                                <asp:RadioButton ID="rbIsDollarLocal" runat="server" Text="$" GroupName="Radio3" Checked="true" />
                                <asp:RadioButton ID="rbIsPercentLocal" runat="server" Text="%" GroupName="Radio3" />
                                <telerik:RadNumericTextBox ID="RadtxtFixedLocalWithholding" runat="server" Enabled="true" Width="70px" NumberFormat-DecimalDigits="2" SelectionOnFocus="SelectAll" mask="nnnnnn.nn"></telerik:RadNumericTextBox>
 
                            </td>
 
                        </tr>
 
                    </table>
                </div>
                        
            </telerik:RadPageView>
 </ContentTemplate>
                    </asp:UpdatePanel>

.aspx.cs code

protected void rbFedExtra_CheckedChanged(object sender, EventArgs e)
        {
            EmployeePortal.Models.NCI.NCIEntities ent = EmployeePortal.Models.ClsNCIUtil.GetNCIEntity(Session["CustomerID"].ToString());
            using (ent)
            {
                var FedExtra = (ent.EmployeeTaxes.Where(a => a.EmployeeId == empno && a.TaxTypeId == 4)).FirstOrDefault();//extra
                if (FedExtra == null)
                {
                    txtFEDExtraWH.Enabled = true;
                    rbFedExtraDollar.Enabled = true;
                    rbFedExtraPercent.Enabled = true;
                    txtFedFixedWH.Text = null;
                    txtFedFixedWH.Enabled = false;
                    rbIsDollarFederal.Enabled = false;
                    rbIsPercentFederal.Enabled = false;
                }
                else
                {
                    if (hdfPrompt1.Value == "")
                    {
                        RadWindowManager2.RadConfirm("Extra amounts override Fixed amounts. Fixed amount will be cleared.  Press OK to continue or Cancel to return to your changes.", "ExtraFixedFnctn1", 400, 150, null, "Extra/Fixed");
                    }
                    else if (hdfPrompt1.Value == "true")
                    {
                        txtFedFixedWH.Text = null;
                        txtFedFixedWH.Enabled = false;
                        rbIsDollarFederal.Enabled = false;
                        rbIsPercentFederal.Enabled = false;
                        txtFEDExtraWH.Enabled = true;
                        rbFedExtraDollar.Enabled = true;
                        rbFedExtraPercent.Enabled = true;
                        var PercentFedExtra = (ent.EmployeeTaxes.Where(a => a.EmployeeId == empno && a.TaxTypeId == 1)).FirstOrDefault();//extra
                        if (PercentFedExtra != null && PercentFedExtra.TaxCalcId == 1)
                        {
                            rbIsDollarFederal.Checked = true;
                            rbIsPercentFederal.Checked = false;
                        }
                        if (PercentFedExtra != null && PercentFedExtra.TaxCalcId == 2)
                        {
                            rbIsPercentFederal.Checked = true;
                            rbIsDollarFederal.Checked = false;
                        }
                        var EmpFedFixed = (from a in ent.EmployeeTaxes
                                           where a.EmployeeId == empno && (a.TaxTypeId == 1)
                                           select new { a.EmployeeId, a.MaritalStatus, a.NumExemptions, a.Amount, a.TaxCalcId }).FirstOrDefault();
                        if (EmpFedFixed != null)
                        {
                            if (EmpFedFixed.Amount == null || EmpFedFixed.Amount == 0)
                                txtFEDExtraWH.Text = "0.00";
                            else
                                txtFEDExtraWH.Text = (EmpFedFixed.Amount).ToString();
                        }
                        var PercentFedFixed = (ent.EmployeeTaxes.Where(a => a.EmployeeId == empno && a.TaxTypeId == 4)).FirstOrDefault();//fixed
                        if (PercentFedFixed != null && PercentFedFixed.TaxCalcId == 1)
                        {
                            rbFedExtraDollar.Checked = true;
                            rbFedExtraPercent.Checked = false;
                        }
                        if (PercentFedFixed != null && PercentFedFixed.TaxCalcId == 2)
                        {
                            rbFedExtraDollar.Checked = false;
                            rbFedExtraPercent.Checked = true;
                        }
                        var EmpFedExtra = (from a in ent.EmployeeTaxes
                                           where a.EmployeeId == empno && (a.TaxTypeId == 4)
                                           select new { a.EmployeeId, a.MaritalStatus, a.NumExemptions, a.Amount, a.TaxCalcId }).FirstOrDefault();
                        if (EmpFedExtra != null)
                        {
                            if (EmpFedExtra.Amount == null || EmpFedExtra.Amount == 0)
                                txtFEDExtraWH.Text = "0.00";
                            else
                                txtFEDExtraWH.Text = (EmpFedExtra.Amount).ToString();
                        }
                        hdfPrompt1.Value = "";
                    }
                    else if (hdfPrompt1.Value == "false")
                    {
                        rbFedExtra.Checked = false;
                        rbFedFixed.Checked = true;
                        hdfPrompt1.Value = "";
                    }
                }
            }
        }
        protected void rbFedFixed_CheckedChanged(object sender, EventArgs e)
        {
            EmployeePortal.Models.NCI.NCIEntities ent = EmployeePortal.Models.ClsNCIUtil.GetNCIEntity(Session["CustomerID"].ToString());
            using (ent)
            {
                var FedFixed = (ent.EmployeeTaxes.Where(a => a.EmployeeId == empno && a.TaxTypeId == 1)).FirstOrDefault();//extra
                if (FedFixed == null)
                {
                    txtFedFixedWH.Enabled = true;
                    rbIsDollarFederal.Enabled = true;
                    rbIsPercentFederal.Enabled = true;
                    txtFEDExtraWH.Text = null;
                    txtFEDExtraWH.Enabled = false;
                    rbFedExtraDollar.Enabled = false;
                    rbFedExtraPercent.Enabled = false;
                }
                else
                {
                    if (hdfPrompt2.Value == "")
                    {
                        RadWindowManager2.RadConfirm("Fixed amounts override Extra amounts. Extra amount will be cleared.  Press OK to continue or Cancel to return to your changes.", "ExtraFixedFnctn2", 400, 150, null, "Extra/Fixed");
                    }
                    else if (hdfPrompt2.Value == "true")
                    {
                        txtFEDExtraWH.Text = null;
                        txtFEDExtraWH.Enabled = false;
                        rbFedExtraDollar.Enabled = false;
                        rbFedExtraPercent.Enabled = false;
                        txtFedFixedWH.Enabled = true;
                        rbIsDollarFederal.Enabled = true;
                        rbIsPercentFederal.Enabled = true;
                        var PercentFedExtra = (ent.EmployeeTaxes.Where(a => a.EmployeeId == empno && a.TaxTypeId == 1)).FirstOrDefault();//extra
                        if (PercentFedExtra != null && PercentFedExtra.TaxCalcId == 1)
                        {
                            rbIsDollarFederal.Checked = true;
                            rbIsPercentFederal.Checked = false;
                        }
                        if (PercentFedExtra != null && PercentFedExtra.TaxCalcId == 2)
                        {
                            rbIsDollarFederal.Checked = false;
                            rbIsPercentFederal.Checked = true;
                        }
                        var EmpFedFixed = (from a in ent.EmployeeTaxes
                                           where a.EmployeeId == empno && (a.TaxTypeId == 1)
                                           select new { a.EmployeeId, a.MaritalStatus, a.NumExemptions, a.Amount, a.TaxCalcId }).FirstOrDefault();
                        if (EmpFedFixed != null)
                        {
                            if (EmpFedFixed.Amount == null || EmpFedFixed.Amount == 0)
                                txtFedFixedWH.Text = "0.00";
                            else
                                txtFedFixedWH.Text = (EmpFedFixed.Amount).ToString();
                        }
                        var PercentFedFixed = (ent.EmployeeTaxes.Where(a => a.EmployeeId == empno && a.TaxTypeId == 4)).FirstOrDefault();//fixed
                        if (PercentFedFixed != null && PercentFedFixed.TaxCalcId == 1)
                        {
                            rbFedExtraDollar.Checked = true;
                            rbFedExtraPercent.Checked = false;
                        }
                        if (PercentFedFixed != null && PercentFedFixed.TaxCalcId == 2)
                        {
                            rbFedExtraDollar.Checked = false;
                            rbFedExtraPercent.Checked = true;
                        }
                        var EmpFedExtra = (from a in ent.EmployeeTaxes
                                           where a.EmployeeId == empno && (a.TaxTypeId == 4)
                                           select new { a.EmployeeId, a.MaritalStatus, a.NumExemptions, a.Amount, a.TaxCalcId }).FirstOrDefault();
                        if (EmpFedExtra != null)
                        {
 
                            if (EmpFedExtra.Amount == null || EmpFedExtra.Amount == 0)
                                txtFedFixedWH.Text = "0.00";
                            else
                                txtFedFixedWH.Text = (EmpFedExtra.Amount).ToString();
                        }
                        hdfPrompt2.Value = "";
                    }
                    else if (hdfPrompt2.Value == "false")
                    {
                        rbFedFixed.Checked = false;
                        rbFedExtra.Checked = true;
                        hdfPrompt2.Value = "";
                    }
                }
            }
        }
        protected void rbStateExtra_CheckedChanged(object sender, EventArgs e)
        {
            EmployeePortal.Models.NCI.NCIEntities ent = EmployeePortal.Models.ClsNCIUtil.GetNCIEntity(Session["CustomerID"].ToString());
            using (ent)
            {
                var StateExtra = (ent.EmployeeTaxes.Where(a => a.EmployeeId == empno && a.TaxTypeId == 5)).FirstOrDefault();//extra
                if (StateExtra == null)
                {
                    txtStateExtraWH.Enabled = true;
                    rbStateExtraDollar.Enabled = true;
                    rbStateExtraPercent.Enabled = true;
                    txtStateFixedWH.Text = null;
                    txtStateFixedWH.Enabled = false;
                    rbIsDollarState.Enabled = false;
                    rbIsPercentState.Enabled = false;
                }
                else
                {
                    if (hdfPrompt3.Value == "")
                    {
                        RadWindowManager2.RadConfirm("Extra amounts will override Fixed amounts. Fixed amount will be cleared.  Press OK to continue or Cancel to return to your changes.", "ExtraFixedFnctn3", 400, 150, null, "Extra/Fixed");
                    }
                    else if (hdfPrompt3.Value == "true")
                    {
                        txtStateFixedWH.Text = null;
                        txtStateFixedWH.Enabled = false;
                        rbIsDollarState.Enabled = false;
                        rbIsPercentState.Enabled = false;
                        rbStateExtraDollar.Enabled = true;
                        rbStateExtraPercent.Enabled = true;
                        txtStateExtraWH.Enabled = true;
                        var PercentStateExtra = (ent.EmployeeTaxes.Where(a => a.EmployeeId == empno && a.TaxTypeId == 2)).FirstOrDefault();//extra
                        if (PercentStateExtra != null && PercentStateExtra.TaxCalcId == 1)
                        {
                            rbIsDollarState.Checked = true;
                            rbIsPercentState.Checked = false;
                        }
                        if (PercentStateExtra != null && PercentStateExtra.TaxCalcId == 2)
                        {
                            rbIsDollarState.Checked = false;
                            rbIsPercentState.Checked = true;
                        }
                        var EmpStateFixed = (from a in ent.EmployeeTaxes
                                             where a.EmployeeId == empno && (a.TaxTypeId == 2)
                                             select new { a.EmployeeId, a.MaritalStatus, a.NumExemptions, a.Amount, a.TaxCalcId }).FirstOrDefault();
                        if (EmpStateFixed != null)
                        {
                            if (EmpStateFixed.Amount == null || EmpStateFixed.Amount == 0)
                                txtStateExtraWH.Text = "0.00";
                            else
                                txtStateExtraWH.Text = (EmpStateFixed.Amount).ToString();
                        }
                        var PercentStateFixed = (ent.EmployeeTaxes.Where(a => a.EmployeeId == empno && a.TaxTypeId == 5)).FirstOrDefault();//fixed
                        if (PercentStateFixed != null && PercentStateFixed.TaxCalcId == 1)
                        {
                            rbStateExtraDollar.Checked = true;
                            rbStateExtraPercent.Checked = false;
                        }
                        if (PercentStateFixed != null && PercentStateFixed.TaxCalcId == 2)
                        {
                            rbStateExtraDollar.Checked = false;
                            rbStateExtraPercent.Checked = true;
                        }
                        var EmpStateExtra = (from a in ent.EmployeeTaxes
                                             where a.EmployeeId == empno && (a.TaxTypeId == 5)
                                             select new { a.EmployeeId, a.MaritalStatus, a.NumExemptions, a.Amount, a.TaxCalcId }).FirstOrDefault();
                        if (EmpStateExtra != null)
                        {
                            if (EmpStateExtra.Amount == null || EmpStateExtra.Amount == 0)
                                txtStateExtraWH.Text = "0.00";
                            else
                                txtStateExtraWH.Text = (EmpStateExtra.Amount).ToString();
                        }
                        hdfPrompt3.Value = "";
                    }
                    else if (hdfPrompt3.Value == "false")
                    {
                        rbStateExtra.Checked = false;
                        rbStateFixed.Checked = true;
                        hdfPrompt3.Value = "";
                    }
                }
            }
        }
        protected void rbStateFixed_CheckedChanged(object sender, EventArgs e)
        {
            EmployeePortal.Models.NCI.NCIEntities ent = EmployeePortal.Models.ClsNCIUtil.GetNCIEntity(Session["CustomerID"].ToString());
            using (ent)
            {
                var StateFixed = (ent.EmployeeTaxes.Where(a => a.EmployeeId == empno && a.TaxTypeId == 2)).FirstOrDefault();//extra
                if (StateFixed == null)
                {
                    txtStateFixedWH.Enabled = true;
                    rbIsDollarState.Enabled = true;
                    rbIsPercentState.Enabled = true;
                    txtStateExtraWH.Text = null;
                    txtStateExtraWH.Enabled = false;
                    rbStateExtraDollar.Enabled = false;
                    rbStateExtraPercent.Enabled = false;
                }
                else
                {
                    if (hdfPrompt4.Value == "")
                    {
                        RadWindowManager2.RadConfirm("Fixed amounts will override Extra amounts. Extra amount will be cleared.  Press OK to continue or Cancel to return to your changes.", "ExtraFixedFnctn4", 400, 150, null, "Extra/Fixed");
                    }
                    else if (hdfPrompt4.Value == "true")
                    {
                        txtStateExtraWH.Text = null;
                        txtStateExtraWH.Enabled = false;
                        rbStateExtraDollar.Enabled = false;
                        rbStateExtraPercent.Enabled = false;
                        rbIsDollarState.Enabled = true;
                        rbIsPercentState.Enabled = true;
                        txtStateFixedWH.Enabled = true;
                        var PercentStateExtra = (ent.EmployeeTaxes.Where(a => a.EmployeeId == empno && a.TaxTypeId == 2)).FirstOrDefault();//extra
                        if (PercentStateExtra != null && PercentStateExtra.TaxCalcId == 1)
                        {
                            rbIsDollarState.Checked = true;
                            rbIsPercentState.Checked = false;
                        }
                        if (PercentStateExtra != null && PercentStateExtra.TaxCalcId == 2)
                        {
                            rbIsDollarState.Checked = false;
                            rbIsPercentState.Checked = true;
                        }
                        var EmpStateFixed = (from a in ent.EmployeeTaxes
                                             where a.EmployeeId == empno && (a.TaxTypeId == 2)
                                             select new { a.EmployeeId, a.MaritalStatus, a.NumExemptions, a.Amount, a.TaxCalcId }).FirstOrDefault();
                        if (EmpStateFixed != null)
                        {
                            if (EmpStateFixed.Amount == null || EmpStateFixed.Amount == 0)
                                txtStateFixedWH.Text = "0.00";
                            else
                                txtStateFixedWH.Text = (EmpStateFixed.Amount).ToString();
                        }
                        var PercentStateFixed = (ent.EmployeeTaxes.Where(a => a.EmployeeId == empno && a.TaxTypeId == 5)).FirstOrDefault();//fixed
                        if (PercentStateFixed != null && PercentStateFixed.TaxCalcId == 1)
                        {
                            rbStateExtraDollar.Checked = true;
                            rbStateExtraPercent.Checked = false;
                        }
                        if (PercentStateFixed != null && PercentStateFixed.TaxCalcId == 2)
                        {
                            rbStateExtraDollar.Checked = false;
                            rbStateExtraPercent.Checked = true;
                        }
                        var EmpStateExtra = (from a in ent.EmployeeTaxes
                                             where a.EmployeeId == empno && (a.TaxTypeId == 5)
                                             select new { a.EmployeeId, a.MaritalStatus, a.NumExemptions, a.Amount, a.TaxCalcId }).FirstOrDefault();
                        if (EmpStateExtra != null)
                        {
                            if (EmpStateExtra.Amount == null || EmpStateExtra.Amount == 0)
                                txtStateFixedWH.Text = "0.00";
                            else
                                txtStateFixedWH.Text = (EmpStateExtra.Amount).ToString();
                        }
                        hdfPrompt4.Value = "";
                    }
                    else if (hdfPrompt4.Value == "false")
                    {
                        rbStateFixed.Checked = false;
                        rbStateExtra.Checked = true;
                        hdfPrompt4.Value = "";
                    }
                }
            }
        }

 

Please help me as soon as possible.

Marin Bratanov
Telerik team
 answered on 12 Dec 2018
6 answers
212 views
I have Telerik RadGrid which contains around 20 columns. In the beginning, I can see column 1 to column 8. Then I scroll horizontally to see other columns. Suppose I should now see column 9 to 17, but I see the columns 10 to 18. Column 9 is passed over and not shown. One column is missed. How can I adjust the scrolling properties of Telerik to avoid this situation?
Eyup
Telerik team
 answered on 12 Dec 2018
4 answers
235 views

Hi 

I need force radcombobox to always open like RadListBox, i not use RadListBox because this control not have IsSeparator property

Any idea?

Thanks

Juan
Top achievements
Rank 1
 answered on 12 Dec 2018
1 answer
82 views

Hello,

It says on the documentation that "Another optional column for the Resources Table is Format. This column define the format of the assignment Units and its default value is percentage("p0").".

I have created this column as an nchar(10) (just like the "Color" column) in the GanttResources table and I've tried n0, p0 and c0 as values for my resources but every time the unit displayed is %.

Is there a list of expected values for this column or does it have to be enabled somewhere I'm missing? The documentation about RadGantt doesn't mention this column anywhere else nor do the examples provided use this table in any sort of way.

Thank you for your help!

Peter Milchev
Telerik team
 answered on 12 Dec 2018
6 answers
392 views
I have implemented a combobox with multiselect using checkboxes.
Along with this functionality I also want to provide radio buttons next to the checkboxes.

The requirement is that the user should be able to select multi items in the combo and mark one of them as the default value.

The multi-select is working perfectly for me, I am unable to figure out how to get the radio buttons.

Can you help me with this requirement?
Mark
Top achievements
Rank 2
 answered on 11 Dec 2018
5 answers
509 views

Hi 

I have the following requirements and I am trying to get some telerik control to work but it seems I cannot achieve all the requirements.

I need a multi-select control. I do not want to load the data on page load for performance reasons. When the user clicks on the dropdown that is when I want to load all items and show it to the user. It does not require client filtering but if it works then its a bonus.

The user then selects the multiple options and a button is pressed. In the postback I need to pick up the options that were selected. 

I have tried the RadCombobox but if you use LOD then checkboxes are not supported. I tried using itemtemplate with a checkbox in it but I was not able to pick up the selected checkboxes after postback and the selections are not perserved after postback either. I have seen an example of this but the js function it uses needs the clientid of the radcombobox. I do not have this available at the right time in the page lifecycle. It is too complicated to get this because I am rendering these controls programmatically and dynamically.

I have tried to make this to work with radautocompletebox however I have a box where I have to type before I see the options. This is not acceptable for my requirements. When the user clicks on the autocomplete control I need to show them all options available. Then once they select and press the button I need them persisted and need to be able to pick them up in the post back.

Please advise if these controls can be made to meet my requirments or if you have another control that can achieve this? To summarise:

It must Load on Demand when the control is clicked

It must allow multi select

I must be able to pick up the selections in server side postback.

Peter Milchev
Telerik team
 answered on 11 Dec 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?