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

I have a hierarchical radgrid. I don't want to show the headers for the second level. How to hide the header in my second level radgrid?

Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 22 Jun 2012
1 answer
158 views
Hi,

I have asked one question that

"I  have open a RadWindow on a button click event and then in that window i have added a download button for downloading the file.
But as the download pop up the radwindow stop behaving. Right now i want that RadWindow should get close automatically  when the download gets completed but currently it remains open. So please provide me solution for this.
"

and Telerik provide me this answer 

Cs:
<asp:Button runat="server" ID="btnDownLoad" Text="DownLoad" OnClientClick="CloseDialog();return false;" OnClick="btnDownLoad_Click" />

Aspx
<script type="text/javascript">
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }
        function CloseDialog() {
            GetRadWindow().close();
            __doPostBack("<%=btnDownLoad.UniqueID %>", "");
        }
</script>


But after applying this solution i am getting this problem:

"after using this on the onclientclick on Download button the radwindow gets close before the download begins."

So, Please tell me any other solution so that user can download and radwindow gets close after that.
Marin Bratanov
Telerik team
 answered on 22 Jun 2012
1 answer
148 views
I'm using the Advanced Form inside of the scheduler with the ResourceControl code pasted from the Telerik demo.

When I set "Type" in the ascx page (my scheduler is in a user control), everything works fine.  However, I need to set the Type programmatically from the C#. 

It appears I should do this in the FormCreating event.  The problem is that I do not know how to access the fields on the AdvancedForm at this point.  I can use FindControl inside of FormCreated, but at that point it is too late to pass Type into the resource control. 

Relevant .ascx code:

This works:
<resource:ResourceControl runat="server" ID="ResVessel" Type="1132" />


<AdvancedEditTemplate>
            <div class="rsAdvancedEdit rsAdvancedModal">
                <div class="rsModalBgTopLeft"></div>
                <div class="rsModalBgTopRight"></div>
                <div class="rsModalBgBottomLeft"></div>
                <div class="rsModalBgBottomRight"></div>    
                <div class="rsAdvTitle">                 
                    <h1 class="rsAdvInnerTitle">Production Order Details</h1>           
                </div>
                <div class="rsAdvContentWrapper">
                    <div class="popUpDiv">
                        <h4>Required</h4>
                        <br />
                        <div class="required-left">
                            <label>Material #</label>
                            <telerik:RadTextBox runat="server" ID="txtMaterialNumber" CssClass="textbox" Text='<%# Bind("Subject") %>'></telerik:RadTextBox>
                            <br />
 
                            <label>Batch #</label>
                            <telerik:RadTextBox runat="server" ID="txtBatchNumber" CssClass="textbox" ></telerik:RadTextBox>                           
                             
                            <label>Vessel</label
                            <!-- Resource controls should follow the convention Res[Resource Name] for ID -->
                            <resource:ResourceControl runat="server" ID="ResVessel" />
                        </div>
                        <div class="required-right">
                            <label>Start Date</label>
                            <telerik:RadDateTimePicker runat="server" ID="dtpStartDateTime" SelectedDate='<%# Bind("Start") %>'                            
                                TimeView-RenderDirection="Vertical" ShowAnimation-Type="Slide" ShowPopupOnFocus="true" TimeView-Columns="4"
                                TimeView-TimeFormat="H:00" Width="160px" DateInput-DisplayDateFormat="M/d/yyyy - H:00">
                            </telerik:RadDateTimePicker>
                            <br />
 
                            <label>Complete Date</label>
                            <telerik:RadDateTimePicker runat="server" ID="dtpEndDateTime" SelectedDate='<%# Bind("End") %>'
                                TimeView-RenderDirection="Vertical" ShowAnimation-Type="Slide" ShowPopupOnFocus="true" TimeView-Columns="4"
                                TimeView-TimeFormat="H:00" Width="160px" DateInput-DisplayDateFormat="M/d/yyyy - H:00">
                            </telerik:RadDateTimePicker>
                            <br />                          
 
                        </div>
                    </div>
             
                    <div class="popUpDiv">
                        <h4>Optional</h4>
                        <br />
 
                        <div class="optional-left">
                            <label>Ship Date</label>
                            <telerik:RadDatePicker runat="server" ID="calShippingDate" Width="185px"
                                ShowAnimation-Type="Slide" DateInput-DisplayDateFormat="M/d/yyyy" ShowPopupOnFocus="true">
                            </telerik:RadDatePicker>         
                            <br />
 
                            <label>Priority</label>
                            <telerik:RadComboBox runat="server" ID="ddlPriority" CssClass="dropdownlist">
                                <Items>
                                    <telerik:RadComboBoxItem Text="Choose Priority" />
                                </Items>
                            </telerik:RadComboBox>
                            <br />
 
                            <label>Batch Size</label>
                            <telerik:RadTextBox runat="server" ID="txtBatchSize" CssClass="textbox"></telerik:RadTextBox>
                            <br />
                                              
                            <label>Wash Prep</label>
                            <telerik:RadTextBox runat="server" ID="txtWashPrep" CssClass="textbox"></telerik:RadTextBox>
                            <br />
 
                            <label id="raw-material-dep">Raw Material Dependency</label>
                            <telerik:RadTextBox runat="server" ID="txtRawMaterialDependency" CssClass="textbox"></telerik:RadTextBox>
                        </div>
 
                        <div class="optional-right">
                            <label id="top-align">Comments</label>
                            <telerik:RadTextBox runat="server" ID="txtComments" CssClass="textbox-multiline" Rows="7" TextMode="MultiLine" Width="200px"></telerik:RadTextBox>
                        </div>           
                    </div>
 
                    <asp:Panel runat="server" ID="Panel1" CssClass="rsAdvancedSubmitArea">
                        <div class="rsAdvButtonWrapper">
                            <asp:LinkButton CommandName="Update" runat="server" ID="btnUpdate" CssClass="rsAdvEditSave">
                                <span>Save</span>
                            </asp:LinkButton>
                            <asp:LinkButton runat="server" ID="btnCancel" CssClass="rsAdvEditCancel" CommandName="Cancel" CausesValidation="false">
                                <span>Cancel</span>
                            </asp:LinkButton>
                        </div>
                    </asp:Panel>
                </div>
            </div>
            </AdvancedEditTemplate>
