Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
250 views
<telerik:RadGrid ID="grdUsers" runat="server" AutoGenerateColumns="False" Width="100%" AllowMultiRowEdit="True" GridLines="None">  
    <MasterTableView DataKeyNames="user_id" HierarchyLoadMode="Client" EditMode="InPlace">  
        <ExpandCollapseColumn Visible="True"></ExpandCollapseColumn> 
        <Columns> 
            <telerik:GridTemplateColumn> 
                <HeaderTemplate> 
                    <asp:Label ID="lblSelect" runat="server" Text="Select:" meta:resourcekey="SelectLabel"></asp:Label> 
                    <asp:LinkButton ID="lnkbtnChkAll" runat="server" CommandArgument="All" CommandName="Check" 
                        Text="All" meta:resourcekey="Select_All"></asp:LinkButton> 
                    <asp:LinkButton ID="lnkbtnChkNone" runat="server" CommandArgument="None" CommandName="Check" 
                        Text="None" meta:resourcekey="Select_None"></asp:LinkButton> 
                    <asp:Button ID="btnDelete" runat="server" CommandArgument="Checked" CommandName="Delete" 
                        Text="Delete" meta:resourcekey="DeleteButton"></asp:Button> 
                </HeaderTemplate> 
                <ItemTemplate> 
                    <asp:CheckBox ID="chkbxDelete" runat="server" Enabled='<%# Eval("allow_delete") %>' /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Email" UniqueName="UserEmail" DataField="user_email" 
                DataType="System.String">  
                <HeaderTemplate> 
                    <asp:Label ID="lblEmailHdr" runat="server" Text="Email" meta:resourcekey="UserEmailLabel"></asp:Label> 
                </HeaderTemplate> 
                <ItemTemplate> 
                    <asp:Label ID="lblEmail" runat="server" Text='<%# Eval("user_email") %>'></asp:Label> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <asp:TextBox ID="fldEmail" runat="server" Text='<%# Eval("user_email") %>' ValidationGroup="vldgrpUser"></asp:TextBox> 
                    <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ControlToValidate="fldEmail" 
                        ErrorMessage="* Required" ValidationGroup="vldgrpUser"></asp:RequiredFieldValidator> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="FirstName" UniqueName="FirstName" DataField="first_name" 
                DataType="System.String">  
                <HeaderTemplate> 
                    <asp:Label ID="lblFNameHdr" runat="server" Text="First Name" meta:resourcekey="FirstNameLabel"></asp:Label> 
                </HeaderTemplate> 
                <ItemTemplate> 
                    <asp:Label ID="lblFName" runat="server" Text='<%# Eval("first_name") %>'></asp:Label> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <asp:TextBox ID="fldFName" runat="server" Text='<%# Eval("first_name") %>' ValidationGroup="vldgrpUser"></asp:TextBox> 
                    <asp:RequiredFieldValidator ID="rfvFName" runat="server" ControlToValidate="fldFName" 
                        ErrorMessage="* Required" ValidationGroup="vldgrpUser"></asp:RequiredFieldValidator> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="LastName" UniqueName="LastName" DataField="last_name" 
                DataType="System.String">  
                <HeaderTemplate> 
                    <asp:Label ID="lblLNameHdr" runat="server" Text="Last Name" meta:resourcekey="LastNameLabel"></asp:Label> 
                </HeaderTemplate> 
                <ItemTemplate> 
                    <asp:Label ID="lblLName" runat="server" Text='<%# Eval("last_name") %>'></asp:Label> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <asp:TextBox ID="fldLName" runat="server" Text='<%# Eval("last_name") %>' ValidationGroup="vldgrpUser"></asp:TextBox> 
                    <asp:RequiredFieldValidator ID="rfvLName" runat="server" ControlToValidate="fldLName" 
                        ErrorMessage="* Required" ValidationGroup="vldgrpUser"></asp:RequiredFieldValidator> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="Role" UniqueName="UserRole" DataField="user_role_description" 
                DataType="System.Int16">  
                <HeaderTemplate> 
                    <asp:Label ID="lblUserRoleHdr" runat="server" Text="Role" meta:resourcekey="UserRoleLabel"></asp:Label> 
                </HeaderTemplate> 
                <ItemTemplate> 
                    <asp:Label ID="lblUserRole" runat="server"></asp:Label> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <asp:DropDownList ID="ddlUserRole" runat="server">  
                    </asp:DropDownList> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="User Name" UniqueName="UserName" DataField="user_name" 
                DataType="System.String">  
                <HeaderTemplate> 
                    <asp:Label ID="lblUNameHdr" runat="server" Text="User Name" meta:resourcekey="UserNameLabel"></asp:Label> 
                </HeaderTemplate> 
                <ItemTemplate> 
                    <asp:Label ID="lblUName" runat="server" Text='<%# Eval("user_name") %>'></asp:Label> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <asp:Label ID="lblUName" runat="server" Text='<%# Eval("user_name") %>'></asp:Label> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridBoundColumn UniqueName="UserStatus" DataField="user_status_id" DataType="System.Int16" 
                Display="false">  
            </telerik:GridBoundColumn> 
            <telerik:GridTemplateColumn HeaderText="Status" UniqueName="UserStatusDesc" DataField="user_status_description" 
                DataType="System.String">  
                <HeaderTemplate> 
                    <asp:Label ID="lblUsrStatHdr" runat="server" Text="Status" meta:resourcekey="UserStatusLabel"></asp:Label> 
                </HeaderTemplate> 
                <ItemTemplate> 
                    <asp:Label ID="lblUsrStat" runat="server"></asp:Label> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <asp:Label ID="lblUsrStat" runat="server"></asp:Label> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridBoundColumn UniqueName="IsTester" DataField="is_tester" DataType="System.Boolean" 
                Display="false">  
            </telerik:GridBoundColumn> 
            <telerik:GridTemplateColumn HeaderText="Browser" UniqueName="BrowserType" DataField="web_browser_type" 
                DataType="System.String">  
                <HeaderTemplate> 
                    <asp:Label ID="lblBrowserHdr" runat="server" Text="Browser" meta:resourcekey="BrowserTypeLabel"></asp:Label> 
                </HeaderTemplate> 
                <ItemTemplate> 
                    <asp:Label ID="lblBrowser" runat="server" Text=""></asp:Label> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <asp:Label ID="lblBrowser" runat="server" Text=""></asp:Label> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn HeaderText="IP" UniqueName="IPAddress" DataField="ip_address" 
                DataType="System.String">  
                <HeaderTemplate> 
                    <asp:Label ID="lblIPAddyHdr" runat="server" Text="IP" meta:resourcekey="IPAddressLabel"></asp:Label> 
                </HeaderTemplate> 
                <ItemTemplate> 
                    <asp:Label ID="lblIPAddy" runat="server" Text='<%# Eval("ip_address") %>'></asp:Label> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <asp:Label ID="lblIPAddy" runat="server" Text='<%# Eval("ip_address") %>'></asp:Label> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
            <telerik:GridTemplateColumn UniqueName="TemplatedEditUserColumn" HeaderStyle-CssClass="gridWBHeader3" 
                ItemStyle-CssClass="gridWBRow3">  
                <ItemTemplate> 
                    <asp:Button ID="btnEdit" runat="server" Text="Edit" CommandName="Edit" meta:resourcekey="EditButton">  
                    </asp:Button> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <asp:Button ID="btnUpdate" runat="server" Text="Save" CommandName="Update" meta:resourcekey="UpdateButton" 
                        ValidationGroup="vldgrpUser"></asp:Button> 
                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" CommandName="Cancel" meta:resourcekey="CancelButton" 
                        CausesValidation="false"></asp:Button> 
                </EditItemTemplate> 
                <HeaderStyle CssClass="gridWBHeader3" /> 
                <ItemStyle CssClass="gridWBRow3" /> 
            </telerik:GridTemplateColumn> 
        </Columns> 
        <NoRecordsTemplate> 
            <asp:Label ID="lblNoUsers" runat="server" Text="No users created."></asp:Label> 
        </NoRecordsTemplate> 
        <NestedViewSettings> 
            <ParentTableRelation> 
                <telerik:GridRelationFields DetailKeyField="user_id" MasterKeyField="user_id" /> 
            </ParentTableRelation> 
        </NestedViewSettings> 
        <DetailTables> 
            <telerik:GridTableView runat="server" AutoGenerateColumns="false" Width="100%" Caption="Custom Defined Fields" 
                EditMode="InPlace" Name="CustomUserFields">  
                <ParentTableRelation> 
                    <telerik:GridRelationFields DetailKeyField="user_id" MasterKeyField="user_id" /> 
                </ParentTableRelation> 
                <Columns> 
                    <telerik:GridTemplateColumn UniqueName="CustomField">  
                        <ItemTemplate> 
                            <asp:Label ID="lblCustName" runat="server" Text='<%# Eval("custom_field_name") %>'></asp:Label> 
                            <asp:Label ID="lblCustValue" runat="server" Text='<%# Eval("custom_field_value") %>'></asp:Label> 
                        </ItemTemplate> 
                        <EditItemTemplate> 
                            <asp:Label ID="lblCustName" runat="server" Text='<%# Eval("custom_field_name") %>'></asp:Label> 
                            <asp:TextBox ID="fldCustValue" runat="server" Text='<%# Eval("custom_field_value") %>'></asp:TextBox> 
                            <asp:DropDownList ID="ddlCustValue" runat="server">  
                            </asp:DropDownList> 
                        </EditItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridEditCommandColumn ButtonType="PushButton" EditText="Edit" CancelText="Cancel" 
                        UpdateText="Update">  
                    </telerik:GridEditCommandColumn> 
                </Columns> 
                <NoRecordsTemplate> 
                    <asp:Label ID="lblNoCustFld" runat="server" Text="No custom data defined for this user."></asp:Label> 
                </NoRecordsTemplate> 
            </telerik:GridTableView> 
        </DetailTables> 
    </MasterTableView> 
    <ClientSettings AllowColumnHide="true">  
    </ClientSettings> 
