|
Cool !
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi there,
I am new to asp .net and ajax. I have managed to link the 2 gridview in a simple default.aspx page but I would like to use popup ajax to allow user to select from gridview. Once selected,I update the parent page with.
ie: 2 gridview in popup extender.
any help or guidance will be appreciated.
Thanks
Mario
|
|
|
|
|
Hi,
I have a submit button in update panel and textbox which is not there in update panel.
when i type something in textbox and press enter the submit should be clicked and textbox text should be cleared.
I was able to get the first part.But the text is not getting cleared from textbox.
Here is the snippet code:
txtmsg.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btn1.UniqueID + "').click();return false;this.value='';}} else {return true;this.value='';} ");
also i have tried to clear the textbox values by using document.getelementbyid('textboxname').value=""
but it does not work....
i have tried many solutions on the net they are not working..
This is really urgent any help is really appreciated.
Thnaks in adavnce
|
|
|
|
|
Hi, sorry, could you just clarify....
You have a web form and it has
1) An update panel
2) A TextBox outside the UpdatePanel
3) A Button inside the UpdatePanel
then you want to
1) User to type in text box
2) User to click the Button
3) Button to submit request - Panel to update
4) Textbox to clear after all this has taken place
|
|
|
|
|
Hi All
i have one aspx page inside this page i have one i frame, if the user clik on f5 there is no page refresh , i have write some java script for that , and this code is wrking, if the user press f5 inside or uotside of i frame but there is some condition..
if the Iframe Src= local file it's wrk fine ="abc.aspx"
but if i change the IFRAME SRC to url(for example www.anyurltest.com), then the page will refreh if the user press f5 inside IFrame.
Code :
<script language="javascript">
function DisableCtrlR()
{
debugger;
if(111 < window.event.keyCode && 124 > window.event.keyCode) //disable F1-F12
{
window.event.keyCode=0;
event.returnValue = false;
return false;
}
}
<body onload="document.onkeydown=DisableCtrlR;">
<form id="form1" runat="server">
<iframe id="Frame" src="http://www.anyurltest.com" onload="Chek();">
</form>
</body>
Thanks
|
|
|
|
|
Hi!!
I have a GridView with a column to select edit.
I need the value of the first cell in the row selected. I did that:
protected void GridView2_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)<br />
{
Response.Write(e.NewSelectedIndex);<br />
}<br />
protected void GridView2_SelectedIndexChanged(object sender, EventArgs e)<br />
{<br />
TextBox4.Text = GridView2.SelectedRow.Cells[0].Text;<br />
}<br />
but it does not work: I have no error message and no value in my textbox.
My GridView:
<asp:GridView ID="GridView2" runat="server" OnSelectedIndexChanging="GridView2_SelectedIndexChanging"<br />
OnSelectedIndexChanged="GridView2_SelectedIndexChanged"<br />
DataKeyNames="NUM_INSCRIPTION"<br />
OnRowCancelingEdit ="GridView2_RowCancelingEdit" OnRowUpdating ="GridView2_RowUpdating" OnRowEditing="GridView2_RowEditing" AutoGenerateColumns="False" AllowPaging="True"><br />
<SelectedRowStyle BackColor="Yellow" /><br />
<Columns><br />
<asp:TemplateField><br />
<EditItemTemplate><br />
<asp:TextBox ID="id0" runat="server" Text='<%# Bind("C1") %>'></asp:TextBox> <br />
</EditItemTemplate><br />
<ItemTemplate><br />
<asp:Label ID="id01" runat="server" Text='<%# Bind("C1") %>'></asp:Label><br />
</ItemTemplate><br />
</asp:TemplateField><br />
<asp:TemplateField><br />
<EditItemTemplate><br />
<asp:TextBox ID="id1" runat="server" Text='<%# Bind("C2 ") %>'></asp:TextBox> <br />
</EditItemTemplate><br />
<ItemTemplate><br />
<asp:Label ID="id11" runat="server" Text='<%# Bind("C2 ") %>'></asp:Label><br />
</ItemTemplate><br />
</asp:TemplateField><br />
<asp:TemplateField><br />
<EditItemTemplate><br />
<asp:TextBox ID="id2" runat="server" Text='<%# Bind("C3 ") %>'></asp:TextBox> <br />
</EditItemTemplate><br />
<ItemTemplate><br />
<asp:Label ID="id21" runat="server" Text='<%# Bind("C3") %>'></asp:Label><br />
</ItemTemplate><br />
</asp:TemplateField><br />
<asp:CommandField ShowEditButton="True" ShowSelectButton="True" /><br />
</Columns><br />
</asp:GridView><br />
why I have not the value of a cell of selected line??
Thanks!
|
|
|
|
|
Please may I know the any open-source available for creating Blogs(vs 2005)
Ramkumar(senior pgmr)
|
|
|
|
|
Just try to search on
www.sourceforge.net
Regards
Anil Pal
|
|
|
|
|
if its in PHP then yuou can use Drupal or PhpBB
Cheers
Bino
www.codepal.co.in
|
|
|
|
|
You might want to look for the subtext project. It is an open source blog written in C# using ASP.NET
|
|
|
|
|
Im getting the below error when im trying to build the Websetup project..
of my Webapplication...
Unable to build project output group 'Content Files from <myproject> (Active)'....
Please help me out....
|
|
|
|
|
hi,
Could you send me the steps details which u r performing while build the web setup project.
Regards
Anil Pal
|
|
|
|
|
Check this
http://support.microsoft.com/kb/835458[^]
Hope it Helps
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
www.ITS.co.za
|
|
|
|
|
Hello Friends,
I want to show an Div whose id is Div1 of Default2.aspx inside the iframe of a web page(Default.aspx).
<iframe src='Default2.aspx' scrolling="yes" height="200" width="200" style="border:0px solid">
</iframe>
but the code i've given above is bringing the whole page not that particular div because i've giving that page path so can anybody tell me how to call that particular div inside the iframe of Default.aspx
|
|
|
|
|
I don't think you can do that using an IFrame...
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Well, you sort of can...
If you have a script that's gonna hide all the other controls on default.aspx and just leave div1.
It just sounds really, well dirty.
But it could be done.
Why not put that div in a seperate aspx file, show that in the iframe and include did in default.aspx?
Or create a user control out of that div and scrap the whole iframe idea?
var question = (_2b || !(_2b));
|
|
|
|
|
hi..i am using checkboxes to select the rows from one gridview and i want those rows to get copied into another gridview..
i tried using datatable and then creating columns and inserting into and then later binding..below is the code..
DataTable dt = new DataTable();
DataRow dr;
dt.Columns.Add(new DataColumn("userid"));
dt.Columns.Add(new DataColumn("username"));
dt.Columns.Add(new DataColumn("city"));
foreach (GridViewRow gr in GridView1.Rows)
{
if (((CheckBox)gr.Cells[3].FindControl("chkbx")).Checked == true)
{
dr = dt.NewRow();
dr["userid"] = gr.Cells[0].Text;
dr["username"] = gr.Cells[1].Text;
dr["city"] = gr.Cells[2].Text;
dt.Rows.Add(dr);
}
}
GridView2.DataSource = dt;
GridView2.DataBind();
plz help with the code..am stuck here..
thanks..
scarface
|
|
|
|
|
What exactly is the problem or error?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
there is no error message..when i compile it the data is displayed in the first gridview for which i have used sql data source..when i click on transfer i dont get the display of the second gridview..
scarface
|
|
|
|
|
Hi,
Your code seems ok. Can you send complete code (Page load). Or what error you are encouter.
Regards
Anil Pal
|
|
|
|
|
k..here's the code
here's the aspx code
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="userid"
DataSourceID="SqlDataSource1" Height="137px" Width="195px">
<Columns>
<asp:BoundField DataField="userid" HeaderText="userid" ReadOnly="True" SortExpression="userid" />
<asp:BoundField DataField="username" HeaderText="username" SortExpression="username" />
<asp:BoundField DataField="city" HeaderText="city" SortExpression="city" />
<asp:TemplateField HeaderText="select">
<ItemTemplate>
<asp:CheckBox ID="chkbx" runat="server" /></ItemTemplate></asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [user]"></asp:SqlDataSource>
<br />
<br />
<asp:Button ID="Button1" runat="server" Height="28px" OnClick="Button1_Click" Text="Transfer"
Width="82px" />
<br />
<br />
<br />
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" >
</asp:GridView>
</form>
here's the c# code
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
{
DataTable dt = new DataTable();
DataRow dr;
dt.Columns.Add(new DataColumn("userid"));
dt.Columns.Add(new DataColumn("username"));
dt.Columns.Add(new DataColumn("city"));
foreach (GridViewRow gr in GridView1.Rows)
{
if (((CheckBox)gr.Cells[3].FindControl("chkbx")).Checked == true)
{
dr = dt.NewRow();
dr["userid"] = gr.Cells[0].Text;
dr["username"] = gr.Cells[1].Text;
dr["city"] = gr.Cells[2].Text;
dt.Rows.Add(dr);
}
}
GridView2.DataSource = dt;
GridView2.DataBind();
}
}
}
thank you..
scarface
|
|
|
|
|
am not getting any error message..
when i compile i just get the display of first gridview and when i click on transfer there's no display of the second gridview..
scarface
|
|
|
|
|
hmmm...............
Please either remove the "AutoGenerateColumns="False"". property of second GridView i.e GridView2. Or make it true.
Cheers!
Regards
Anil Pal
|
|
|
|
|
hey thanks a lot...awesome..
it worked..
scarface
|
|
|
|
|
You welcome always
Regards
Anil Pal
|
|
|
|