Peter
Telerik team
 answered on 22 Jun 2012
2 answers
112 views
I am manually loading a combobox during a postback with:
Do While CoReader.Read
  If CoReader.IsDBNull(0) Then StateNameString = "" Else StateNameString = CoReader.Item("StateName").ToString.Trim
  Dim item As New RadComboBoxItem(StateNameString)
  Me.RadComboBoxState.Items.Add(item)
Loop

As I add an item, how do I set/add its value? No sooner that I posted this, than I think I found the answer. See below. If it is not correct please let me know.
Do While CoReader.Read
  If CoReader.IsDBNull(0) Then StateNameString = "" Else StateNameString = CoReader.Item("StateName").ToString.Trim
  Dim item As New RadComboBoxItem(StateNameString)
  If CoReader.IsDBNull(1) Then item.Value = "" Else item.Value = CoReader.Item("State").ToString.Trim.ToUpper
  Me.RadComboBoxState.Items.Add(item)
Loop


Once the entire contol is populated by the above code, I would like to set the Text property of the control to the user's setting. Let's say the user has a Text value of "Maine" and a Value of "ME".. My code is not setting the TEXT property during postback.
If CoReader.IsDBNull(0) Then Me.RadComboBoxState.Text = "" Else RadComboBoxState.Text = CoReader.Item("StateName").ToString.Trim

What is the correct way to set the TEXT property during a Postback?

Finally and this is a programing best practices question, do you think I should set the SelectedItem and/or SelectedValue property of the control when it is known, as in the above example? Or is just populating the TEXT property field sufficient?

Thanks,
pat

M Patrick
Top achievements
Rank 1
 answered on 22 Jun 2012
1 answer
107 views
Hi,

I have a radtextbox. If some text is entered into it, it should open a new window with a textbox which contains the same text in the parent.

Thanks,

Aneesh Daniel
Shinu
Top achievements
Rank 2
 answered on 22 Jun 2012
2 answers
315 views

Team,

I am using radFormDecorator(Dll V2012.1.411.40) and vista skin in application.

I have included tree control having 1000 nodes in field set.

In this scenario I am facing following issues

  1. Whenever tree is expanded the field set is getting cut off in between the tree only border get displayed.
  2. When I collapse expanded tree the field set should also get collapse but it shows some border.

This 1st issue I have seen on IE8, FF,Chrome.

This 2nd issue I have seen only on IE8.

I have attached the screenshot for each.

Please help me out for this issue.

Thanks in advance

 

Sampada
Top achievements
Rank 1
 answered on 22 Jun 2012
4 answers
523 views
Hello,
i have a problem and i need some help please.

I have this scenario:
I have many radComboboxes inside a page and in order to make the loading time faster for the page i am using LoadOnDemand functionality.

The thing is what on the page loads, i read a Customer fields and in the Page_Load event i populate the existing rcb (radComboBoxes) with the value from the query i get from sql so the controls will dispaly the initial existing value in there.

This is the code i have for this (basically i manually add a new item with the initial customer value i read from SQL):
radCtrl.Items.Clear();
radCtrl.Items.Add(new RadComboBoxItem(rowValue, rowValue));
radCtrl.SelectedIndex = 0;

After that i have the ItemsRequested event where i get all the possible values for each rcb. (in this case i only show exemple for one rcb)
protected void lstDentalGroup_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
    {
        ListItemsController ctrl = new ListItemsController();
        lstDentalGroup.DataSource = ctrl.Select_Single_Column("Value1", "DENTALGROUP");
        lstDentalGroup.DataBind();
    }

My problem is that when i press the SAVE button inside my form, the rcb.SelectedItem.Value will always be the first item I added by default in the Page_Load event, and not the one i select in the rcb.

