Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
93 views
Is it possible to have different column names for each group in a radgrid?  I could do this without groups, but I'd prefer to use groups if possible.  I have a grid with computer-related items and information.  If I am looking at laptops, I want to see data such as RAM, but if I'm looking at something like aircards, I don't want to see RAM, but I'd like to see the Device ID.  Is that at all possible with groups?
Jeremy
Top achievements
Rank 1
 answered on 22 Jun 2012
1 answer
51 views
Hi,

I have a RadGrid with a GridDateTimeColumn.
When I set the filter for this column to 'Greater than 01/03/2012' the filter will be applied correct (all items with date after the 1st of march)
Out datetimeformat is dd/MM/yyyy  (day/month/year).

When I call the filter again in the headercontextmenu it displays 03/01/2012. So the wrong datetimeformat is applied (MM/dd/yyyy).
When I apply this filter (without modification) it will be interpreted as the 3rd of januari.

How can I fix this?

Paul
Jayesh Goyani
Top achievements
Rank 2
 answered on 22 Jun 2012
3 answers
575 views
The new Control Panel looks like it will be helpful. I do have one complaint. I installed it and ran it for the first time and it did not warn me ahead of time that it was going to Uninstall ALL OTHER previous versions. I often have a number of projects that are built on various versions of the Controls so I like to keep certain versions around. There should be information provided BEFORE you start the new install indicating that it will remove all other versions. It starts by saying  Installing and then goes on to Uninstalling all the old versions. Yes, there is a cancel button in the bottom, but if I had stepped away from my machine and just let it run (like I always did when I installed and EXE of a new release) I wouldn't have seen that it was uninstalling. Since previous EXE versions never did an Uninstall and there was no information in the Control Panel, other people may find this a problem. Just add another splash screen that explains what's going to happen so people can back out earlier. In the future I will go back to downloading the individual .EXE files so I have more control over what happens.
Andrey
Telerik team
 answered on 22 Jun 2012
1 answer
84 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
129 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
134 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
94 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
92 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
286 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
492 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?