Hi Jeffe,
Thanks.
Here is the part of datagrid:(a little bit big)
<asp:DataGrid id="gdMemPortfo lio" runat="server" Height="64px"
Width="1048px" AutoGenerateCol umns="False">
<Columns>
<asp:BoundColum n Visible="False" DataField="ast_ key"></asp:BoundColumn >
<asp:BoundColum n DataField="seg_ label" headerText="Seg ment"></asp:BoundColumn >
<asp:BoundColum n DataField="mana ger" HeaderText="Man ager"></asp:BoundColumn >
<asp:BoundColum n DataField="asse t" HeaderText="Ass et"></asp:BoundColumn >
<asp:BoundColum n DataField="tota l_units" HeaderText="Cur rent
Units/Shares"></asp:BoundColumn >
<asp:BoundColum n DataField="vest ed_units" HeaderText="Ves ted
Units/Shares"></asp:BoundColumn >
<asp:BoundColum n DataField="mark et_value" HeaderText="Cur rent Vested Market
Value"></asp:BoundColumn >
<asp:BoundColum n DataField="pend ing_sell_units" HeaderText="Pen ding Sells
Units/Shares"></asp:BoundColumn >
<asp:BoundColum n DataField="pend ing_buy_amount" HeaderText="Pen ding Buys
Amount"></asp:BoundColumn >
<asp:BoundColum n DataField="fee_ units" HeaderText="Fee Charged
Units/Shares"></asp:BoundColumn >
<asp:BoundColum n DataField="ava_ units" HeaderText="Ava ilable
Units/Shares"></asp:BoundColumn >
<asp:BoundColum n DataField="ava_ amount" HeaderText="Ava ilable
Amount"></asp:BoundColumn >
<asp:TemplateCo lumn HeaderText="Uni ts/Shares">
<ItemTemplate >
<asp:TextBox OnTextChanged=" RowChanged" id=txtUnitsSell runat="server"
Width="100px" Text='<%# DataBinder.Eval (Container, "DataItem.trx_u nits") %>'>
</asp:TextBox>
</ItemTemplate>
</asp:TemplateCol umn>
<asp:TemplateCo lumn HeaderText="Amo unt">
<ItemTemplate >
<asp:TextBox OnTextChanged=" RowChanged" id=txtAmountSel l runat="server"
Width="100px" Text='<%# DataBinder.Eval (Container, "DataItem.trx_a mount") %>'>
</asp:TextBox>
</ItemTemplate>
</asp:TemplateCol umn>
<asp:TemplateCo lumn HeaderText="Per centage">
<ItemTemplate >
<asp:TextBox OnTextChanged=" RowChanged" id=txtPctSell runat="server"
Width="100px" Text='<%# DataBinder.Eval (Container, "DataItem.trx_p ct") %>'>
</asp:TextBox>
</ItemTemplate>
</asp:TemplateCol umn>
<asp:TemplateCo lumn HeaderText="All ">
<ItemTemplate >
<asp:Button id="btnAllSell " runat="server" Width="33px"
Text="All"></asp:Button>
</ItemTemplate>
</asp:TemplateCol umn>
<asp:TemplateCo lumn HeaderText="Spe cific Cell">
<ItemTemplate >
<asp:CheckBox id=chbcellSell runat="server" Width="10px" Height="8px"
Enabled='<%# DataBinder.Eval (Container, "DataItem.g ia") %>'>
</asp:CheckBox>
</ItemTemplate>
</asp:TemplateCol umn>
</Columns>
</asp:DataGrid></P>
what I want to do is when btnAllSell button is clicked, get data from
BoundColumn DataField="ava_ units", fill it into txtUnitsSell textbox.
william
"Jeppe Dige Jespersen" wrote:
I tried to used HTML button, it does not fire postback event. But how can
I do some process on the datagrid from javascript function? Actually there
is textbox in the datagrid, when the button is clicked, I want to update the
textbox. Could you show me a sample?
Hmmm....
In your first post, I understood that you didn't want the postback event.
Could you post the html from your aspx page, along with a description of the
exact functionality of your page. Will try to help, but no guarantees... :-)
Jeppe