GridGroupingControl

Hi,

First,Thanks for response to the previous queries.

Now i have three Issues.

1)
I am using "QueryCellStyleInfo" event to set the style of a particular cell.
Now the thing is, I want to set the style of all cells in that row.
How can i do that in this function("QueryCellStyleInfo")or what is the other option to achieve this.?

2)
I am using Paging in GridGroupingControl. I want to registerd and event for page change so that i can assign the Datasource property of Grid.How can i do that?

3)
Why GridGroupingControl does not maintain view state.(i-e) if page posts back due to some event on page the Grid becomes empty even i have set the property "EnableViewState= true" for GridGroupingControl.
What i need to do to make grid maintain its state

Thanks
Naveed Afzaal



1 Reply

GB Gokul B Syncfusion Team May 7, 2007 09:00 PM UTC

Hi Naveed,

Here is my answers for your query.

1) You can apply the cell styles based on Row index in QueryCellStyleInfo event as follows.

if (e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell || e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell)
{
if (e.Style.TableCellIdentity.RowIndex == 5)
{
e.Style.TextColor = Color.Red;
}
}

Alternately you can also apply the Styles for the Row based on some condition. Please have a look at our "ConditionalFormatting" sample which ships with our Essential Studio install. You can find this sample under {Installed Location}\4.4.x.x\Web\grid.grouping.web\Samples\2.0\Formatting\ConditionalFormatting\cs"

2) "BarButtonItemClicked" event will be triggered when the ButtonBarItem is pressed. you can handle the event for MoveNext page button as shown below.

In the BarButtonItemClicked event

if (e.ButtonBarItem.ButtonBarItemType = ButtonBarItemType.MoveNext)
{
//Your code
}


3) Please have a look at the below thread where similar viewstate issue is discussed.

http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=51399

Let us know if you need any other assistance.

Thanks for using Syncfusion products.

Regards,
Gokulkumar B

Loader.
Up arrow icon