Here is the HTML
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 
<telerik:RadAjaxManagerProxy ID="radAjaxProxy_Calls" runat="server">
    <AjaxSettings>
         
        <telerik:AjaxSetting AjaxControlID="btnSave">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="mainContrainer" LoadingPanelID="radAjaxLoadingPanel" UpdatePanelRenderMode="inline" />
            </UpdatedControls>
        </telerik:AjaxSetting>
         
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
 
<telerik:RadCodeBlock ID="radCodeBlockMain" runat="server">
    <script type="text/javascript">
        function OnDropDownHandler(sender, eventArgs) {
            sender.requestItems("", false);
        }
    </script>
</telerik:RadCodeBlock>
 
<asp:Panel runat="server" ID="mainContrainer" style="width:100%; height:100%; font-size:11px;">
 
    <telerik:RadComboBox runat="server" ID="lstDentalGroup" Width="92%" Font-Size="11px" OnClientDropDownOpening="OnDropDownHandler" DataTextField="CValue" DataValueField="CValue" OnItemsRequested="lstDentalGroup_ItemsRequested" />
    <asp:Button runat="server" ID="btnSave" onclick="btnSave_Click" Text="Save Combobox Value" />
 
</asp:Panel>
 
</asp:Content>


Here is the C# 
public partial class TestTelerik : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack) initialize_customerID("Boxer, Ken");
    }
 
    private void initialize_customerID(string customerID)
    {
        SQLGeneral ctrl = new SQLGeneral();
        DataTable dt = new DataTable();
        Hashtable hashFilter = new Hashtable();
        hashFilter["CustomerID"] = customerID;
        hashFilter["Deleted"] = 0;
        dt = ctrl.GetDataTable(CustomersController.customer_details, "Customers c LEFT JOIN ListItems li ON c.State = li.Value1", hashFilter);
        if (dt != null)
        {
            // populate all the textBoxes & radComboBoxes in the form within one single for cycle -> save a lot fo production time.
            for (int i = 0; i <= dt.Columns.Count - 1; i++)
            {
                if (dt.Columns[i].DataType == typeof(System.String))
                {
                    string columnName = dt.Columns[i].ColumnName.ToString();
                    string rowValue = dt.Rows[0][columnName].ToString().Trim();                       
 
                    // GET RADDROPDOWNBOXES
                    RadComboBox radCtrl = this.mainContrainer.FindControl("lst" + columnName) as RadComboBox;
                    if (radCtrl != null)
                    {
                        radCtrl.Items.Clear();
                        radCtrl.Items.Add(new RadComboBoxItem(rowValue, rowValue));
                        radCtrl.SelectedIndex = 0;
                    }
                }
            }
        }
    }
 
    protected void lstDentalGroup_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
    {
        ListItemsController ctrl = new ListItemsController();
        lstDentalGroup.DataSource = ctrl.Select_Single_Column("Value1", "DENTALGROUP");
        lstDentalGroup.DataBind();
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        string tmpSelValue = lstDentalGroup.SelectedItem.Value;
    }
}

I know the rcb value are load on demand at the client side, but how i can make accessible form the server side, mentaining the LoadOnDemand functionality? The solution to get all the values on server side Page_Load event and bind them initially to all the rcb is not acceptable for me because of the amount of data to load from SQL

Thank you for your help

Kalina
Telerik team
 answered on 22 Jun 2012
1 answer
138 views
Hello All,

I am opening a rad window in the asp.net grid row command . It is working properly .

codebase:
in the command:
  Telerik.Web.UI.RadWindow objwindow = new Telerik.Web.UI.RadWindow();

                    objwindow.VisibleOnPageLoad = true;
                    objwindow.NavigateUrl = "~/OfferManagement/CreateCounterOffer.aspx?OfferId=" + _commandArg;
                    double heightwinc = 400;
                    double widthwinc = 900;
                    objwindow.Height = new Unit(heightwinc);
                    objwindow.Width = new Unit(widthwinc);
                    pnlradData.Controls.Add(objwindow);

in the aspx page:

<asp:Panel ID="pnlradData" runat="server"></asp:panel>


The issue is, I want to refresh the parent window after closing that  dynamically created "objwindow"(rad window) . I searched across the google but I didn't find a correct solution for it.Can I add any event? Please help me.

Thanks

Rama.M


Princy
Top achievements
Rank 2
 answered on 22 Jun 2012
1 answer
100 views
I was testing the scheduler on my local web server without problems.
After publishing it on my hosting the scheduler control looks like it's disabled: vertical scrollbar visible but disabled, clicking buttons has no effect (week, month, calendar, ...).

Looks like some setting error, but I have no idea where to start troubleshooting the issue.

Any help is appreciated

Regards

EDIT: Solution found, hoster had a different IIS version so I had to change httpHandler configuration in web.config
Plamen
Telerik team
 answered on 22 Jun 2012
1 answer
112 views
How to close grid edit form template in external button click from server side
Princy
Top achievements
Rank 2
 answered on 22 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?