Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
152 views
I have 2 radiobuttons on my grid that are mutually exclussive and i also have on checkbox. This 2 radiobuttons are enabled/disabled when i click on the checkbox using javascript function. I have in the code behind the method manageSelected which are call while clicking on the button save. Initially the 2 radiobuttons are enabled.  Without the javascript function all thing work fine(i can check one of the radiobutton and save his value). My issue is that when i apply the javascript it work only in one way(I can change my object property value from value of radiobutton1 to the one of radiobutton2 and not mutual).
 

My file.aspx
<tr>
                    <td>
                        <asp:CheckBox ID="rbDiscountGoodCalcTypeSet" runat="server" BackColor="red" onchange="onChangeDiscountGoodCalcType()"/>
                        <asp:Label ID="lbDiscountGoodCalcType" runat="server" Text="<%$ Resources: Common, DiscountGoodCalcType %>"></asp:Label>
                    </td>
                    <td colspan="3">                      
                        <asp:RadioButton ID="rbDiscountGoodCalcType1" GroupName="DiscountGoodCalcType" runat="server"
                            Text="<%$ Resources: Common, ByQuantity %>" Checked='<%# Eval("DiscountGoodCalcType").ToString() == "0" %>' Enabled="false"/>
                        <asp:RadioButton ID="rbDiscountGoodCalcType2" GroupName="DiscountGoodCalcType" runat="server"
                            Text="<%$ Resources: Common, ByValue %>" Checked='<%# Eval("DiscountGoodCalcType").ToString() == "1" %>' Enabled="false"/>
                    </td>
                </tr>

My javascript function
function onChangeDiscountGoodCalcType() {
            var sourceName = window.event.srcElement.id;
            var targetName1 = sourceName.substring(0, (sourceName.length - 3)) + "1";
            var targetName2 = sourceName.substring(0, (sourceName.length - 3)) + "2";
 
            var cmdObj = $("#" + sourceName)[0];
            var targetObj1 = $("#" + targetName1)[0];
            var targetObj2 = $("#" + targetName2)[0];
 
            targetObj1.disabled = !cmdObj.checked;
            targetObj2.disabled = !cmdObj.checked;
        }

My savebutton call this method for the control
private void Manage4Line()
        {
            if (rbDiscountGoodCalcTypeSet.Checked)
                DiscountGoodCalcType = (rbDiscountGoodCalcType1.Checked) ? 0 : 1;
        }

Thanks
Colince
Top achievements
Rank 1
 asked on 16 Sep 2013
4 answers
198 views
I have a page with a relatively conventional RadTabStrip/RadMultipage/RadPageView set up.   I also have a RadAjaxManager setup so that for certain values of a RadComboBox in the first RadPageView (the first tab), a second tab becomes visible.  So far, so good.

Up till now I've had three ASCXs in the second RadPageView and I've manipulated them through Ajax so that they're visible when needed.

What I would like to do (given that the number of ASCXs may increase) is dynamically load them instead.

For my load I'm doing the following:

Control1 = (ControlType1)this.LoadControl("Control1.ascx");
Then I do a
Panel1.Controls.Add(Control1);

I've tried a number of variations including putting the control in an ASP:Panel in the 2nd RadPageView.  Display is not a problem but when it comes time to save, the Find for the control always returns null.   

What would be the best approach for a situation like this?
Boris
Top achievements
Rank 1
 answered on 16 Sep 2013
5 answers
173 views
Hi,

I have a RadGrid with a EditCommandColumn. In the headercontextmenu this column can be hidden when I choose Columns (see screenshot). How can I hide this column from the headercontextmenu?

Paul
Jayesh Goyani
Top achievements
Rank 2
 answered on 16 Sep 2013
5 answers
179 views
 I am trying to export RadGrid data to CSV format but the button is not working
 i added onRequestStart also but nothing is happening. Then i find
 the issue from firebug it firstly finding my grid and experotCSV function and
 then returning to false.

if(!$find('gvLoginDetail_ctl00').exportToCsv()) return false;__doPostBack('gvLoginDetail$ctl00$ctl02$ctl00$ExportToCsvButton','')
It is a default function of RADGRID tell me
how to remove the below line.

if(!$find('gvLoginDetail_ctl00').exportToCsv()) return false;
Jayesh Goyani
Top achievements
Rank 2
 answered on 16 Sep 2013
3 answers
157 views
Hi All,

Export to excel is not working while using loading panel, without loading panel it is work fine. How to fix this is issue?
Jayesh Goyani
Top achievements
Rank 2
 answered on 16 Sep 2013
1 answer
239 views
Hi,

I have a radgrid that have a radcombobox in the header of one of the columns. I'm building the radcombobox in the OnItemCreated event. When  I select a value in the radcombobox, I filter the grid based on the selected value and store the selected value in the session. My problem is in the radgrid OnPreRender event, I'm trying to set the selected value of the radcombo box and it is not been set. the control is ajaxified, I can see through the debugger that is setting the correct selected item, but when the grid shows up, the value is not selected. Any ideas?

This is the code I'm using to set the selected item
protected void radGridUnits_OnPreRender(object sender, EventArgs e)
        {
                // Select the last selected value
                if (Session["filteredByPendingAction"] != null)
                    foreach (GridHeaderItem h in radGridUnits.MasterTableView.GetItems(GridItemType.Header))
                    {
                        ((RadComboBox)h["ExternalActions"].FindControl("radComboFilteredByPendingActions")).FindItemByValue(Session["filteredByPendingAction"].ToString()).Selected = true;
                        ((RadComboBox)h["ExternalActions"].FindControl("radComboFilteredByPendingActions")).DataBind();
                        break;
                    }
            }


Thanks in adavance
Eyup
Telerik team
 answered on 16 Sep 2013
5 answers
302 views
Hello ,

GridDateTimeColumn Filter template do not highlight today date.

I want to highlight today date when filter Datepicker open.

As i have already developed the application and i have used the datepicker filter control in more than 100 place so please provide me the global solution.

See the attached demo screenshot.

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx
Vasil
Telerik team
 answered on 16 Sep 2013
1 answer
116 views
I have two RadWindows each with an alert that fires when OnClientActivate is called.

The currently active RadWindow fires the event every time the window is clicked, active or not.  

Why?

GetRadWindow().add_activate(OnClientActivate);
 
 
function OnClientActivate(sender, e) {
    alert('I should only see this once when the window is brought to the front');
}
Ianko
Telerik team
 answered on 16 Sep 2013
1 answer
144 views
Hi There,

We are facing issue when we click an item on RadTabStrip. Sometimes we recieve the message - Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Collection was modified; enumeration operation may not execute.

Also find attached the screen shot of the error page.

We are using .Net 3.5 Visual Studio 2008, Telerik Version - 2013.1.417.35

Please advice.

Thanks,
Rohit
Nencho
Telerik team
 answered on 16 Sep 2013
1 answer
164 views
Hi everyone, I'm having difficulty getting the negative labels on the Yaxis to change to positives, I've seen that this has been asked before for the radchart and I did try the solution but I couldn't access yaxis.items to do a count for a loop so I'm wondering if something is different in the way I need to do this?

I've done a count on the plotarea.series and I'm getting 2 which is how many series I have fed the chart, the chart is displaying perfect apart from the YAxis labels, that's all I have left to do :(

Can anyone help me please?

I'm using ASP.Net with VB.Net as the code behind...

Thanks! Adam.
Adam
Top achievements
Rank 1
 answered on 16 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?