Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
120 views
I have a grid where most of the columns can be hidden by the user, but there are some that should always be visible.  Is there a way to specify which columns in a grid can be hidden?

Dave.
Princy
Top achievements
Rank 2
 answered on 09 Feb 2010
43 answers
1.0K+ views
Hi Guys,

I am using Rad Dock Prometheus for the first time and I have an ambitious project.

I want to build a home page which initially loads lots of "widgets"  into a certain layout, allow the user to move them around, save their layout to a database and add new widgets by clicking an add button.

The problem is that I don't know where to start. I have got several Widgets containing user controls and managed to put them into three docking zones. I can move them around on the page but don't know how to do the following....

* Save the layout to a SQL server database.
* Reload the layout when the user logs back on if they have a layout saved.
* Allow them to add new docks which are initially hidden

I have looked at the myportal example in the documentation but haven't managed to get the "save layout to session" code working at all. Does anyone know of a good article on how to make a portal like this ?

If you need any example of how it needs to work you can see what I mean on http://gamers.eurogamer.net/.

Thanks, Jon
ctca
Top achievements
Rank 1
 answered on 09 Feb 2010
1 answer
150 views

Hi
I am binding dataset to radgrid and i want to add filter option in a single column. Let me know how to do this.

-------------------------------------------------------

RadGrid1.DataSource = _DS.Tables[0];

RadGrid1.DataBind();

--------------------------------------------------


Princy
Top achievements
Rank 2
 answered on 09 Feb 2010
1 answer
184 views
I am updating an order form using the RadGrid nesting feature, but I'm having trouble getting the data from the nested grid and inserting it into a dataset so I can further process the order, inserting it into the database.  I keep the "not set to an instance of an object" null reference error. Specifically, when I try to initiate the row count for the data in the nested grid in the codebehind.  Here's the relevant aspx code;

<telerik:RadGrid ID="rgPogList" runat="server" DataSourceID="dsListPogs" GridLines="None" AllowPaging="True">  
 
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="StoreNum,POGID" DataSourceID="dsListPogs">  
        <RowIndicatorColumn> 
            <HeaderStyle Width="20px"></HeaderStyle> 
        </RowIndicatorColumn> 
 
        <ExpandCollapseColumn> 
            <HeaderStyle Width="20px"></HeaderStyle> 
        </ExpandCollapseColumn> 
        <Columns> 
            <telerik:GridBoundColumn DataField="StoreNum" HeaderText="StoreNum"   
                ReadOnly="True" SortExpression="StoreNum" UniqueName="StoreNum" Visible="false">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="RetailerID" DataType="System.Int32"   
                HeaderText="RetailerID" SortExpression="RetailerID" UniqueName="RetailerID" Visible="false">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="POGID" HeaderText="POGID" ReadOnly="True"   
                SortExpression="POGID" UniqueName="POGID">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="Description" HeaderText="Description"   
                SortExpression="Description" UniqueName="Description">  
            </telerik:GridBoundColumn> 
        </Columns> 
          
            <NestedViewSettings DataSourceID="SqlDataSource2">  
                <ParentTableRelation> 
                    <telerik:GridRelationFields MasterKeyField="POGID" DetailKeyField="POGID" /> 
                </ParentTableRelation> 
            </NestedViewSettings> 
            <NestedViewTemplate> 
                <asp:GridView ID="rgOrderDetail" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource2" 
                        Width="100%" Font-Size="Small" ForeColor="Black">  
                    <Columns> 
                        <asp:TemplateField HeaderText="RowNum" SortExpression="RowNum">  
                            <EditItemTemplate> 
                                <asp:TextBox ID="txtRowNum" runat="server" Text='<%# Bind("RowNum") %>'></asp:TextBox> 
                            </EditItemTemplate> 
                              
                            <ItemTemplate> 
                                <asp:Label ID="lblRowNum" runat="server" Text='<%# Bind("RowNum") %>'></asp:Label> 
                            </ItemTemplate> 
                              
                            <ItemStyle Font-Bold="False" /> 
                        </asp:TemplateField> 
                          
                        <asp:TemplateField HeaderText="LineNum" SortExpression="LineNum">  
                            <EditItemTemplate> 
                                <asp:TextBox ID="txtLineNum" runat="server" Text='<%# Bind("LineNum") %>'></asp:TextBox> 
                            </EditItemTemplate> 
                              
                            <ItemTemplate> 
                                <asp:Label ID="lblLineNum" runat="server" Text='<%# Bind("LineNum") %>'></asp:Label> 
                            </ItemTemplate> 
                              
                            <ItemStyle Font-Bold="False" /> 
                        </asp:TemplateField> 
                          
                        <asp:TemplateField HeaderText="ItemNum" SortExpression="ItemNum">  
                            <EditItemTemplate> 
                                <asp:TextBox ID="txtItemNum" runat="server" Text='<%# Bind("ItemNum") %>'></asp:TextBox> 
                            </EditItemTemplate> 
                          
                            <ItemTemplate> 
                                <asp:Label ID="lblItemNum" runat="server" Text='<%# Bind("ItemNum") %>'></asp:Label> 
                            </ItemTemplate> 
                          
                            <ItemStyle Font-Bold="False" /> 
                        </asp:TemplateField> 
                          
                        <asp:TemplateField HeaderText="UPC" SortExpression="UPC">  
                            <EditItemTemplate> 
                                <asp:TextBox ID="txtUPC" runat="server" Text='<%# Bind("UPC") %>'></asp:TextBox> 
                            </EditItemTemplate> 
                              
                            <ItemTemplate> 
                                <asp:Label ID="lblUPC" runat="server" Text='<%# Bind("UPC") %>'></asp:Label> 
                            </ItemTemplate> 
                              
                            <ItemStyle Font-Bold="False" /> 
                        </asp:TemplateField> 
                          
                        <asp:TemplateField HeaderText="Par" SortExpression="Par">  
                            <EditItemTemplate> 
                                <asp:TextBox ID="txtPar" runat="server" Text='<%# Bind("Par") %>'></asp:TextBox> 
                            </EditItemTemplate> 
                              
                            <ItemTemplate> 
                                <asp:Label ID="lblPar" runat="server" Text='<%# Bind("Par") %>'></asp:Label> 
                            </ItemTemplate> 
                              
                            <ItemStyle Font-Bold="False" /> 
                        </asp:TemplateField> 
                          
                        <asp:TemplateField HeaderText="ItemDesc" SortExpression="ItemDesc">  
                                    <EditItemTemplate> 
                                        <asp:TextBox ID="txtItemDesc" runat="server" Text='<%# Bind("ItemDesc") %>'></asp:TextBox> 
                                    </EditItemTemplate> 
                                    <ItemTemplate> 
                                        <asp:Label ID="lblItemDesc" runat="server" Text='<%# Bind("ItemDesc") %>'></asp:Label> 
                                    </ItemTemplate> 
                                    <ItemStyle Font-Bold="False" /> 
                                </asp:TemplateField> 
                        <asp:TemplateField HeaderText="Quantity">  
                            <ItemTemplate> 
                                <asp:TextBox ID="txtQuantity" runat="server" Width="0.5in">0</asp:TextBox>&nbsp;  
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtQuantity" 
                                        ErrorMessage="Amount can not be blank">  
                                    </asp:RequiredFieldValidator> 
                                    <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtQuantity" 
                                        ErrorMessage="Amount must be a number" MaximumValue="2000" MinimumValue="0" SetFocusOnError="True" 
                                        Type="Integer">  
                                    </asp:RangeValidator> 
                            </ItemTemplate> 
                            <ItemStyle Width="3.9in" Wrap="False" /> 
                        </asp:TemplateField> 
                    </Columns> 
                </asp:GridView><br /><br /> 
                  
                <asp:Button ID="btnClear" runat="server" Text="Clear" /> 
                <asp:Button ID="btnReviewOrder" runat="server" Text="Submit" OnCommand="ReviewOrder" /> 
 
            </NestedViewTemplate> 
              
    </MasterTableView> 
    <HierarchySettings ExpandTooltip="Expand to see items in POG" /> 
