This question is locked. New answers and comments are not allowed.
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.
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.
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.