Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
136 views
When I put this in the RadGrid it causes the scrolling to completely collapse (because the grouping is collapsed).  Is there another way to preserve the grid headers when the user scrolls the grid (100 items on each page)
<ClientSettings>
                                        <Scrolling AllowScroll="true" SaveScrollPosition="false" UseStaticHeaders="true">
                                        </Scrolling>
                                    </ClientSettings>




THanks
Serrin
Top achievements
Rank 1
 answered on 05 May 2009
0 answers
86 views
I have a tab-strip with three user-controls in three separate pageviews. I also have a user-control on the page the tab-strip is located. I'd like to access the external user-control based on events raised by the pageview user controls.

Is this possible? If so, can you provide some direction or an example.

Thanks
bam
Top achievements
Rank 1
 asked on 05 May 2009
3 answers
58 views
I am using the following: VS2008 Team Edition, the 3.5 TreeView Control and the 3.5 Context Menu Control

I have a TreeView Control on my page and a Context Menu control defined to target it (shown below).  I need the Context Menu to not appear unless there is a selected Node in the TreeView Control.  I know I can check for the selected node status in the code behind, but I don't want the menu to appear at all if a node is not selected.

I have thought about using a method to set the menu to enabled true/false, but am trying to not require a postback.  The other option might be to put some javascript in the page.  Anyone have a simple way other than one of these two ways or does the control already have an option to exactly this?

 

<div runat="server" id="left_pane">

 

<telerik:RadTreeView ID="tvCommodityCodes" runat="server" Skin="WebBlue"

 

CheckBoxes="true">

 

 

</telerik:RadTreeView>

 

 

<telerik:RadContextMenu ID="RadContextMenu1" runat="server" Skin="Web20"

 

 

ClickToOpen="true" OnItemClick="RadContextMenu1_ItemClick">

 

 

<CollapseAnimation Duration="1" /> 

 

<Items>

 

<telerik:RadMenuItem runat="server" Text="Add Entry" Value="Add" />  

 

<telerik:RadMenuItem runat="server" Text="Remove Entry" Value="Rem" />  

 

<telerik:RadMenuItem runat="server" Text="Edit Entry" Value="Edt" />  

 

<telerik:RadMenuItem runat="server" IsSeparator="true" />  

 

<telerik:RadMenuItem runat="server" Text="Save Entries" Value="Sav" />  

 

<telerik:RadMenuItem runat="server" Text="Abort Changes" Value="Abt" />  

 

</Items>

 

<Targets>

 

<telerik:ContextMenuControlTarget ControlID="tvCommodityCodes" />

 

 

</Targets>

 

 

</telerik:RadContextMenu>

 

 

</div>

I'm populating the tvCommodityCodes via

 

 

this.tvCommodityCodes.LoadXmlString(new StreamReader (CommodityEditor.Properties.Settings.Default.XMLInputFile).ReadToEnd());

 

 

 

Walter Harris
Top achievements
Rank 1
 answered on 05 May 2009
1 answer
73 views
I need to have a RadGrid, on page entry to have it's first row selected.  I also, based on that selection, populate some other controls based on that selected row.

My problem is, when you first set the datasource, the GridDataItem is not yet available.  I assume, that there is a specific Radgrid method I need to use to do this in, but I don't know which one.

Any help would be appreciated. 

Thanks,

Kuba
George
Top achievements
Rank 1
 answered on 05 May 2009
7 answers
193 views
Hi. I've placed a RadEditor inside a RadGrid EditFormSettings FormTemplate. The editor shows up fine but I can't set the content. I've looked at the following article but it comes back with an error 500 Internal Error. And intellisense doesn't recognise 'Content' anyway.

http://www.telerik.com/support/kb/aspnet-ajax/grid/using-radeditor-as-editor-in-template-column-of-radgrid.aspx

Also trying to bind it in the <Content></Content> tags returns an error that it doesn't allow child objects. Thanks.

Daniel
WebDevIce9
Top achievements
Rank 1
 answered on 05 May 2009
2 answers
248 views
I am converting some traditional combo boxes to RadCombo boxes on a page. Each of the combo boxes is in a user control that is dynamically added to the page at runtime.