</telerik:RadGrid> 
I am trying to do the following in a RadGrid with a MasterTableView and a Detail GridTableView:

1) User clicks EDIT on a parent row
2) Parent row goes into EDIT mode
3) Child rows, if any, also go into EDIT mode
4) Child rows are displayed automatically if parent row goes into EDIT mode

I have looked at and tried all of the currently posted methods for putting items (parent or child) into edit mode, including adding code to the PreRender event to add all of the child item indexes to the RadGridEditIndexes collection for the grid and rebinding without success.  If I put the code in the PreRender event, the indexes are properly added to the RadGrid.EditIndexes collection but a straight call to RadGrid.Rebind doesn't render the child rows.  If I, instead, call RadGrid.MasterTableView.DetailTables(0).Rebind, the detail rows are rendered but they are not in edit mode.  (I have also tried adding my code to the ItemCommand and EditCommand events for the grid, but these do not work either...)

As a test, I commented out my PreRender code and added a GridEditCommandColumn to the Detail GridTableView.  I am able to expand/collapse the parent, click edit on the parent and then click edit on its children - they all go into EDIT mode after their respective EDIT buttons have been clicked, so I know it's possible to get them to all show up in EDIT mode...

Any thoughts on how to accomplish this task is much appreciated, as I've spent 3 very unfruitful days trying to make it work.  Thanks!

