Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
17816 | Aug 17,2004 07:24 PM UTC | Aug 21,2004 11:55 AM UTC | WinForms | 5 |
![]() |
Tags: GridControl |
int field = this.gridDataBoundGrid1.Binder.ColIndexToField(e.Style.CellIdentity.ColIndex);
GridBoundColumn gbc = this.gridDataBoundGrid1.Binder.InternalColumns[field];
PropertyDescriptor pd = gbc.PropertyDescriptor;
If you have explicitly added GridBoundColumns, then you would use the grid.GridBoundColumns collection in the above code instead of the InternalColumns collection.
If you mean something else, could you explain a little more about it.
>int field = this.gridDataBoundGrid1.Binder.ColIndexToField(e.Style.CellIdentity.ColIndex);
>GridBoundColumn gbc = this.gridDataBoundGrid1.Binder.InternalColumns[field];
>PropertyDescriptor pd = gbc.PropertyDescriptor;
>
>
>If you have explicitly added GridBoundColumns, then you would use the grid.GridBoundColumns collection in the above code instead of the InternalColumns collection.
>
>If you mean something else, could you explain a little more about it.
> private void TableModel_QueryCellFormattedText(object sender, GridCellTextEventArgs e) { Element el = this.groupingGrid1.Table.DisplayElements[e.Style.CellIdentity.RowIndex]; RecordRow rec = el as RecordRow ; if(rec != null) { Record r = rec.ParentRecord; DataRowView drv = r.GetData() as DataRowView; if(drv != null) { Console.WriteLine("************ " + drv[0].ToString() + " " + drv[1].ToString()); } } }
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.
This page will automatically be redirected to the sign-in page in 10 seconds.