or
Can someone advise how to programmatically create a radwindow and it needed elements?
And then add it to the page.
Kyle
| GridGroupByExpression CountryCategoryExpression = GridGroupByExpression.Parse(" CName [ ],pName[ ProductValues/ServiceValues],sName[/] Group By CName"); |
| CountryRadGrid.MasterTableView.GroupByExpressions.Add(CountryCategoryExpression); |
| If e.CommandName = "CopyToInsertForm" Then |
| Dim item As GridDataItem = DirectCast(e.Item, GridDataItem) |
| 'Put the RadGrid in the insert mode |
| RadGrid1.MasterTableView.IsItemInserted = True |
| RadGrid1.Rebind() |
| 'Get the inserformItem using the GetInsertItem Method |
| Dim insertedItem As GridEditFormInsertItem = DirectCast(RadGrid1.MasterTableView.GetInsertItem(), GridEditFormInsertItem) |
| 'Finding the textbox in the insert form and setting it's value |
| TryCast(insertedItem("NCR").Controls(0), RadTextBox).Text = item("NCR").Text |
| TryCast(insertedItem("PartNumber").Controls(0), RadTextBox).Text = item("PartNumber").Text |
| TryCast(insertedItem("Title").Controls(0), RadTextBox).Text = item("Title").Text |
| TryCast(insertedItem("Disposition").Controls(0), RadTextBox).Text = item("Disposition").Text |
| TryCast(insertedItem("Status").Controls(0), RadTextBox).Text = item("Status").Text |
| TryCast(insertedItem("maj").Controls(0), CheckBox).Checked = item("maj").Text |
| TryCast(insertedItem("min").Controls(0), CheckBox).Checked = item("min").Text |
| TryCast(insertedItem("corractionreqyes").Controls(0), CheckBox).Checked = item("corractionreqyes").Text |
| TryCast(insertedItem("corractionreqno").Controls(0), CheckBox).Checked = item("corractionreqno").Text |
| End If |
| If e.CommandName = RadGrid.InitInsertCommandName Then |
| e.Canceled = True |
| 'Prepare an IDictionary with the predefined values |
| Dim newValues As System.Collections.Specialized.ListDictionary = New System.Collections.Specialized.ListDictionary() |
| 'set initial checked state for the checkbox on init insert |
| newValues("maj") = True |
| newValues("min") = False |
| newValues("corractionreqyes") = False |
| newValues("corractionreqno") = True |
| newValues("Liason") = User.Identity.Name + Space(5) + DateTime.Today |
| 'Insert the item and rebind |
| e.Item.OwnerTableView.InsertItem(newValues) |
| End If |
| itemsNY[i].set_selected(true); |
| radGrid.MasterTableView.DataKeyValues[radGrid.SelectedItems[0].ItemIndex] |
