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. Image for the cookie policy date

some issues or constraints of grid

I encountered some issues about SF grid (asp.net), many some SMART can help me.

1. Why all of grid columns header apply only one cssclass? I set the property TableDescriptor.Columns[n].Appeance.ColumnHeaderCell.CssClass (n= 1 to 10) to different css class name and eventually get a result of the same style on every headercolumns, What's the logic?


2. Continue issue 1. I can really set and apply different styles(CssCalss) of cells of headers or record fields when event RowDataBound, but they pass asway after any postback!! (Postback without rebinding data.)

3. How could I get the webcontrol in every cells after a postback by simple asp.net event of button_click? That means, how can I findcontrol or directly get rows SET to fetch every webcontrol embedded into different cells except RowDataBound?
(ps. Event RowDataBound's triggered only first time of page_load, so i cannot fetch it on this event when any postback.)

4. I can embedded many webcontrols into recordfield by event QueryCellStyleInfo, but they're all the same outfit... So, I set different value to their properties when event RowDataBound.
Have any better ideas implement this by code behind mode?

5. Why the sorting keeps in ascending direction if the grid gouping control does not put in aspx design mode beforehand but added by this way Controls.Add() with binddata on every page_load?


3 Replies

BM Bharath M Syncfusion Team May 13, 2010 11:25 AM UTC

Hi Jeren,

Thank you for your interest in Syncfusion products.

We are unable to reproduce the reported issue’s number 1 and 2 in our latest version. Could you please update us the Essential studio version that you are using.

Issue 3: we suggest you to use “TopLevelTable” property of GridGroupingControl, this will have all the controls that are embedded to grid. You can iterate through rows and columns of table to get your work done.

Issue 4: We suggest you to use QueryCellStyleInfo event, which is the best way to achieve you requirement.

Issue 5: We are unable to reproduce the reported issue. Could you please share your sample code to reproduce this issue.

Let me know if you have any concerns.

Regards,
Bharath


JN jeren norman May 14, 2010 01:09 AM UTC

Thanks for your TIPs~

So,

Issue 1, 2 should not exists on latest version, but mine is 7.203. Maybe, it's time to upgrde. I'll try it.

Issue 3, That's great to be resolved.

Issue 4, It's convenient to implement this event QueryCellStyleInfo to add controls into template when page_load , but, after postback, all of controls are no more.
The reason is that QueryCellStyleInfo would be raised by data binding, and there's no any action of rebinding data when POSTBACK in my code like this:

if(!IsPostBack)
DoDataBindtoGrid();

//I hope not to bind data every POSTBACK.

Issue 5,
I have make a new instance of gridgroupingcontol every page_load include all of POSTBACKs. This's a dynamic way to add grid to my webform, instead of adding the tag to vs.net design mode.

In this situation, the sorting would be ascending always.



BM Bharath M Syncfusion Team May 20, 2010 06:39 PM UTC

Hi Jeren,

We regret for delayed response.

Issue 4: I am afraid that i am unable to reproduce the reported issue. QueryCellStyleInfo event will fire on all postback regardless DataBound. Could you please share your sample code with us to reproduce this issue.

Issue 5: We suggest you to add the sorted columns to grid as follows to resolve your issue.

For ascending order:
GridGroupingControl1.TableDescriptor.SortedColumns.Add("Name");

For decending order:
GridGroupingControl1.TableDescriptor.SortedColumns.Add("Name",ListSortDirection.Descending);

Let me know if you have any concerns.

Regards,
Bharath

Loader.
Live Chat Icon For mobile
Up arrow icon