or
| <MasterTableView EditMode="InPlace" EnableViewState="False"> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn DataField="PurchaseRecommendationLineID" UniqueName="PurchaseRecommendationLineID" Visible="false"/> |
| <telerik:GridTemplateColumn UniqueName="Product" DataField="Product" HeaderText="Tuote" > |
| <EditItemTemplate> |
| <asp:TextBox ID="Text" runat="server" Text='<%#Bind("Product") %> '/> |
| </EditItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn DataField="Unit" UniqueName="Unit" HeaderText="Yksikkö"/> |
| <telerik:GridNumericColumn DataField="Quantity" UniqueName="Quantity" HeaderText="Määrä" HeaderStyle-Width="50px" NumericType="Number"/> |
| <telerik:GridBoundColumn DataField="Info" UniqueName="Info" HeaderText="Info"/> |
| </Columns> |
| protected void ProposalGrid_PreRender(object sender, EventArgs e) |
| { |
| if (!IsPostBack || forceEditable) |
| { |
| forceEditable = false; |
| foreach (GridItem item in ProposalGrid.MasterTableView.Items) |
| { |
| if (item is GridEditableItem) |
| { |
| GridEditableItem editableItem = item as GridDataItem; |
| editableItem.Edit = true; |
| } |
| } |
| } |
| ProposalGrid.Rebind(); |
| } |
| private void CollectRowInformation(int headerid) |
| { |
| foreach (GridDataItem item in ProposalGrid.MasterTableView.Items) |
| { |
| RowObject ro = new RowObject(); |
| ro.Rowdata.Add("Unit", item["Unit"].Text); |
| ro.Rowdata.Add("Info", item["Info"].Text); |
| ro.Rowdata.Add("Quantity", item["Quantity"].Text); |
| ProsalService.Persist(ro); |
| } |
| } |
<
add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
<
browsers>
<
browser refID="Default">
<
controlAdapters>
<
adapter controlType="System.Web.UI.Page" adapterType="Telerik.Web.UI.RadSessionPageStateCompression" />
</
controlAdapters>
</
browser>
</
browsers>
|
Requirements |
|
| RadControls version | RadControls for ASP.NET AJAX 2010.1 519 |
| .NET version | 2.x |
| Visual Studio version | 2005/8 |
| programming language | VB.NET |
| browser support |
all browsers supported by RadControls |
| <asp:DropDownList ID="ddlVersion" runat="server" Width="250px"> |
| </asp:DropDownList> |
| <asp:LinkButton ID="lbViewVersion" Text="View selected Version" runat="server"> |
| </asp:LinkButton> |
| <br /> |
| <asp:LinkButton ID="lbViewCurrentVer" Text="View current Version" runat="server"> |
| </asp:LinkButton> |
| Protected Sub GetInventoryData(ByVal displayType As String) |
| ' set your data access here |
| ' ... |
| Dim inventoryData As DataSet |
| Try |
| ' If different version is selected get the version from the drop down and pass it into a stored procedure |
| If displayType = "diffVersion" Then |
| Dim inParams As New NameValueCollection |
| Dim version As Int16 |
| version = ddlVersion.SelectedValue |
| With inParams |
| .Add("@versionNum", version) |
| End With |
| inventoryData = <your data call to the stored procedure, passing in the version as input param> |
| Else |
| ' I go to a different table and procedure if it's current version so I need an else without input params |
| inventoryData = <your data call to the stored procedure> |
| End If |
| rgridInventory.DataSource = inventoryData |
| rgridInventory.DataBind() |
| Catch ex As Exception |
| ' your error catching protocol |
| Finally |
| End Try |
| End Sub |
| ' pulls in different version |
| GetInventoryData("diffVersion") |
| function getConfirm(message) { |
| if (confirm(message) != true) { |
| return false; |
| } |
| return true; |
| } |