In the code behind, I am building some client side javascript that will call a custom ajax web service to do some calculations and such.

For example:

        StringBuilder javaScript = new StringBuilder(); 
        javaScript.Append("saveLuminaireInvestment("); 
        javaScript.Append("$get('" + this.lblLuminaireID.ClientID + "').innerHTML, "); 
        javaScript.Append("$find('" + this.cmbExistFixture.ClientID + "').value, "); 
        javaScript.Append("$find('" + this.cmbTCPFixture.ClientID + "').value, "); 
        javaScript.Append("$get('" + this.txtQuantity.ClientID + "').value, "); 
        javaScript.Append("$get('" + this.txtTCPQuantity.ClientID + "').value, "); 
        javaScript.Append("$get('" + this.txtTCPCostPerFixture.ClientID + "').value, "); 
        javaScript.Append("$get('" + this.txtTCPInstallCost.ClientID + "').value, "); 
        javaScript.Append("$get('" + this.txtTCPRebate.ClientID + "').value"); 
        javaScript.Append("); "); 
 
        cmbExistFixture.Attributes.Add("onChange", javaScript.ToString()); 
 

But now I need to change this to use the RadCombo boxes.

How do I change this:

cmbExistFixture.Attributes.Add("onChange", javaScript.ToString());

to the equivilent in the RadCombo? Since the javascript that is being executed is dynamically generated, and each one is unique, I can't set this in the markup with OnClientSelectedIndexChanged.

Can I set "OnClientSelectedIndexChanged to some javascript (like above) rather than a named function?

Greg






Greg
Top achievements
Rank 1
 answered on 05 May 2009
2 answers
71 views
I'm looking at using the RadGrid to edit an "Invoice" object which contains a List of "InvoiceItem" objects.  I want to be able to add, edit and delete these InvoiceItem objects through the RadGrid, but I also don't want the changes to be applied until the user hits "OK". 

What is the best way construct a set of objects like this with the RadGrid but defer updating the database until the end of the editing process?  Should I create a shadow DataTable or other Serializable collection and store it in the view state so I can synchronize my objects at the end of the process?  Or is there a better way of doing it?

I was initially thinking I would populate the RadGrid on PageLoad, then let the user the edits he needed, then query the RadGrid's status when the user clicks "OK" to see what all the rows contain, then apply those edits.  But because the NeedDataSource repopulates the grid with each edit, I wasn't sure what the best practice is for this situation.

Thanks!

-Mike
Mike Bridge
Top achievements
Rank 1
 answered on 05 May 2009
1 answer
214 views
I would like to use the file selector dialog demo to store the file path in a databound text box in a formview.

My current code looks like this.  How can I change it to store the path in my databound file location textbox?