Notes: I have AllowMultiRowEdit set to TRUE for the grid, databinding is done server-side and I used the NeedDataSource event for databinding.

Here's my PreRender code:

 

Protected Sub grdUsers_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles grdUsers.PreRender  
        Try 
            If (Me.ProjectID > 0) Then 
                Dim editItems() As Telerik.Web.UI.GridItem = grdUsers.MasterTableView.GetItems(Telerik.Web.UI.GridItemType.EditItem)  
                For intCounter As Int32 = 0 To (editItems.Length - 1)  
                    editItems(intCounter).Edit = True 
                    editItems(intCounter).Expanded = True 
                    If editItems(intCounter).HasChildItems Then 
                        Dim customFields As Telerik.Web.UI.GridTableView = grdUsers.MasterTableView.Items(editItems(intCounter).ItemIndex).ChildItem.NestedTableViews(0)  
                        If Not (customFields Is Nothing) Then 
                            For Each fld As Telerik.Web.UI.GridItem In customFields.Items  
                                grdUsers.EditIndexes.Add(editItems(intCounter).ItemIndex, grdUsers.MasterTableView.DetailTables(0).DetailTableIndex, fld.ItemIndex)  
                            Next fld  
                        End If 
                        editItems(intCounter).SetChildrenVisible(True)  
                    End If 
                Next intCounter  
                If (editItems.Length > 0) Then 
                    grdUsers.MasterTableView.DetailTables(0).DataSource = Nothing 
                    grdUsers.MasterTableView.DetailTables(0).Rebind()  
                End If 
            End If 
        Catch ex As Exception  
            Throw New Exception("Error in grdUsers_PreRender() of module usrctrl_ProjectUsers: <br />" & ex.ToString)  
        End Try 
    End Sub 
Tsvetoslav
Telerik team
 answered on 12 Nov 2009
6 answers
188 views
The 5-15 build of RadControls appears to have a bug reading SelectedValue when in a multi-combo page that populates via itemsrequested

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Combobox/Examples/Functionality/MultipleComboBoxes/DefaultCS.aspx

