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

I'm upgrading RAD Grid from Q3 2007 release to Q2 2009 release. Now the "Export to excel" feature is not working after upgrading the control (earlier it was working fine). 

Here is the scenario i'm looking for:

1. i've a button called 'Export' in a panel which will be show/hide based on the grid's visibility
2. the show/hide option is handled by the "RadAjaxManagerProxy"
3. once select a row and click on the 'Export', it should export the selected data to excel.
4. while debugging, the code is getting triggered but the 'open file' pop-up is not appearing.

Here is the code snipper i've used to export:
            rgMemberResult.ExportSettings.ExportOnlyData = true
            rgMemberResult.ExportSettings.IgnorePaging = true
            rgMemberResult.ExportSettings.OpenInNewWindow = true
            rgMemberResult.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML; 
            this.rgMemberResult.MasterTableView.ExportToExcel(); 


Please let me know, if anything am i missing here.

Thanks
Princy
Top achievements
Rank 2
 answered on 12 Aug 2009
8 answers
116 views
Hello Sir,

         I'm using radgrid and filtering is done in the grid.
But the filtering is not working properly for the date field
and one more thing, if there is no date value  in a row
its also creating error.

Give me a solution for this.
     thanks in advance
     
unnikkannan m
Top achievements
Rank 1
 answered on 12 Aug 2009
2 answers
119 views
Hello,
I am using Radgrid to edit data. The Editmode is set to 'Inplace' and wants to allow multirow selection.  I have several questions:
1)  debuger never goes to ItemUpdated handler, it goes to ItemCreated and ItemCommand but never goes to Itemupdated, ItemCreated etc handlers.

2) In my Itemcommand event I have written following code:

 

Dim testId As Int16

 

testId = 

CInt(e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("id"))

 

 

Select Case e.CommandName.ToLower()

 

 

 

Case "edit"

 

 

 

RGChoiceItems.EditIndexes.Add(e.Item.ItemIndex)

 

 

 

 

Case "cancel" 

 

RGChoiceItems.EditIndexes.Clear()

 

 

Case "update" 

 

If UpdateTest(False, e) Then

 

 

 

msg.ShowOK("Updated")
End If

 

 

 

 

 

 

 

End Select 

 

 

LoadChoiceGroupTypeItems()

But it never clears the Edit mode even if the data gets updated. UpdateTest() methods works well. I want to do axactly as your first example grid but it is never gets rid of edit mode..I have to refresh the page again!

3) whereas, Cancel button moves the grid in normal mode again but problem with cancel is when I cancel 1 row it cancels all other rows in edit mode.
any idea what I am missing?

 

 

 

 

 

 

 

 

 

 

Shinu
Top achievements
Rank 2
 answered on 12 Aug 2009
1 answer
100 views
i have a screen with a radmenu. when i open a radwindow on top of this screen, the menu shows thru to the popup window. can you tell me how to keep this from happening?

Thanks,
Susan
Georgi Tunev
Telerik team
 answered on 12 Aug 2009
2 answers
64 views
Hi,

    I am trying the example of RadSlider for ASP.NET AJAX - First Look using VS2008 and IE7. 

    When I put the coding inside the Content, I get a javascript error "object required" as below:

    Anyone know how to solve this problem? Thanks in advance for the help.

   <
asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <asp:ScriptManager id="ScriptManager" runat="server" />
    
            <script type="text/javascript">
                function ZoomImage(sender, eventArgs)
                {
                    var sliderValue = sender.get_value();
                    var img = $get("img_preview");
                    var imageHeight = 212;
                    
                    

                //Error: object required
                img.style.height = sliderValue/150 * imageHeight + "px";

                }
            </script>
            <img src="Images/top.gif" alt="" style="display:block;"/><div style="background:white;float:left;width:412px;height:280px;overflow:auto;"><img id="img_preview" src="Images/pic.gif" alt=""/></div><div style="float:left;background-image:url(Images/SliderBckg.gif);height:280px;background-repeat:no-repeat;width:87px;padding-top:5px;padding-left:31px;">
            <telerik:RadSlider ID="zoomSlider" runat="server"                 
                Value="150"
                MaximumValue="250"
                MinimumValue="50"
                OnClientValueChange="ZoomImage"
                Orientation="Vertical"
                Length="206"
                ShowDecreaseHandle="false"
                ShowIncreaseHandle="false"
            />
            </div>

 