<asp:FormView ID="fvAddBidDoc" runat="server" DataKeyNames="id" DataSourceID="dsAddBidDoc" 
        DefaultMode="Insert">  
 
        <InsertItemTemplate> 
            <table class="style1">  
                <tr> 
                    <td> 
                        Document Number:</td> 
                    <td> 
                        <asp:TextBox ID="DocumentNumberTextBox" runat="server"   
                            Text='<%# Bind("DocumentNumber") %>' /> 
                    </td> 
                    <td> 
                        Document Name:</td> 
                    <td> 
                        <asp:TextBox ID="DocumentNameTextBox" runat="server"   
                            Text='<%# Bind("DocumentName") %>' /> 
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                        Posting Date:  
                        <%--<asp:TextBox ID="PostingDateTextBox" runat="server" Text='<%# Bind("PostingDate") %>' />--%></td>  
                    <td> 
                        <telerik:RadDatePicker ID="PostingDateTextBox" Runat="server"   
                            DbSelectedDate='<%# Bind("PostingDate") %>' Skin="Hay">  
                            <Calendar Skin="Hay" UseColumnHeadersAsSelectors="False"   
                                UseRowHeadersAsSelectors="False" ViewSelectorText="x">  
                            </Calendar> 
                            <DatePopupButton HoverImageUrl="" ImageUrl="" /> 
                        </telerik:RadDatePicker> 
                    </td> 
                    <td> 
                        Closing Date:  
                    </td> 
                    <td> 
                        <telerik:RadDatePicker ID="ClosingDateTextBox" Runat="server"   
                            DbSelectedDate='<%# Bind("ClosingDate") %>' Skin="Hay">  
                            <Calendar Skin="Hay" UseColumnHeadersAsSelectors="False"   
                                UseRowHeadersAsSelectors="False" ViewSelectorText="x">  
                            </Calendar> 
                            <DatePopupButton HoverImageUrl="" ImageUrl="" /> 
                        </telerik:RadDatePicker> 
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                        File Location:</td> 
                    <td> 
                        <asp:TextBox ID="FileLocationTextBox" runat="server"   
                            Text='<%# Bind("FileLocation") %>' /> 
                    </td> 
                    <td> 
                        Select a file:  
                    </td> 
                    <td> 
                        <input ID="fileName" size="50" /><input   
                            onclick="OpenFileExplorerDialog(); return false;" type="button"   
                            value="Open ..." /><br /> 
                        Open the dialog and double click on a file to select it.  
 
                        <script type="text/javascript">  
 
                function OpenFileExplorerDialog() {  
                    var wnd = $find('<%=fvAddBidDoc.FindControl("ExplorerWindow").ClientID %>');  
                    wnd.show();  
                }  
 
                //This function is called from the Explorer.aspx page  
                function OnFileSelected(wnd, fileSelected) {  
                    var textbox = $get("fileName");  
                    textbox.value = fileSelected;  
                }  
            </script> 
 
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                        <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"   
                            CommandName="Insert" Text="Insert" /> 
                    </td> 
                    <td> 
                        <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"   
                            CommandName="Cancel" Text="Cancel" /> 
                    </td> 
                    <td> 
                        &nbsp;</td> 
                    <td> 
                        &nbsp;</td> 
                </tr> 
            </table> 
            <br /> 
              
 
            <telerik:RadWindow runat="server" Width="530px" Height="550px" VisibleStatusbar="false" 
                NavigateUrl="~/bidding/secure/explorer.aspx" ID="ExplorerWindow" Modal="true" 
                Behaviors="Close,Move">  
            </telerik:RadWindow> 
            &nbsp;  
        </InsertItemTemplate> 
    
    </asp:FormView> 

Thanks
Brett
Fiko
Telerik team
 answered on 05 May 2009
4 answers
98 views
I have a website that I have been working on over the last couple of  months.  It uses the Rad Grid and etc..   The other day I create a contact us form and notice the code hinting is not bring up the Rad controls. 

For example I have a radtextbox called txtFirstName, txtFirstName and a standard asp.net label called lblDisplay.  The lblDisplay appears in the code hit popup box, while txtFirstName does not appear in the code behind. 

I went ahead and type out the txtFirstName because I know it exists.  My test page runs fine in the browsers. 


I set up a total new site, and did not have this problem. 

Does this have something to do with the Web.config file?

Where do I start looking?

I am using RadControls Q3 2008, maybe I need to update?

Thanks,
David
David
Top achievements
Rank 1
 answered on 05 May 2009
3 answers
227 views
I'm creating controls dynamically in the ItemCreated event of my grid. I'm adding these controls to my edit form (WebUserControl) for insert/update. All my textbox type controls work fine but my dropdown control seems to lose its items after postback. How can I get it to keep it values/viewstate after postback? Thanks.


        protected void rgData_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
            {
                UserControl edit = e.Item.FindControl(GridEditFormItem.EditFormUserControlID) as UserControl;
                ..........................................
                        switch (type)
                        {
                            case CustomFieldTypeController.CustumFieldTypeEnum.Boolean:
                                c = new DropDownList();
                                ((DropDownList)c).Items.Add(new ListItem("--Select--", ""));
                                ((DropDownList)c).Items.Add(new ListItem("true", "true"));
                                ((DropDownList)c).Items.Add(new ListItem("false", "false"));

                                break;



Digital Man
Top achievements
Rank 2
 answered on 05 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?