The server-side SelectedValue is null for the 3rd combo (the city in this example) when you selected a city.

I verified this by copying back the April build to verify it worked again, and then copying back the May 15 build to see if it breaks again, and then doing it once again for good measure!

I also shut down my browser, closed visual studio and restarted, and even copied back and forth the April/May dll's on a production server, so I'm pretty sure this is a real bug. This in on the 3.5 dll.


Mounir Maghraoui
Top achievements
Rank 1
 answered on 12 Nov 2009
1 answer
120 views
I have information coming into my clientside cade provided by a web service. I need to add any new messages from this feed directly into the RadRotator using javascript. I can't see any way to do this. There is a set_items function but I don't know if this does what I need it to and I can't find any code samples for it.

Any ideas how I can add an item to the RadRotator from javascript code?
Fiko
Telerik team
 answered on 12 Nov 2009
1 answer
99 views
Hi,

  I m using RadCombo with checkbox, displaying items with checkbox. everything is fine, but 

Clarification 1:

I like to add one link is called "clear" in the first item of the combo when the items is checked. if i click the link 'clear' wants to uncheck all the items in the particular combo.

Clarification 2:

i have bind some items on the combo box, finally i hav added one item is called "Custom Price", once i check this want to enter the custom price on it. like textbox has to be introduced for data entry.

Please let me know the solutions.....

Thanks & Regards,
Psk



Shinu
Top achievements
Rank 2
 answered on 12 Nov 2009
3 answers
190 views
I'm attempting to get one of my projects to css/xhtml validate and I'm running into a lot of problems with the radeditor control.  It's giving me ~50 css  errors/page.  Here's a quick subset:

870 .reTool span Property _display doesn't exist : inline
885 .reToolbar .reTool_text Property _display doesn't exist : inline
898 .reToolbar .reTool_text span Property _display doesn't exist : inline
921 * html .RadEditor .reSplitButton Property _display doesn't exist : inline-block


Is there any way to get this control to validate?



Martin
Telerik team
 answered on 12 Nov 2009
2 answers
184 views
I am using DotNetNuke with version fromn 2009 Q1. I have a third party DNN module which is giving the error below. DNN can only use one version of the assembly. Is there a way to make a DNN module use the newer Telerik assembly without recompiling the module?

Error Message:
Could not load file or assembly 'Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Paul
Telerik team
 answered on 12 Nov 2009
1 answer
145 views
Hi Everybody,

I've been finding a solution to this problem, but I havent solve this problem. I'm going to try explain this problem...

There is a aspx page where there is a calender control. The user select any dates, for example, the user selected theses dates: 9/11/2009, 12/12/2009 and 1/20/2009. Then the user clicks on next button, then this button redirects for another page. This new page there is another calender control, this calender control there are dates of period of time, like min: 1/1/2009 max: 1/1/2010.

But this calendar shows just dates that the user didnt select las page. So, that three date that the user selected above wont be to show them in this calendar.

Has Somebody ever had this problem? Can Anybody help me, please?

Thank you for attention,

Carlos
Shinu
Top achievements
Rank 2
 answered on 12 Nov 2009
3 answers
115 views
Hi All,

I am trying to change the footer of the RadGrid where it says "Page Size = 5". Acutally I have set the property of Customer Paging allowed to false, but the Grid still shows the customer paging (so that the customer can change from page size 5 to 10, etc.)

I want to prevent that the customer can decide by himself which page size the Grid show have as any page size above 5 crashes my webpage (its too large then and jumps out of my HTML div).

How would it possible to solve this?

Any hints are very much appreciated.

Best wishes

Andi
Princy
Top achievements
Rank 2
 answered on 12 Nov 2009
2 answers
190 views
Hi ,,

Please help me with this.

I am using the xmlhttppanel callback to update my asp.net gridview ...actaully when i am doing this..paging is not working for gridview ,,,anf paging event handler is not getting called..but in the normal postback it is working.i have set the 

EnableSortingAndPagingCallbacks =true for the gridview..

please provide me with solution..
 thanks

vikram kamalapur
Top achievements
Rank 1
 answered on 12 Nov 2009
2 answers
112 views
Hello,

In the tab we have both the text and icon(image). 
By default the icon also comes center aligned (close to the text).
We would like to place it left alighned, with a custom margin,
Can you please guide us here,

Warm Regards
Praba Swami
PGM
Top achievements
Rank 1
 answered on 12 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?