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

BindingSource / Header layout

9 Answers 126 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 16 Jan 2008, 05:29 PM
Hi,

I have a GridView whose datasource is set to a bindingsource. When the application loads, the gridview should be empty because I have not set the datasource of the bindingsource yet. Instead, when I run the application I get an empty HeaderCellElement.

I've looked through your examples and noticed if I want to have the headers expand the entire length of the gridview I have to set the property, AutoSizeColumnMode to Fill. This works great but when I extend a header, the right most ones shrink. How I can make it so that when I extend a header, the others simply push right as opposed to shrinking?

Note: when I stretch a header all the way to the right and then shrink it, only the rightmost column header starts to stretch while the headers in between stay small.

Thank you for all of your help,
Michael

9 Answers, 1 is accepted

Sort by
0
Michael
Top achievements
Rank 1
answered on 16 Jan 2008, 06:13 PM
One more thing... I am handling the CurrentItemChanged event of my bindingsource but when I select a different row on the gridview, I get a RowNotInTableException thrown saying, "This row has been removed from a table and does not have any data.  BeginEdit() will allow creation of new data in this row."
0
Julian Benkov
Telerik team
answered on 17 Jan 2008, 12:40 PM
Hello Michael,

Thank you for writing.

Currently, RadGridView supports two column sizing modes. In the Fill mode all columns are adjusted in order to take the whole available space in the control. In this mode, if you resize a column, then the other columns adjust again. In you want to set column widths manually set the AutoSizeColumnsMode property to None. You can also use the BestFit function in order to choose the optimal width of a column.

We plan to implement more column sizing modes in future. Please, can you give us more details on how exactly you want the grid to behave. Do you expect the grid to show a scrollbar or prefer the control to enlarge its size?

Please send us a simple project with your scenario to reproduce problem locally. Thank you in advance.

Sincerely yours,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Michael
Top achievements
Rank 1
answered on 17 Jan 2008, 04:36 PM
Thank you for your quick response.

Could you please help me resolve the following issue?

I am handling the CurrentItemChanged event of my bindingsource but when I select a different row on the gridview, I get a RowNotInTableException thrown saying, "This row has been removed from a table and does not have any data.  BeginEdit() will allow creation of new data in this row."


Thank you,
Michael
0
Julian Benkov
Telerik team
answered on 18 Jan 2008, 09:37 AM
Hi Michael,

Could you please open a new support ticket and send us a simple project which reproduces the behavior you're describing. It will help us address any potential issue faster.

Please contact us again if you need any further assistance.

All the best,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Chema
Top achievements
Rank 1
answered on 29 Jan 2008, 05:50 PM
I have the same problem.
In BLL:
..
public class Bolsa{..
protected
Bolsas.BOL_BOLSASRow row_bolsa;
public string Denominacion
{
get{return row_bolsa.DENOMINACION;}
set{row_bolsa.DENOMINACION = value;}
}
....
}
my attributes are defined under datarow definition.

public static List<Bolsa> ObtenerBolsas(string grupo,string tipo,string expediente,string denominacion){
List<Bolsa> listabolsas=new List<Bolsa>();
Bolsas.BOL_BOLSASDataTable tabla = Data.Bolsas.ObtenerBolsas(tipo, expediente, denominacion);
foreach (Bolsas.BOL_BOLSASRow row in tabla)
{
Bolsa bol = new Bolsa(row);
listabolsas.Add(bol);
}
return listabolsas;
}

In UI Layer:
window load event:
bolsaBindingSource.DataSource = IVVSA.BolsasVivienda.Negocio.Bolsa.ObtenerBolsas("BOL",string.Empty, string.Empty, string.Empty);
MyRadGridView.datasource=bolsaBindinSource;

when i clikk to select a row then :
This row has been removed from a table and does not have any data.  BeginEdit() will allow creation of new data in this row."

thanks

0
Michael
Top achievements
Rank 1
answered on 29 Jan 2008, 06:57 PM
Hi Chema,

I wrote a support ticket to this problem to which they gave me the following response:

The problem is already resolved in our new RadGridView and will be available for the Q1 2008 Beta release.

They also said that Q1 2008 Beta would probably be released the 2nd week of Feb.

I hope this helps.

Michael
0
Accepted
Julian Benkov
Telerik team
answered on 30 Jan 2008, 08:43 AM
Hello Chema,

Confirmed; The problem is resolved in the new RadGridView, which will be available in the Q1 2008 Beta release, scheduled next week .

Michael, thank you for answer.

All the best,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Benny
Top achievements
Rank 1
answered on 14 Feb 2008, 09:36 AM
Hi Julian
Could tell me the exact date of the new release ? My problem is that I have tested the RadGridView and it works nice exact for this bug. The end users would like to test it so that they can decide to buy Telerik or not. Next week (22th february) the test fase should be finished.  Because this bug happens a lot I decided not to hand over the Telerik component yet before the bug is finished.  I hope that before the 22th  there is a new release. So that the Telerik components can also be tested by then.
Thanks
Benny
0
Julian Benkov
Telerik team
answered on 15 Feb 2008, 09:27 AM
Hi Benny,

The beta release for the new edition of RadGridView will be available on Wednesday at the latest next week. Sorry for the delay and thank you for the feedback.

Kind regards,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Michael
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Julian Benkov
Telerik team
Chema
Top achievements
Rank 1
Benny
Top achievements
Rank 1
Share this question
or