Update textbox in datagrid on client side

R

Reena

Hi,

Working with ASP.NET 2.0 with Masterpages.

Here is my datagrid...

<asp:DataGrid ID="dgSelectedFields" runat="server"
BorderStyle=None
GridLines="None"
CssClass="grdData"
AutoGenerateColumns="False" >
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Label id="lblColumnID" runat="server"
Visible="False" Text='<%# DataBinder.Eval(Container.DataItem,
"Column_ID") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Display">
<ItemTemplate>
<asp:CheckBox ID="chkDisplay"
runat="server" checked='<%# DataBinder.Eval(Container.DataItem,
"Display") %>' />
</ItemTemplate>
<ItemStyle Font-Bold="False"
Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
Font-Underline="False"
HorizontalAlign="Center" />
<HeaderStyle Font-Bold="False"
Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
Font-Underline="False"
HorizontalAlign="Center" />
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Sort">
<ItemTemplate>
<asp:TextBox id=txtSort runat="server"
CssClass="txtBox"
Text='<%#
DataBinder.Eval(Container.DataItem, "Sort_Order") %>'
Width="20px"
/>
</ItemTemplate>
<ItemStyle Font-Bold="False"
Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
Font-Underline="False"
HorizontalAlign="Center" />
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Field">
<ItemTemplate>
&nbsp;<asp:HyperLink ID="hypField" runat="server" NavigateUrl='<%#
Databinder.Eval(Container.DataItem,"COLUMN_DISPLAY_NAME","JavaScript:FilterWindow('{0}');"
) %>'><%#DataBinder.Eval(Container.DataItem,
"COLUMN_DISPLAY_NAME")%></asp:HyperLink>

</ItemTemplate>
<ItemStyle Width="150px" />
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Filter">
<ItemTemplate>
<asp:TextBox id=txtFilter runat="server"
Text='<%#
DataBinder.Eval(Container.DataItem, "Filter") %>'
Width="150px"
ReadOnly="true" CssClass="txtReadBox "
/>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Remove">
<ItemTemplate>
<asp:CheckBox ID="chkRemove" runat="server"
/>
</ItemTemplate>
<ItemStyle Font-Bold="False"
Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
Font-Underline="False"
HorizontalAlign="Center" />
</asp:TemplateColumn>
</Columns>
<HeaderStyle Font-Bold="False" Font-Italic="False"
Font-Overline="False" Font-Strikeout="False"
Font-Underline="False" HorizontalAlign="Center"
ForeColor="Maroon" />
</asp:DataGrid>

---------------
when clicked on HyperLink ID="hypField", opens up the dialog box that
allows to set filters.
Dialogbox calls JavaScript function on parent page with filter value
and field that opened dialogbox. At this point I would like to go
through datagrid and update txtfilter box with filter value based on
field info. Like to set this value on client side to avoid round-trip
to set one filter box.

Help in this matter is greatly appreciated.

Thanks,

- Reena
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top