Replies
Thank for your anwser.
But When I change the value in my ultrawebgrid, there is no change in the database (SQL).
I would like to have an automatic update without code for this example.
This is the source if you see some anomalies :
Thank in advance for your help.
<%@ Page Language="C#" MasterPageFile="~/MasterPageOc.master" AutoEventWireup="true" CodeFile="Germplasm.aspx.cs" Inherits="Germplasm" Title="Page sans titre" %>
<%
@ Register assembly="Infragistics35.WebUI.UltraWebGrid.v8.3, Version=8.3.20083.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.UltraWebGrid" tagprefix="igtbl" %><%@ Register assembly="Infragistics35.Web.v8.3, Version=8.3.20083.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.Web.UI.GridControls" tagprefix="ig" %>
<
asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server" Browser="Xml"
DataSourceID="LinqDataSource1" Height="200px" Width="325px">
<Bands><igtbl:UltraGridBand AddButtonCaption="inscription" BaseTableName="inscription"
Key="inscription" AllowUpdate="Yes">
<Columns><igtbl:UltraGridColumn BaseColumnName="ins_inscription_sys" IsBound="True"
Key="ins_inscription_sys" AllowUpdate="No">
<Header Caption="ins_inscription_sys">
</Header>
</igtbl:UltraGridColumn><igtbl:UltraGridColumn BaseColumnName="ins_cytopl" IsBound="True"
Key="ins_cytopl" AllowUpdate="Yes">
<Header Caption="ins_cytopl">
<RowLayoutColumnInfo OriginX="1" />
</Header>
<Footer>
<RowLayoutColumnInfo OriginX="1" />
</Footer>
</igtbl:UltraGridColumn>
</Columns>
<AddNewRow View="NotSet" Visible="NotSet">
</AddNewRow>
</igtbl:UltraGridBand>
</Bands><DisplayLayout AllowColSizingDefault="Free" AllowColumnMovingDefault="OnServer"
AllowSortingDefault="OnClient" AllowUpdateDefault="Yes" BorderCollapseDefault="Separate" HeaderClickActionDefault="SortMulti"
LoadOnDemand="Xml" Name="UltraWebGrid1" RowHeightDefault="20px" RowSelectorsDefault="No" SelectTypeRowDefault="Extended"
StationaryMargins="Header" StationaryMarginsOutlookGroupBy="True"
TableLayout="Fixed" Version="4.00"><FrameStyle BackColor="Window" BorderColor="InactiveCaption"
BorderStyle="Solid" BorderWidth="1px" Font-Names="Microsoft Sans Serif"
Font-Size="8.25pt" Height="200px" Width="325px">
</FrameStyle>
<Pager MinimumPagesForDisplay="2">
<PagerStyle BackColor="LightGray" BorderStyle="Solid" BorderWidth="1px"><BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px"
WidthTop="1px" />
</PagerStyle>
</Pager>
<EditCellStyleDefault BorderStyle="None" BorderWidth="0px">
</EditCellStyleDefault>
<FooterStyleDefault BackColor="LightGray" BorderStyle="Solid" BorderWidth="1px"><BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px"
WidthTop="1px" />
</FooterStyleDefault><HeaderStyleDefault BackColor="LightGray" BorderStyle="Solid"
HorizontalAlign="Left"><BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px"
WidthTop="1px" />
</HeaderStyleDefault><RowStyleDefault BackColor="Window" BorderColor="Silver" BorderStyle="Solid"
BorderWidth="1px" Font-Names="Microsoft Sans Serif" Font-Size="8.25pt">
<Padding Left="3px" />
<BorderDetails ColorLeft="Window" ColorTop="Window" />
</RowStyleDefault>
<GroupByRowStyleDefault BackColor="Control" BorderColor="Window">
</GroupByRowStyleDefault>
<GroupByBox>
<BoxStyle BackColor="ActiveBorder" BorderColor="Window">
</BoxStyle>
</GroupByBox>
<AddNewBox><BoxStyle BackColor="Window" BorderColor="InactiveCaption" BorderStyle="Solid"
BorderWidth="1px"><BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px"
WidthTop="1px" />
</BoxStyle>
</AddNewBox>
<ActivationObject BorderColor="" BorderWidth="">
</ActivationObject>
<FilterOptionsDefault><FilterDropDownStyle BackColor="White" BorderColor="Silver" BorderStyle="Solid"
BorderWidth="1px" CustomRules="overflow:auto;" Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="11px" Height="300px"
Width="200px">
<Padding Left="2px" />
</FilterDropDownStyle>
<FilterHighlightRowStyle BackColor="#151C55" ForeColor="White">
</FilterHighlightRowStyle><FilterOperandDropDownStyle BackColor="White" BorderColor="Silver"
BorderStyle="Solid" BorderWidth="1px" CustomRules="overflow:auto;"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="11px">
<Padding Left="2px" />
</FilterOperandDropDownStyle>
</FilterOptionsDefault>
</DisplayLayout>
</igtbl:UltraWebGrid><asp:LinqDataSource ID="LinqDataSource1" runat="server"
ContextTypeName="DataClassesDataContext" Select="new (ins_inscription_sys, ins_cytopl)" TableName="inscription"
EnableUpdate="True">
</asp:LinqDataSource>
</asp:Content>
Hello,
Ok It works now.
I loaded data with the SQLDataSource and I can retrieve my selected row fine. It is oK I can have the value of my row selected and put it in session variable.
Could help me for a global problem :
I would like to update my data from my ultrawebgrid to my linqdatasource.
What is the best way to put a submit button.. a special function..
Do you have some example please?
Thank for your help.
Hello,
I have the same issue.
First point
Could you tell me please the equivalance webdatagrid of this line working correctly with a GridView? :
num_oc =long.Parse(GridView1.Rows[GridView1.SelectedIndex].Cells[1].Text);
Second Point
I am not a specialist of Infragistics but I would like to know what is the mean to find in my webdatagrid the value of the first column in the row selected by the user example : 27
In my code below the row is null !!!!!
Thanks
protected void Unnamed1_Click(object sender, EventArgs e)
{
foreach (GridRecord row in this.WebDataGridPlanting.Behaviors.Selection.SelectedRows)
{
if (row != null)
{
int i=+1;
}
}
}