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

Radgrid not binding data it doesnt display any rows.

1 Answer 216 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bhanu Prakash
Top achievements
Rank 1
Bhanu Prakash asked on 02 Sep 2011, 04:15 AM
Hi,

   Iam using treeview when we click the node in the treeview based on the node value it will display the data in the radgrid. In the below code we are using list to bind the data.In the list we are getting the data but when we bind it is not displaying any data.Can you please do the needful.

 List<LegacyResource> result = null;

protected void rdCategory_NodeClick(object sender, RadTreeNodeEventArgs e)
    {
        try
        {

            if (e.Node != null)
            {
                

                if (int.TryParse(e.Node.Value, out ResourceID))
                {
                    result = LegacyResourceAgent.GetResourceLinks(LinkResourceData, ResourceID);
                    //result.
                    if (result != null)                   
                   this.ManageTootipsGrid.Rebind();
                }
                else
                {
                    this.ManageTootipsGrid.DataSource = result;
                    this.ManageTootipsGrid.DataBind();
                }

            }
        }
        catch (Exception ex)
        {

        }

    }


 protected void manageTooltips_onNeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        //refresh data for grid (needed when user performs update, sort, etc...
        this.ManageTootipsGrid.DataSource = result;

    }

1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 02 Sep 2011, 05:51 AM
Hello,

You are able to get the records from list but you are not seen any records in your grid then may be your it was grid's refresh problem.
Please try below code to solve this.
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="TreeViewID">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="GridID" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

let me know if any concern.

Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Bhanu Prakash
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or