</telerik:RadGrid> 
And here is the codebehind:

   Private Sub ReviewOrder()  
 
        'Dim intRow As Integer  
        Dim Quantity As Integer 
        Dim Row As GridViewRow  
        Dim DS As New DataSet  
        Dim DR As DataRow  
        Dim RowCount As Integer 
        Dim rgOrderDetail As GridView = Me.FindControl("rgOrderDetail")  
 
        'Create data set for order form  
        DS.Tables.Add("tblReviewOrder")  
        DS.Tables(0).Columns.Add("RowNum", Type.GetType("System.String"))  
        DS.Tables(0).Columns.Add("LineNum", Type.GetType("System.String"))  
        DS.Tables(0).Columns.Add("ItemNum", Type.GetType("System.String"))  
        DS.Tables(0).Columns.Add("UPC", Type.GetType("System.String"))  
        DS.Tables(0).Columns.Add("Par", Type.GetType("System.Int32"))  
        DS.Tables(0).Columns.Add("ItemDesc", Type.GetType("System.String"))  
        DS.Tables(0).Columns.Add("Quantity", Type.GetType("System.Int32"))  
        DS.Tables(0).Columns.Add("Messages", Type.GetType("System.String")) '???  
 
        'Counts the item rows in the gridview currently open  
        RowCount = rgOrderDetail.Rows.Count - 1  
        Dim blnChecked As Boolean = False '????  
 
        'Populates the data set from the order created  
        For intRow = 0 To RowCount  
            Row = rgOrderDetail.Rows(intRow)  
            Quantity = DirectCast(Row.FindControl("txtQuantity"), TextBox).Text().Trim()  
 
            If Quantity > 0 Then 
                DR = DS.Tables(0).NewRow()  
 
                DR("RowNum") = CType(rgOrderDetail.Rows(intRow).FindControl("lblRowNum"), Label).Text  
                DR("LineNum") = CType(rgOrderDetail.Rows(intRow).FindControl("lblLineNum"), Label).Text  
                DR("ItemNum") = CType(rgOrderDetail.Rows(intRow).FindControl("lblItemNum"), Label).Text  
                DR("UPC") = CType(rgOrderDetail.Rows(intRow).FindControl("lblUPC"), Label).Text  
                DR("Par") = CType(rgOrderDetail.Rows(intRow).FindControl("lblPar"), Label).Text  
                DR("ItemDesc") = CType(rgOrderDetail.Rows(intRow).FindControl("lblItemDesc"), Label).Text  
                DR("Quantity") = CType(rgOrderDetail.Rows(intRow).FindControl("txtQuantity"), TextBox).Text().Trim()  
                If CType(rgOrderDetail.Rows(intRow).FindControl("txtQuantity"), TextBox).Text().Trim() > (CType(rgOrderDetail.Rows(intRow).FindControl("lblPar"), Label).Text) Then 
                    DR("Messages") = "Quantity entered is greater than the Par amount." 
                Else 
                    DR("Messages") = "" 
                End If 
                DS.Tables(0).Rows.Add(DR)  
            End If 
        Next 
 
        rgReview.DataSource = (DS)  
        rgReview.DataBind()  
 
        If RowCount > 0 Then 
            OrderPanel.Visible = False 
            ReviewPanel.Visible = True 
        Else 
            OrderPanel.Visible = True 
            ReviewPanel.Visible = False 
        End If 
 
    End Sub 
