everytime when i have 2 columns with the same name in my answer set that i bind to the grid, it automatically add a incrementing number to the end of it.
like
column1 column1 column1
it will give me this
column1 column11 column12
1) why does it do that and how do i stop it from doing that?
2) How do i format the cell so that it turn the forecolor to red when it is negative?
please help. thanks.
like
column1 column1 column1
it will give me this
column1 column11 column12
1) why does it do that and how do i stop it from doing that?
2) How do i format the cell so that it turn the forecolor to red when it is negative?
please help. thanks.
8 Answers, 1 is accepted
0
appdev
Top achievements
Rank 1
answered on 01 Oct 2009, 03:58 AM
please let me know if there's answer for those two questions. thank you.
0
appdev
Top achievements
Rank 1
answered on 01 Oct 2009, 01:30 PM
any idea guys?
0
appdev
Top achievements
Rank 1
answered on 02 Oct 2009, 12:54 PM
please help.
0
Hi Duy,
Could you please specify if your RadGrid columns are auto-generated?
Regards,
Iana
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Could you please specify if your RadGrid columns are auto-generated?
Regards,
Iana
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
appdev
Top achievements
Rank 1
answered on 02 Oct 2009, 03:35 PM
yes it is auto genearated
0
appdev
Top achievements
Rank 1
answered on 05 Oct 2009, 10:48 AM
yes this is how i generated the data for the grid
dim dt as new datatable
dt.load(rs)
radgrid1.datasource =dt
radgrid1.databind
and autogeneratecolumn = true.and everytime the column name is the same it automaticallly put an increamenting number next to it. like if 2 columns name is Test then it will be Test1 Test2. How do i keep it as just Test
dim dt as new datatable
dt.load(rs)
radgrid1.datasource =dt
radgrid1.databind
and autogeneratecolumn = true.and everytime the column name is the same it automaticallly put an increamenting number next to it. like if 2 columns name is Test then it will be Test1 Test2. How do i keep it as just Test
0
appdev
Top achievements
Rank 1
answered on 05 Oct 2009, 02:45 PM
nothing?
0
Hi Duy,
I performed further investigation on your case. And I found that it is not possible to have more than one column with the same name in a DataTable. And when you perform a query into database like:
"Select ID, Test, Test, Test from Table1", the result is a table with columns:
ID, Exp1001, Exp1002, Test.
Therefore I assume that the columns are accepting different names at data level and that is why they are displayed so in the grid.
Additionally, I am attaching a sample project for you. You can check it out and let me know what differs in your case.
Regards,
Iana
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I performed further investigation on your case. And I found that it is not possible to have more than one column with the same name in a DataTable. And when you perform a query into database like:
"Select ID, Test, Test, Test from Table1", the result is a table with columns:
ID, Exp1001, Exp1002, Test.
Therefore I assume that the columns are accepting different names at data level and that is why they are displayed so in the grid.
Additionally, I am attaching a sample project for you. You can check it out and let me know what differs in your case.
Regards,
Iana
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.