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

[Solved] [vb.net Grid] Hirarchy - value is not visible

2 Answers 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jigar
Top achievements
Rank 1
Jigar asked on 16 Aug 2010, 09:58 AM
Dear List,

I am using vb10; want to implement DetailView functionality in Grid.

I have two tables, Country and State. State table has country id.

Dim stateGrid = Html.Telerik().Grid(Of SCWMCTS.StateModel)().Name(Resources.ScwmCtsRes.State_GridTitle() & "_<#= <b>countryid</b> #>")<br>        stateGrid.DataKeys(Function(key) key.Add(Function(c) c.id))        <br>        stateGrid.ToolBar(Function(cmd) cmd.Insert())       <br>        stateGrid.DataBinding(Function(dataBind) dataBind.Ajax().Select("_Index", "State", New With {.id = "<#= <b>countryid </b>#>"}).Enabled(True) _<br>                                                                .Insert("_Create", "State").Enabled(True) _<br>                                                                .Update("_Edit", "State").Enabled(True) _<br>                                                                .Delete("_Delete", "State").Enabled(True) _<br>                                                                )        <br>        stateGrid.Columns(Sub(columns)<br>                              columns.Bound(Function(c) c.id).Title(Resources.ScwmCtsRes.Column_Id())<br>                              columns.Bound(Function(c) c.name).Title(Resources.ScwmCtsRes.Column_Name())                             <br>                              columns.Command(Sub(cmd)<br>                                                  cmd.Edit()<br>                                              End Sub).Title("Command")<br>                          End Sub)        <br>        stateGrid.Editable(Function(e) e.Mode(GridEditMode.PopUp).Enabled(True))<br>        stateGrid.Pageable(Function(p) p.PageSize(CInt(Resources.ScwmCtsRes.Paging())))<br>        <br>'-------------------------------------------------------------------------------------------------------------------------------------------------------<br> Dim transGrid = Html.Telerik().Grid(Of SCWMCTS.CountryModel)().Name(Resources.ScwmCtsRes.Country_GridTitle())       <br>        transGrid.DataKeys(Function(key) key.Add(Function(c) c.id))        <br>        transGrid.ToolBar(Function(cmd) cmd.Insert())<br>        transGrid.DataBinding(Function(dataBind) dataBind.Ajax().Select("_Index", "Country").Enabled(True) _<br>                                                                .Insert("_Create", "Country").Enabled(True) _<br>                                                                .Update("_Edit", "Country").Enabled(True) _<br>                                                                .Delete("_Delete", "Country").Enabled(True) _<br>                                                                )        <br>        transGrid.Columns(Sub(columns)<br>                              columns.Bound(Function(c) c.countryid).Title(Resources.ScwmCtsRes.Column_Id())<br>                              columns.Bound(Function(c) c.name).Title(Resources.ScwmCtsRes.Column_Name())<br>                              columns.Command(Sub(cmd)<br>                                                  cmd.Edit()<br>                                              End Sub).Title("Command")<br>                          End Sub)<br>        transGrid.DetailView(Function(detailView) detailView.ClientTemplate(stateGrid.ToHtmlString()))<br>        transGrid.Editable(Function(e) e.Mode(GridEditMode.PopUp).Enabled(True))<br>        transGrid.Pageable(Function(p) p.PageSize(CInt(Resources.ScwmCtsRes.Paging())))<br>        transGrid.Sortable().Filterable().Groupable().Footer(True)<br>        transGrid.Render()


I don't see any data in state grid. If i render state grid and country grid seperately it works fine. but when i use the detail view, i don't see the data. It seems countryid value is not being reflected in state grid. Is there any alternative way to do so?

Thanks.

2 Answers, 1 is accepted

Sort by
0
Jigar
Top achievements
Rank 1
answered on 16 Aug 2010, 04:33 PM
Hi There,

After digging into this issue, I found that there is some problem with some of the jquery script. Please find the attached image for the same.

Please suggest how to solve this issue?
0
Jigar
Top achievements
Rank 1
answered on 17 Aug 2010, 06:48 AM
Dear List,

After looking into this issue; I removed datakey and ajax edit, delete, create bind from the grid and now it works fine. Don't know what's going wrong.

Is it a bug? If anyone want I can provide sample code for the same.

Thanks.
Tags
Grid
Asked by
Jigar
Top achievements
Rank 1
Answers by
Jigar
Top achievements
Rank 1
Share this question
or