Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
Urgent!! Using Multiple Data Key Fields
posted

Hello

 In my webgrid, when i set the Multiple Data Key Fields, can not  cause the updatecell event  to fire

 

<igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server" Height="200px"
            Width="325px" DataKeyField="CurrencyCode,ChangeDate"
            onupdatecell="UltraWebGrid1_UpdateCell">
            <bands>
                <igtbl:UltraGridBand 
                    DataKeyField="CurrencyCode,ChangeDate" >
                    <Columns>
                        <igtbl:UltraGridColumn AllowUpdate="No" BaseColumnName="CurrencyCode"
                            IsBound="True" >
                        </igtbl:UltraGridColumn>
                        <igtbl:UltraGridColumn AllowUpdate="No" BaseColumnName="ChangeDate"
                            IsBound="True"  DataType="System.DateTime">
                            <Footer>
                                <RowLayoutColumnInfo OriginX="1" />
                            </Footer>
                            <Header>
                                <RowLayoutColumnInfo OriginX="1" />
                            </Header>
                        </igtbl:UltraGridColumn>
                        <igtbl:UltraGridColumn BaseColumnName="Rate" IsBound="True"
                            DataType="System.Decimal">
                            <Footer>
                                <RowLayoutColumnInfo OriginX="2" />
                            </Footer>
                            <Header>
                                <RowLayoutColumnInfo OriginX="2" />
                            </Header>
                        </igtbl:UltraGridColumn>
                        <igtbl:UltraGridColumn BaseColumnName="Memo" IsBound="True" >
                            <Footer>
                                <RowLayoutColumnInfo OriginX="3" />
                            </Footer>
                            <Header>
                                <RowLayoutColumnInfo OriginX="3" />
                            </Header>
                        </igtbl:UltraGridColumn>
                    </Columns>
                    <addnewrow view="NotSet" visible="NotSet">
                    </addnewrow>
                </igtbl:UltraGridBand>
            </bands>
            <displaylayout allowcolsizingdefault="Free" allowcolumnmovingdefault="OnServer"
                allowdeletedefault="Yes" allowsortingdefault="OnClient"
                allowupdatedefault="Yes" bordercollapsedefault="Separate"
                headerclickactiondefault="SortMulti" name="UltraWebGrid1"
                rowheightdefault="20px" rowselectorsdefault="No"
                selecttyperowdefault="Extended" stationarymargins="Header"
                stationarymarginsoutlookgroupby="True" tablelayout="Fixed" version="4.00"
                viewtype="OutlookGroupBy"  CellClickActionDefault = "Edit" >
                <framestyle backcolor="Window" bordercolor="InactiveCaption"
                    borderstyle="Solid" borderwidth="1px" font-names="Microsoft S***rif"
                    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 S***rif" 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 hidden="False">
                    <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,s***rif" 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,s***rif" font-size="11px">
                        <padding left="2px" />
                    </filteroperanddropdownstyle>
                </filteroptionsdefault>
            </displaylayout>
        </igtbl:UltraWebGrid>

--------------------------------------------------------------------------------------------------------------------------

private DataSet _Data;
private SqlCommand SelectCommand1;
private SqlConnection con;
private SqlDataAdapter da;

protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ExpenseLineConnectionString3"].ConnectionString);
            _Data = new DataSet();
            da = new SqlDataAdapter();
            SelectCommand1 = new SqlCommand();
            this.SelectCommand1.Connection = con;
            this.SelectCommand1.CommandText = "SELECT CurrencyCode,ChangeDate,Rate,Memo FROM TCurrencyRate";
            this.da.SelectCommand = this.SelectCommand1;
            this.da.Fill(this._Data);

            UltraWebGrid1.DataSource = _Data.Tables[0].DefaultView;
            this.UltraWebGrid1.DataBind();
        }
    }
    protected void UltraWebGrid1_UpdateCell(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
    {
        string aa = ((object[])e.Cell.Row.DataKey)[0].ToString() + ((object[])e.Cell.Row.DataKey)[1].ToString();

    }

 

Parents Reply Children
No Data