</

 

asp:Content>

 

 

 

 

Jessie
Top achievements
Rank 1
 answered on 12 Aug 2009
4 answers
331 views
Hi,
I have a grid with a column with checkboxes in it. I need to remove the checkboxes for some rows and replace them with text. In the DataBindRow event I have code like this :-

    TableCell Cell = Item["Select"];
    Cell.Controls.Clear();
    Label lb = new Label();
    lb.Text = Msg;
    Cell.Controls.Add(lb);

This works and the page looks fine. Until I do a postback on a button click. After the postback the grid now has check boxes on all rows - the rows that had them removed have them all back again. And the data bind was not even called on the postback.

Any ideas?

Clayton
skysailor
Top achievements
Rank 1
 answered on 11 Aug 2009
1 answer
93 views
I have a rad panel that could have four items with static children depending on the user. Basically I need to check the user's role, and then based on that, I decide what panels should be loaded. I have seen some demos on visual basic and the panel bar but everytime I click on the link the page pulls up a server error. Can someone point me to some directions on how to add items to a radpanel through visual basic? Thanks,
Web Services
Top achievements
Rank 2
 answered on 11 Aug 2009
2 answers
317 views
I have an asp:DropDownListlist control that when a specific value is selected, a panel containing a textbox is shown or hidden using JavaScript. This works OK.

When I replace the asp:DropDownList control with the rad combobox control, the panel is permanently hidden.

I thought it may have someting to do with the onchange event (line 13 below), so I played around, changing that to OnClientSelectedIndexChanged & onclientitemrequested (and other things), but to no avail.

If someone could give me a hand in getting this code to work with the combobox, I would be greatly appreciated.

Here is my server side code:
protected void FormViewSkillDetails_DataBound(object sender, EventArgs e)  
    {  
        //START: CODE REQUIREMENTS OF THE INSERT ITEM TEMPLATE OF THE FORM VIEW CONTROL.  
        if (FormViewSkillDetails.CurrentMode == FormViewMode.Insert)  
        {  
            FormViewSkillDetails.Focus(); //place the cursor on the 1st available field of the form view.  
        
            //START: HIDE / SHOW THE INSERT SKILL OWN HEADING DETERMINED BY THE VALUE IN THE DROP DOWN LIST.  
            RadComboBox ddl = (RadComboBox)FormViewSkillDetails.FindControl("RadComboBoxSkillTypeInsertDisplay");  
            Panel p = (Panel)FormViewSkillDetails.FindControl("PanelSkillOwnHeadingInsertItem");  
            RequiredFieldValidator rfv = (RequiredFieldValidator)FormViewSkillDetails.FindControl("RequiredFieldValidatorClientSideSkillOwnHeadingInsert");  
            CustomValidator cvss = (CustomValidator)FormViewSkillDetails.FindControl("CustomValidatorServerSideSkillOwnHeadingInsertItemBlank");  
            ddl.Attributes.Add("onchange""JavaScript:selectInputInsertChange('" + ddl.ClientID + "', '" + p.ClientID + "', '" + rfv.ClientID + "', '" + cvss.ClientID + "');");  
            
            //FINISH: HIDE / SHOW THE INSERT SKILL OWN HEADING DETERMINED BY THE VALUE IN THE DROP DOWN LIST.     
        }  
        //FINISH: CODE REQUIREMENTS OF THE INSERT ITEM TEMPLATE OF THE FORM VIEW CONTROL.  
    } 

Here is my javascript code:
    <script type="text/javascript">  
        function selectInputInsertChange(ddl_id, pan_id, rfv_id, cvss_id) {  
        var ddl = document.getElementById(ddl_id);  
        var pan = document.getElementById(pan_id);  
        var rfv = document.getElementById(rfv_id);  
        var cvss = document.getElementById(cvss_id);  
        if (ddl.value == "817") {  
            pan.style.display = 'inline';  
            ddl.focus();  
            rfv.enabled = true;  
            cvss.enabled = true;  
        }  
        else {  
            pan.style.display = 'none';  
            ddl.focus();  
            rfv.enabled = false;  
            cvss.enabled = false;  
        }  
    }  
    </script> 

