We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Grouping Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

47739 Aug 10,2006 09:00 PM Aug 16,2006 06:12 PM ASP.NET Web Forms (Classic) 8
loading
Tags: GridGroupingControl
Greg Mills
Asked On August 10, 2006 09:00 PM

I am trying to update the value in a text box when a row is selected in a Grid. The new value does not show in the text box. Here is my code:

protected void grdLocations_SelectedRecordsChanged(object sender, SelectedRecordsChangedEventArgs e)
{
// Cancel the previous record edit mode

if (this.grdLocations.Table.CurrentRecord == null)
return;


// Get the currently selected record in the master grid

int id = (int)this.grdLocations.Table.CurrentRecord.GetValue("LocationID");
int order = (int)this.grdLocations.Table.CurrentRecord.GetValue("DisplayOrder");

TextBox1.Text = order.ToString();


}

Ramu [Syncfusion]
Replied On August 11, 2006 02:26 PM

Hi Greg,

If you are working in .Net 2.0 then this might be becasue the grid''s Callback mode is set to true. could you please check if this is the case.

Else the issue you might be encountering should be because you might not have set the “PostBackOnFocusedChanged” property to true for th grid.

Please refer to the following thread

forum
more information.

Please let me know if you have any queries.

Thanks,
Ramu.K

Greg Mills
Replied On August 11, 2006 03:26 PM


PostBackOnFocusedChanged = True;

When I set EnableCallbacks=False;
the Grids event "SelectedRecordsChanged" fires, but the the selected row does not change.

>Hi Greg,

If you are working in .Net 2.0 then this might be becasue the grid''s Callback mode is set to true. could you please check if this is the case.

Else the issue you might be encountering should be because you might not have set the “PostBackOnFocusedChanged” property to true for th grid.

Please refer to the following thread

forum
more information.

Please let me know if you have any queries.

Thanks,
Ramu.K

Administrator [Syncfusion]
Replied On August 11, 2006 06:37 PM

Hi Greg,

The issue you encountered might be due to missing the primary key column for Grid Grouping control.

Setting the primary key column could solve the issue. You can set the primarykey column for grid as follows.

[C#]

GridTableDescriptor mainTD = this.GridGroupingControl1.TableDescriptor;
mainTD.PrimaryKeyColumns.Add("OrderID");

Please refer to “Using GridGroupingControl” topic under (Essential grid-> ASP.NET-> Introducing Essential Grouping Grid for ASP.NET) for documentation to bind the grid.

Please let us know if you still find the issue.

Thanks,
Ramu.K


Administrator [Syncfusion]
Replied On August 11, 2006 07:48 PM

I found the problem. This does not work when you are using Master Pages. I opened a direct-trac incident.

>Hi Greg,

The issue you encountered might be due to missing the primary key column for Grid Grouping control.

Setting the primary key column could solve the issue. You can set the primarykey column for grid as follows.

[C#]

GridTableDescriptor mainTD = this.GridGroupingControl1.TableDescriptor;
mainTD.PrimaryKeyColumns.Add("OrderID");

Please refer to “Using GridGroupingControl” topic under (Essential grid-> ASP.NET-> Introducing Essential Grouping Grid for ASP.NET) for documentation to bind the grid.

Please let us know if you still find the issue.

Thanks,
Ramu.K


Greg Mills
Replied On August 11, 2006 07:51 PM

Here is the incident #27520.

Here is a attachment the shows the problem.

default page works.

default2 page does not work.

WebSite40.zip

Administrator [Syncfusion]
Replied On August 16, 2006 01:59 AM

Hi Greg,

We had some difficulties in updating the forums and DT for past 2 days and My sincere apology for the delay in responding to you.

In general When using our callbackpanel/CallbackMultiplexer control within a UserControl or a MasterPage then
the client object instance name will be scoped by the UserControl/Masterpage''s instance''s id. So you need to change the scripts according to the client instance''s

Here in your sample you have to change the ''BeforeCallbackScript'' property as follows.

this.InboxGrid.BeforeCallbackScript = "if(arg.indexOf(''MOVETO:RR:'')!=-1){this.continueCallback = false;__sfctl00_ContentPlaceHolder1_CallbackMultiplexer1.doCallback(''ctl00$ContentPlaceHolder1$InboxGrid'', arg);}";

Changes are as follows

a) __sfctl00_ContentPlaceHolder1_CallbackMultiplexer1.doCallback// this line is used for triggering the callback. this is becaue of the callbackmultiplexer is inside the ContentplaceHolder

b)Similarly the client object id of the ''InboxGrid'' will be ''ctl00$ContentPlaceHolder1$InboxGrid'' in this sample. Only if this is mentioned in the arguments correctly the callback knows it is triggered for the appropriate control(i.e eventhough there will be a callback to the server the events of the grid will not trigger if the arguments for the docallback method is wrong)

I have also attached the modified cs file of Default2.aspx.cs. please have a look at it.

Modified Sample

please let us know if you face any more difficulties.

Again I apologize for the delay.

Best Regards,
A.Sivakumar

Sivakumar [Syncfusion]
Replied On August 16, 2006 02:03 AM

Hi Greg,

Sorry for the broken link in the above update, please download the modified sample from
here


Best Regards,
A.Sivakumar




Administrator [Syncfusion]
Replied On August 16, 2006 06:12 PM

This is working great.

>Hi Greg,

Sorry for the broken link in the above update, please download the modified sample from
here


Best Regards,
A.Sivakumar




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;