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

Child Grid Column widths

2 Answers 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
DP
Top achievements
Rank 1
DP asked on 07 Aug 2008, 12:07 AM
I can't find original post. This is what you wrote:

Hello DP,

Thank you for writing.

I do not know exactly what is your scenario, but the reason for the described behavior is that the child template columns are generated again in run-time. In this way they lose their settings made in design-time. I suppose that maybe you use AutoGenerate hierarchy from datasource or you change binding in run-time. I have tested a hierarchy scenario when I have done all the settings by the PropertyBuilder.

I have created manually child templates and relation and everything works as expected. ChildTemplate column settings have been preserved.

To provide you with further assistance I need more information about your scenario. It will be very helpful if you send me an example application that demonstrates the issue. On order to allow you attachments I have moved your topic in our support system.

I am looking forward for your reply.

All the best,
Martin Vasilev
the Telerik team

You are right, I do use AutoGenerateHierarchyFromDataSet = True.

I have to set this at run time. Can you give sample code for setting widths of columns and hiding columns of the Child Grid at run time.

Thanks ... DP

2 Answers, 1 is accepted

Sort by
0
DP
Top achievements
Rank 1
answered on 08 Aug 2008, 02:56 AM
I upgraded to Q2 2008 release. Went thru uninstall, new install, updated thru project update utility.

The result - I see the records from master grid and a big "+" sign instaed of small one. Click on the row would not select the row and clicking on "+" wont show the child records.

I can see that dataset is properly poulated, child records are there. It was working with minor difficulty of formatting before the upgrade.

Now, what am I missing?

Regards ... DP
0
Martin Vasilev
Telerik team
answered on 08 Aug 2008, 02:35 PM
Hello DP,

Thank you for contacting me.

In Q2 2008 release there is a new theme mechanism. You have to drag and drop used theme from toolbox in every form. Please, find more information about this in following KB Article. About missing child rows, please check if in your designer.cs file there is serialized an old items for ChildGridViewTemplates. If you use auto generate hierarchy you could remove any code related to the child template. But be careful, because you could destroy design time preview if you remove something wrong.

You could set child column visibility and width by using code below as example:
this.radGridView1.MasterGridViewTemplate.ChildGridViewTemplates[0].Columns["ProductCategoryID"].IsVisible = false
this.radGridView1.MasterGridViewTemplate.ChildGridViewTemplates[0].Columns["ProductSubCategoryID"].Width = 300; 
 
If you continue to experience described problems, please send me your application. Only in that case I can locate the issues and provide you with further assistance.

Greetings,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
DP
Top achievements
Rank 1
Answers by
DP
Top achievements
Rank 1
Martin Vasilev
Telerik team
Share this question
or