Here is my aspx code:
(This code is inside a form view insert item template and I have left the asp:DropDownList control in the code for reference)
                            <telerik:RadComboBox ID="RadComboBoxSkillTypeInsertDisplay"   
                                                                     DataSourceID="ObjectDataSourceSkillDetailsSkillType"   
                                                                     DataTextField="SkillTypeDescriptionIntl"   
                                                                     DataValueField="SkillTypeID"   
                                                                     Dir="<%$ Resources:Resource, TextDirection %>"    
                                                                     Runat="server"   
                                                                     SelectedValue='<%# Bind("SkillTypeID")%>'   
                                                                     Skin="Black" /> 
                              
                            <asp:DropDownList ID="DropDownListSkillTypeInsertDisplay"   
                                                                CssClass="si"   
                                                                DataSourceID="ObjectDataSourceSkillDetailsSkillType"   
                                                                DataTextField="SkillTypeDescriptionIntl"   
                                                                DataValueField="SkillTypeID"    
                                                                onBlur="TBC(this,0)"   
                                                                onFocus="TBC(this,1)"   
                                                                Runat="Server"   
                                                                SkinID="DropDownListStandard" /> 
                                                                  
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorRadComboBoxSkillTypeInsertDisplay" ControlToValidate="RadComboBoxSkillTypeInsertDisplay" Display="None" EnableClientScript="true" ErrorMessage="<%$ Resources:SkillErrorMessageSkillType.Text %>" InitialValue="0" Runat="Server" SetFocusOnError="true" /> 
                            <asp:Image ID="ImageRequiredSkillTypeInsertItem" BorderWidth="0" ImageUrl="~/Images/icon_required.gif" Runat="Server" /> 
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorSkillTypeInsert" ControlToValidate="DropDownListSkillTypeInsertDisplay" Display="None" EnableClientScript="true" ErrorMessage="<%$ Resources:SkillErrorMessageSkillType.Text %>" InitialValue="0" Runat="Server" SetFocusOnError="true" /> 
                        </div> 
                    </div> 
                      
                    <asp:Panel ID="PanelSkillOwnHeadingInsertItem" CssClass="noFlickering" runat="server" > 
                        <div class="standardDisplay">  
                            <div class="prompt_right_insert_20">  
                                <asp:Label ID="LabelSkillOwnHeadingInsertItemPrompt" Runat="Server" Text="<%$ Resources:SkillPromptOwnSkillType.Text %>" Visible="false" /> 
                            </div> 
                            <div class="display_left_80">  
                                <asp:TextBox ID="TextBoxSkillOwnHeadingInsertDisplay" CssClass="si" MaxLength="150" onBlur="TBC(this,0)" onFocus="TBC(this,1)" Runat="Server" SkinID="TextBoxStandard" Text='<%# Bind("SkillOwnHeading")%>' Width="75%" /> 
                                <asp:Image ID="ImageRequiredSkillOwnHeadingInsert" BorderWidth="0" ImageUrl="~/Images/icon_required.gif" Runat="Server" /> 
                                <asp:RequiredFieldValidator ID="RequiredFieldValidatorClientSideSkillOwnHeadingInsert" ControlToValidate="TextBoxSkillOwnHeadingInsertDisplay" Display="None" Enabled="false" ErrorMessage="<%$ Resources:SkillErrorMessageSkillOwnHeading.Text %>" Runat="Server" SetFocusOnError="true" /> 
                                <asp:CustomValidator ID="CustomValidatorServerSideSkillOwnHeadingInsertItemBlank" ControlToValidate="TextBoxSkillOwnHeadingInsertDisplay" Display="None" Enabled="false" ErrorMessage="<%$ Resources:SkillErrorMessageSkillOwnHeading.Text %>" OnServerValidate="CustomValidatorItemBlank_ServerValidate" Runat="Server" SetFocusOnError="true" ValidateEmptyText="True" /> 
                            </div> 
                        </div> 
                    </asp:Panel> 
                      
                    <cc1:CollapsiblePanelExtender ID="CollapsiblePanelExtenderSkillOwnHeadingInsert" runat="server" Collapsed="true" CollapsedSize="0" SuppressPostBack="true" TargetControlID="PanelSkillOwnHeadingInsertItem" /> 
                     



Matt
Top achievements
Rank 1
 answered on 11 Aug 2009
