Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
198 views
I am using the RadWindow as a dialog for updating some user notes on my database.  I have the RadWindow defined on my main page.  When the user clicks a button, I open the RadWindow and set several field values on the window using Javascript.  The user then enters their data and clicks a "Submit" button.

In the code behind, I am getting the data from the fields on the RadWindow and then calling my database update routine.  The issue I am having is this.  When I pop the window up using Javascript, I am modifying some label, RadTextbox, and Radbutton control text values.  In the code behind I need to use the values. The text values are fine but the labels that I change in the Javascript do not have the updated values in the code behind.  Does anybody know why?

I am using the "OnClientShow" event to call the Javascript routine to modify the RadWindow fields.  Here is the routine:

// This function moves the data from various fields in the carrierinformation page to the data
// update request screen being opened. Some of the fields are actual data fields from the screen
// while others are hidden fields.
function SetDataUpdWindowFields() {
    // Get Carrier name and set.
    var CarrName = GetCarrierName();
    var DUCarrName = document.getElementById("<%= lblDataUpdCarrName.ClientID %>");
    DUCarrName.innerText = CarrName;
    // Get Email Address and Set.
    var EmailAddr = document.getElementById("<%= hfEmailAddr.ClientID %>");
    var DUEmailAddr = $find("<%= rtxtDataUpdEmailAdr.ClientID %>");
    DUEmailAddr.set_value(EmailAddr.value);
    // Set the user notify option to yes.
    $find("<%= roptDataUpdNotifyYes.ClientID %>").set_checked(true);
    $find("<%= roptDataUpdNotifyNo.ClientID %>").set_checked(false);
    // Get and set the location name.
    var rpageview = GetCurrPageView();
    if (rpageview) {
        var lblLocName = $telerik.$(".cdhdr-carrlocationheader", rpageview._element).html();
        if (lblLocName) {
            var DULocName = document.getElementById("<%= lblDataUpdLocName.ClientID %>");
            DULocName.innerText = lblLocName;
        }
    }
}

It is specifically the DUCarrName and DULocName values on the RadWindow that show correctly on the actual window, but do not have the new values in the code behind.

Any help would be greatly appreciated.

Blake
Blake
Top achievements
Rank 1
 answered on 02 Mar 2012
1 answer
56 views
Dear Telerik Team,

Let me know if the following approach would work out.

1) Page.aspx displays a RadGrid with a number of customizations user can  do on it to show the data.
2) Page.aspx has a button called 'Generate PDF'. When I click it, is it possible to create a new instance of RadGrid, assign the existing grid value to it (BYVAL and not BYREF). Then export the PDF from the new instance of RadGrid.

Basically I want to do this because I can not call 'Rebind' on the existing grid and/or visually make any changes on the existing grid. The new grid should be invisible totally only for the purpose of PDF.
Casey
Top achievements
Rank 1
 answered on 02 Mar 2012
3 answers
237 views
Greetings,

I have a GridCheckboxColumn in my grid and a need to create a GridTemplateColumn according to the checkbox is checked or not.
For instance,

line 1,

if the checkbox is checked the GridTempleColumn label displays "YES" ,
if the checkbox is not checked the GridTempleColumn label displays "NO",
if the checkbox is NULL : it displays "N/A".


To sum up, i have this in my aspx page:

<telerik:GridCheckBoxColumn DataField="facturable" DataType="System.Boolean" HeaderText="facturable"
    SortExpression="facturable" UniqueName="facturable">
</telerik:GridCheckBoxColumn>
 
                <telerik:GridTemplateColumn  HeaderText="Type de tickets"
    UniqueName="typedestickets">
    <ItemTemplate><asp:Label id="test" runat="server"></asp:Label></ItemTemplate>
</telerik:GridTemplateColumn>

My try in code behind : ( not working )

protected void RadGrid1_DataBound(object sender, EventArgs e)
{
    foreach (Telerik.Web.UI.GridDataItem dataItem in RadGrid1.MasterTableView.Items)
    {
        CheckBox chkDelete = (CheckBox)dataItem.FindControl("facturable"); 
        Label label = (Label)dataItem.FindControl("test");
 
        if (chkDelete.Checked == true) { label.Text = "MA"; }
    }
 
 
 
}


Thank you in advance for your help

