This is a migrated thread and some comments may be shown as answers.

Client-Side Insert causes GridButtonColumn blank

7 Answers 158 Views
Grid
This is a migrated thread and some comments may be shown as answers.
wshen
Top achievements
Rank 1
wshen asked on 19 Dec 2008, 04:33 PM
Hello,

I an new to RadGrid and run in to a issue when using Client-Side Insert - In my grid, I have one buttoncolumn and two boundcolumn. What I want to do is to add a new row into my grid by clicking a button out of the grid, pretty simple, right? However, when using Client-Side insert by calling a javascript function, the new row is added and two boundcolumns are populated properly, but leaves buttoncolumn blank. Here is the ASPX code:
 

 

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type ="text/javascript" >
        var custodian =
        {
            CustodianID:null,
            EmailAddressID: null,
            EmailAddress: null,

            create: function() {
                var obj = new Object;
                obj.CustodianID = 0;
                obj.EmailAddressId = "";
                obj.EmailAddress = "";
            }
        };

        function updateChanges() {
            PageMethods.AddCustodian("asd", updateGrid);
            //MyWebService.UpdateEmployeeByEmployee(getValues(), updateGrid);
        }
        function updateGrid(result) {
            var tableView = $find("<%= rgCustodians.ClientID %>").get_masterTableView();
            tableView.set_dataSource(result);
            tableView.dataBind();

            //var grid = $find("<%= rgCustodians.ClientID %>");
            //grid.repaint();
        }
    </script>
</telerik:RadCodeBlock>
<span><telerik:RadTextBox ID="tbCustomdian" runat="server" Width ="200px">
</telerik:RadTextBox></span>
<span style ="margin-left:5px; vertical-align:middle" >
<asp:Button ID="btnAddCustodian" runat="server"
    Text="<%$Resources:Labels, add %>" Width ="100px"
    OnClientClick="updateChanges(); return false;"  /></span>
<telerik:RadGrid ID="rgCustodians" runat="server" AutoGenerateColumns="False"
    AutoGenerateDeleteColumn="False" GridLines="None"
    ondeletecommand="rgCustodians_DeleteCommand"
    onneeddatasource="rgCustodians_NeedDataSource" Width="100%">
   
<MasterTableView  Width="100%" TableLayout="Fixed" >
    <Columns>
        <telerik:GridBoundColumn  HeaderText="EmailAddressId" Visible ="False" DataField="EmailAddressId" UniqueName="EmailAddressId" ></telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="Cutodians" UniqueName="EmailAddress" DataField="EmailAddress"></telerik:GridBoundColumn>
        <telerik:GridButtonColumn  Display ="true" Visible ="true" Text="deleee" />
    </Columns>
    <NoRecordsTemplate>
     <div> <asp:Literal ID="Literal1" runat="server" Text="<%$Resources:Labels, norecords%>" /> </div>
   </NoRecordsTemplate>
</MasterTableView>
</telerik:RadGrid>


Did I do something wrong?
Thanks in advance
Wei

 

 

 

 

 

7 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 22 Dec 2008, 11:57 AM
Hi wshen,

Could you please try enabling the grid paging and see if the issue persists?

Let me know if this works for you.

Sincerely yours,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
BlueBye
Top achievements
Rank 1
answered on 09 Jan 2009, 05:23 PM
Did you find a resolution to this problem? 

I am having a similar issue and am wondering how you got around it...
0
Max Ng
Top achievements
Rank 1
answered on 12 Mar 2010, 04:21 AM
Any one have a solutions to this?
0
Iana Tsolova
Telerik team
answered on 15 Mar 2010, 09:26 AM
Hi Max,

Could you please confirm that you are suing the latest version of RadControls for ASP.NET AJAX?
Check it out and if the problem persists, send us the problematic page for further investigation.

Sincerely yours,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
thdwlgP
Top achievements
Rank 1
answered on 12 Apr 2010, 07:21 PM
Telerik team,
I'm using version 2009.1.402.35

I also tried what wshen was trying but it runs the server code but the page displays a blank row after the result is bound.
my radgrid does has AutoGenerateColumns = false is that why?

Thanks.
0
Max Ng
Top achievements
Rank 1
answered on 14 Apr 2010, 01:48 AM
At the moment I'm running on Q3 2009. Is there a latest version? I'll try and see if that solved the problem.
0
Iana Tsolova
Telerik team
answered on 14 Apr 2010, 03:41 PM
Hi,

The lastest official version of RadControls for ASP.NET AJAX is Q1 2010 labeled 2010.1.309. You can find the version release notes here.

Try it out and let me know how it goes.

Regards,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
wshen
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
BlueBye
Top achievements
Rank 1
Max Ng
Top achievements
Rank 1
thdwlgP
Top achievements
Rank 1
Share this question
or