1 answer
135 views
This is probably a case of wood for trees, but I can't work out why this grid won't enter edit mode:

        <telerik:RadGrid ID="CompetitionRounds" runat="server" Enabled="False" AutoGenerateColumns="False" 
            DataSourceID="dsCompetitionRounds" GridLines="None" Width="400px" AllowAutomaticUpdates="True"
            <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true"
                <Selecting AllowRowSelect="true" /> 
            </ClientSettings> 
            <MasterTableView DataSourceID="dsCompetitionRounds" NoMasterRecordsText="No competition rounds" 
                DataKeyNames="RoundNumber" CommandItemDisplay="None" EditMode="PopUp" AllowAutomaticInserts="False" 
                AllowAutomaticUpdates="true" AllowAutomaticDeletes="false"
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px"></HeaderStyle> 
                </ExpandCollapseColumn> 
                <SortExpressions> 
                    <telerik:GridSortExpression FieldName="RoundNumber" SortOrder="Ascending" /> 
                </SortExpressions> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="CourseId" DataType="System.Guid" Display="False" 
                        EmptyDataText="" HeaderText="CourseId" SortExpression="CourseId" UniqueName="CourseId" 
                        Visible="False"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="RoundNumber" DataType="System.Byte" EmptyDataText="" 
                        HeaderText="#" HeaderTooltip="Round Number" ItemStyle-HorizontalAlign="Center" 
                        SortExpression="RoundNumber" UniqueName="RoundNumber"
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" Width="10px" /> 
                        <ItemStyle HorizontalAlign="Center" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="RoundDate" DataFormatString="{0:dd/MM/yyyy HH:mm}" 
                        DataType="System.DateTime" EmptyDataText="" HeaderText="Date" HeaderTooltip="Round Date" 
                        SortExpression="RoundDate" UniqueName="RoundDate"
                        <HeaderStyle VerticalAlign="Top" Width="110px" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Name" EmptyDataText="" HeaderText="Course" ReadOnly="True" 
                        SortExpression="Name" UniqueName="Name"
                        <HeaderStyle VerticalAlign="Top" Width="150px" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="GentsStandardScratch" DataType="System.Byte" 
                        EmptyDataText="" HeaderText="GSI" HeaderTooltip="Gents Standard Scratch" ItemStyle-HorizontalAlign="Center" 
                        ReadOnly="True" SortExpression="GentsStandardScratch" UniqueName="GentsStandardScratch"
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" Width="10px" /> 
                        <ItemStyle HorizontalAlign="Center" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="LadiesStandardScratch" DataType="System.Byte" 
                        EmptyDataText="" HeaderText="LSI" HeaderTooltip="Ladies Standard Scratch" ItemStyle-HorizontalAlign="Center" 
                        ReadOnly="True" SortExpression="LadiesStandardScratch" UniqueName="LadiesStandardScratch"
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" Width="10px" /> 
                        <ItemStyle HorizontalAlign="Center" /> 
                    </telerik:GridBoundColumn> 
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" CancelImageUrl="/Images/Cancel.gif" 
                        EditImageUrl="/Images/Edit.gif" UpdateImageUrl="/Images/Update.gif"
                        <HeaderStyle Width="10px" /> 
                    </telerik:GridEditCommandColumn> 
                </Columns> 
                <EditFormSettings EditFormType="Template"
                    <FormTemplate> 
                        <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none" 
                            style="border-collapse: collapse; background: white;"
                            <tr> 
                                <td> 
                                    <table id="EditTable" cellspacing="1" cellpadding="1" width="250" border="0"
                                        <tr> 
                                            <td> 
                                                <img src="/Images/blank.gif" alt="" height="1px" width="70px" /> 
                                            </td> 
                                            <td> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                Round: 
                                            </td> 
                                            <td> 
                                                <telerik:RadNumericTextBox ID="numRoundNumber" DbValue='<%# Bind( "RoundNumber" ) %>' 
                                                    Enabled="true" ReadOnly="true" runat="server" NumberFormat-DecimalDigits="0" 
                                                    Width="40px" ShowSpinButtons="false" MinValue="1" MaxValue="72" /> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                Course: 
                                            </td> 
                                            <td> 
                                                <telerik:RadComboBox ID="lstCourseName" runat="server" DataSourceID="dsCourseNames" 
                                                    SelectedValue='<%# Bind("CourseId") %>' DataTextField="Name" DataValueField="Id" 
                                                    Width="130px"
                                                </telerik:RadComboBox> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                Date: 
                                            </td> 
                                            <td> 
                                                <telerik:RadDateTimePicker ID="dtmRoundDate" runat="server" DbSelectedDate='<%# Bind("RoundDate") %>' 
                                                    Skin="Default" Width="150px"
                                                    <TimePopupButton HoverImageUrl="" ImageUrl="" /> 
                                                    <TimeView ID="TimeView1" runat="server" StartTime="05:00" Interval="00:30" EndTime="21:00" 
                                                        CellSpacing="-1"
                                                    </TimeView> 
                                                    <Calendar ID="Calendar1" runat="server" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" 
                                                        ViewSelectorText="x"
                                                    </Calendar> 
                                                    <DatePopupButton HoverImageUrl="" ImageUrl="" /> 
                                                </telerik:RadDateTimePicker> 
                                            </td> 
                                        </tr> 
                                    </table> 
                                </td> 
                                <td> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="right" colspan="2"
                                    <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' 
                                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                    </asp:Button>&nbsp; 
                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" 
                                        CommandName="Cancel"></asp:Button> 
                                </td> 
                            </tr> 
                        </table> 
                    </FormTemplate> 
                </EditFormSettings> 
            </MasterTableView> 
        </telerik:RadGrid> 
 
 
    <asp:SqlDataSource ID="dsCompetitionRounds" runat="server" ConnectionString="<%$ ConnectionStrings:dbGolfHonoursConnectionString %>" 
        SelectCommand="leaderboard.lb_SelectCompetitionRound" SelectCommandType="StoredProcedure" 
        InsertCommand="leaderboard.lb_InsertCompetitionRound" InsertCommandType="StoredProcedure" 
        UpdateCommand="leaderboard.lb_UpdateCompetitionRound" UpdateCommandType="StoredProcedure" 
        DeleteCommand="leaderboard.lb_DeleteCompetitionRound" DeleteCommandType="StoredProcedure"
        <SelectParameters> 
            <asp:ControlParameter ControlID="Menu$lstCompetitionList" DbType="Guid" Name="CompetitionId" 
                PropertyName="SelectedValue" /> 
        </SelectParameters> 
        <InsertParameters> 
            <asp:ControlParameter ControlID="Menu$lstCompetitionList" DbType="Guid" Name="CompetitionId" 
                PropertyName="SelectedValue" /> 
            <asp:Parameter Name="CourseId" DbType="Guid" /> 
            <asp:Parameter Name="RoundNumber" Type="Int16" /> 
            <asp:Parameter Name="RoundDate" Type="DateTime" /> 
        </InsertParameters> 
        <UpdateParameters> 
            <asp:ControlParameter ControlID="Menu$lstCompetitionList" DbType="Guid" Name="CompetitionId" 
                PropertyName="SelectedValue" /> 
            <asp:Parameter Name="CourseId" DbType="Guid" /> 
            <asp:Parameter Name="RoundNumber" Type="Int16" /> 
            <asp:Parameter Name="RoundDate" Type="DateTime" /> 
        </UpdateParameters> 
        <DeleteParameters> 
            <asp:ControlParameter ControlID="Menu$lstCompetitionList" DbType="Guid" Name="CompetitionId" 
                PropertyName="SelectedValue" /> 
            <asp:Parameter Name="RoundNumber" Type="Int16" /> 
        </DeleteParameters> 
    </asp:SqlDataSource> 