Casey
Top achievements
Rank 1
 answered on 02 Mar 2012
2 answers
107 views
Since I upgraded to Telerki.Web.UI.dll version 2012.1.212.35, disabled RadDateInput controls show two dates.  It happens whether I pre-populate the date using the DbSelectedDate or the SelectedDate property.

 

<telerik:RadDateInput ID="BwrDOB" runat="server" Enabled="false" MinDate="1/1/1900">
</telerik:RadDateInput>

The two date problem appeared when I tested with the following browsers:

  • Internet Explorer 9.0.8112.16421 (update versions 9.0.5)
  • Opera 11.60 Build 1185, Opera 11.61 Build 1250

NOTE:  When I turned on IE compatibility mode, the problem disappeared.

I didn't have any problems with the following browsers:

  • Firefox 10.0.1
  • Google Chrome 16.0.912.77m, Google Chrome 17.0.963.56m
  • Safari 5.1.1 (7534.51.22)
Vasil
Telerik team
 answered on 02 Mar 2012
8 answers
290 views
Hello,

I am using the latest 2011 Ajax .Net version (2011 Q3). Can you please provide an example about how to programmatically create a Rad Alert with custom html text content?
Also, the  Rad Alert should auto-size (if possible?) and I need to control the position of the 'Ok' button.

What I am trying to achieve is to display a modal window (created by code) once I click on some areas of the page. This is necessary because I am pulling information from a database.

Regards,
M.R.
M. R.
Top achievements
Rank 1
 answered on 02 Mar 2012
2 answers
154 views
What is the preferred way to have a rotator auto advance ads, but also allow buttons for going back if they missed one?  It seems like the buttons are not available if you set the type to auto advance...  is there something there that I am missing?

Thanks,

-Chris
Slav
Telerik team
 answered on 02 Mar 2012
1 answer
131 views
Hi There,

In the Telerik version 2011.2.915.40 i found jquery version 1.6.4 and in my application i have used 1.7.1.

I cannot find the ID of the grid using $find('<%= grid.ClientID %>') it is returning null to me. It was working until i was using Jquery version 1.2.6.

NOTE: My grid is in ascx page and javascript is also in ascx page.

Waiting for your response.

Thanks.

Regards,
Dhaval
Richard
Top achievements
Rank 1
 answered on 02 Mar 2012
11 answers
250 views
Dear Forum,

I am working on a grid that has drag-and-drop grouping enabled, but I want to prevent the highest level of grouping from being dropped, so then the grid will always be grouped by that first data item. But I can find no way to eliminate the "x" from the group header box for that item and I can't seem to work out how to handle the GroupsChanging event and use the GridGroupsChangingAction.Ungroup to keep that item in the grouping expression. Can anyone advise or point me to a working
example?

Thanks,
Celeste
Marin
Telerik team
 answered on 02 Mar 2012
1 answer
196 views
Is there a way to group the rows (not columns) in the RadGrid control. Or maybe a way out to rowspan few rows in the RadGrid control.
Richard
Top achievements
Rank 1
 answered on 02 Mar 2012
3 answers
67 views

Hello Telerik Team,

Please am trying to do a search and open the result on a new tab and a new pageview but the search result clears up each time i navigate back to it and if i try another search on a giving opened tab, it show me error:

Multiple controls with the same ID 'ctl03' were found. FindControl requires that controls have unique IDs.

I have tried to enable view state but it did not help.

RadTab newTab1 = new RadTab();

newTab1.Text = Session["session_newtab"].ToString();

newTab1.Width = Unit.Pixel(150);
RadTabStrip1.Tabs.Add(newTab1);

  (RadTabStrip1.FindTabByText(Session["session_newtab"].ToString())).Selected = true;
RadPageView newwindow = new RadPageView();
newwindow.ID = newTab1.Text;
newwindow.ContentUrl = "search/search_judges.aspx?name=" + item;
newTab1.PageViewID = newwindow.ID;
newwindow.Width = Unit.Pixel(878);
newwindow.Height = Unit.Pixel(785);
newwindow.EnableViewState = true;

RadMultiPage2.PageViews.Add(newwindow);

Please this is urgent on my timeline

 Thanks 

Dimitar Terziev
Telerik team
 answered on 02 Mar 2012
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?