I am hoping a second set of eyes will help me resolve this.  Basically, I will eventually take the dataset and creating a new order that will then be inserted into a database.
Shinu
Top achievements
Rank 2
 answered on 09 Feb 2010
1 answer
104 views
Hi, How do I set the panel bar height to expand dynamicly... ie when we run the panel bar with all items open it currently extends beyond the total height of the panel bar, so you cant see the bottom panels... easily fixed by making the total panel bar height larger, however this will not look good when all items are not expanded... so we would like to set it that the height of the entire panel bar grow and shrink as per the total panel usage. ie making the total height of the container variable or flexible.
I hope this makes sense, thanks for any help.

Yana
Telerik team
 answered on 09 Feb 2010
16 answers
379 views
I've downloaded the RADEditor Lite edition for MOSS.
I want to use the RADEditor as the default rich text editor for my list objects.
I've followed the instructions given in the installtion doc(chm file) for using  RADEditor for list items. But I'm not getting the RADEditor as the default rich text editor. I've tried IISRESEY as well. But no luck..

Can you please let me know where have I gone wrong?

Thanks in advance.....
sohil makwana
Top achievements
Rank 1
 answered on 09 Feb 2010
4 answers
115 views

Hi,
We are developing an asp.net WebPart that is integrated in Sharepoint site.
The WebPart contains telerik:RadXmlHttpPanel which will have a toggled display on the click of a RadTreeViewNode(ajaxified).
The WebPart project consists of code behind file only.
No .aspx file is there.
The problem is how will the XMLHttpPanel's serviceRequest method be executed.
From the examples available on http://demos.telerik.com/aspnet-ajax/xmlhttppanel/examples/default/defaultcs.aspx,
I have seen that a javascipt function is added to a  RadScriptBlock in .aspx file. This function internally sends a call to 
XmlHttpPanel_ServiceRequest function and then the corresponding controls are loaded with values. Please let me know how to execute serviceRequest function of RadXMLHttpPanel in my case.

With Regards,
Shikha

 

zahi kramer
Top achievements
Rank 1
 answered on 09 Feb 2010
1 answer
105 views
On my page, I have a RadUpload control (Q3 2009) which I use to submit images.

After the image has been uploaded (on postback), I hide the upload control and show a "change logo" button.  If the user wants to change the image, they'd click on that button and I make the RadUpload control visible once more.

When I do this however, some very strange behavior occurs with the control - its seems like the underlying HTML File Input control is shown whenever the user mouse's over the RadUpload control..

Its hard to explain, so I made a little movie of the issue using Jing:  http://screencast.com/t/MDE3ZTA4NG

Is there a known issue with the RadUpload (in IE 8) that causes this behavior on visibility change?

Roy
Veselin Vasilev
Telerik team
 answered on 09 Feb 2010
8 answers
280 views
It's nice to double click on the image then displaying a preview in window, but I suggest to provide an new feature that enables showing thumbs [thumbnails].. is that possible??
Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 09 Feb 2010
1 answer
115 views
Hi,

Could anyone plz suggest me can we place rad dock controls inside the radtab strip control.

 i am getting this error when I am using the raddock controls inside the radtabstrip.

Telerik.Web.UI.RadDockZone can contain only controls of type Telerik.Web.UI.RadDock

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Telerik.Web.UI.RadDockZone can contain only controls of type Telerik.Web.UI.RadDock


Could any one plz help me in this.







Yana
Telerik team
 answered on 09 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?