Any ideas?
Drammy
Top achievements
Rank 1
 answered on 11 Aug 2009
2 answers
137 views
 protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)  
    {  
 
        if (e.CommandName == RadGrid.PerformInsertCommandName)  
        {  
        }  
        else if (e.CommandName == RadGrid.UpdateCommandName)  
        {  
        }  
        else if (e.CommandName == RadGrid.DeleteCommandName)  
        {  
        }  
        else if (e.CommandName == RadGrid.EditCommandName)  
             
        {  
           
                GridEditCommandColumn editColumn = (GridEditCommandColumn)RadGrid1.MasterTableView.GetColumn("EditCommandColumn");  
                GridEditableItem item = (GridEditableItem)e.Item;  
                RadGrid Roles = (RadGrid)FindControlRecursive(this, "RadGrid2");  
                DataTable dtTable2 = new DataTable();  
                string conn2 = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();  
                SqlDataAdapter sqladp2 = new SqlDataAdapter();  
                SqlConnection sqlconn2 = new SqlConnection(conn2);  
                sqlconn2.Open();  
                try  
                {  
                    string selectQuery2 = "SELECT [RoleID], [Rolename] FROM [vw_UsersinRoles] WHERE [UserID] = " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["UserID"].ToString() + " ORDER BY [Username]";  
                    sqladp2.SelectCommand = new SqlCommand(selectQuery2, sqlconn2);  
                    sqladp2.Fill(dtTable2);  
                    Roles.DataSource = dtTable2;  
                    Roles.DataBind();  
                      
                }  
                finally  
                {  
                    sqlconn2.Close();  
                }  
        }   
    }  
 
    public Control FindControlRecursive(Control root, string id)  
    {  
        if (root.ID == id)  
        {  
            return root;  
        }  
 
        foreach (Control c in root.Controls)  
        {  
            Control t = FindControlRecursive(c, id);  
            if (t != null)  
            {  
                return t;  
            }  
        }  
 
        return null;  
    } 
   <form id="form1" runat="server">  
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" 
        AllowSorting="True" GridLines="None" Width="623px" AutoGenerateColumns="false" 
        AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" 
        GroupingSettings-CaseSensitive="false" PageSize="20" EnableLinqExpressions="False" 
        ShowStatusBar="True" OnPageIndexChanged="RadGrid1_PageIndexChanged" OnItemCommand="RadGrid1_ItemCommand" 
        OnSelectedIndexChanged="RadGrid1_SelectedIndexChanged">  
        <MasterTableView ShowFooter="False" CommandItemSettings-AddNewRecordText="Add New Contact" 
            CommandItemDisplay="TopAndBottom" DataKeyNames="UserID">  
            <CommandItemSettings AddNewRecordText="Add New Form"></CommandItemSettings> 
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </ExpandCollapseColumn> 
            <Columns> 
                <telerik:GridEditCommandColumn HeaderStyle-Width="15px" EditText="View / Edit">  
                    <HeaderStyle Width="15px"></HeaderStyle> 
                </telerik:GridEditCommandColumn> 
                <telerik:GridTemplateColumn UniqueName="DeleteColumn" ItemStyle-Width="16px" AllowFiltering="false">  
                    <HeaderStyle Width="16px" /> 
                    <ItemTemplate> 
                        <asp:ImageButton ID="imgbtnDelete" Width="14px" ToolTip="Delete Contact" runat="server" 
                            CommandName="Delete" ImageUrl="~/images/recycle.jpg" OnClientClick="javascript:if(!confirm('This action will delete the selected contact. Are you sure?')){return false;}" /> 
                    </ItemTemplate> 
                    <ItemStyle Width="16px"></ItemStyle> 
                </telerik:GridTemplateColumn> 
                <telerik:GridBoundColumn DataField="Username" HeaderText="Username" SortExpression="Username" 
                    UniqueName="Username">  
                </telerik:GridBoundColumn> 
            </Columns> 
            <EditFormSettings CaptionFormatString="Edit details for User {0}" EditFormType="Template">  
                <EditColumn UniqueName="EditCommandColumn1">  
                </EditColumn> 
                <FormTemplate> 
                    <table> 
                        <tr> 
                            <td> 
                                <telerik:RadGrid ID="RadGrid2" runat="server" OnItemDataBound="RadGrid2_ItemDataBound" 
                                    AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AutoGenerateColumns="False" 
                                    GridLines="None">  
                                </telerik:RadGrid> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td> 
                                <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' 
                                    runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>  
                                </asp:Button>&nbsp;<asp:Button CausesValidation="false" ID="btnEdit" Text="EditContact" 
                                    runat="server" CommandName="EditContact"></asp:Button> 
                                <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" 
                                    CommandName="Cancel"></asp:Button> 
                            </td> 
                        </tr> 
                        <table> 
                </FormTemplate> 
            </EditFormSettings> 
            <NoRecordsTemplate> 
                No Records</NoRecordsTemplate> 
        </MasterTableView> 
        <GroupingSettings CaseSensitive="False"></GroupingSettings> 
    </telerik:RadGrid> 
    <asp:ScriptManager ID="ScriptManager1" runat="server">  
    </asp:ScriptManager> 
    </form> 
Jon-Jon Kershaw
Top achievements
Rank 2
 answered on 11 Aug 2009
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?