|
I have Created 2 Tables inside the DataSetAUDITLOG
1. AuditLog
2. CountLessons
I have deleted the table CountLessons from DataSet and Report and I am not using CountLessons table anymore. As before I got the Same Problem, On that time I deleted the DataSet and .aspx and .rdlc
Thanks
Sarfarj Ahmed
|
|
|
|
|
I am exploring the DataGrid and DetailsView functionality in 2005. This is the WalkThrough I used:
http://msdn2.microsoft.com/en-us/library/stc0szde(VS.80).aspx[^]
I got a question for the DetailsView field that was filled from datasource, is there anyway I can set it to a drop down list so that when people wants to update, they can select from drop down list instead of key in the value?
|
|
|
|
|
hi there...
are you making the fields as template fields? if no, convert them into template fields from the smart tag of the detailsview and then in the edit template of the particular field, replace it with an asp:dropdownlist control with the required list items/ sqldatasource.
hope this helps...
Murthy here
|
|
|
|
|
Thanks Murthy!
I tried this and it worked. But I got a new problem of how to set the selected value in this drop down list when I want to update it.
I appreciate any answer.
|
|
|
|
|
Hi there,
Can you post your gridview code for that particular template field?and the sqldatasource?
thanks,
Murthy here
|
|
|
|
|
Hi Muthy,
The template is actually in Detail View. By select a value in Grid View, a Detail View will show up and in the Detail View, you can add/update/delete records. So I changed the UpdateParameter and InsertParameter in the Detail view like below but got this exception:
'ddlProgress' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
Here is the code for the update parameter and datasource:
***************************************************************************
<br />
<br />
<br />
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:cs1%>"<br />
UpdateCommand="spUpdReport" UpdateCommandType="StoredProcedure"><br />
<UpdateParameters><br />
<asp:ControlParameter ControlID="GridView1" Name="StatusActivityID" PropertyName="SelectedValue"<br />
Type="Int32" /><br />
<asp:ControlParameter ControlID="DetailsView1$ddlProgress" Name="ProgressID" PropertyName="SelectedValue" /><br />
<asp:Parameter Name="StatusActivityID" Type="Decimal" /><br />
<asp:Parameter Name="DateEntered" Type="DateTime" /><br />
<asp:Parameter Name="ProjectName" Type="String" /><br />
<asp:Parameter Name="ProjectDescription" Type="String" /><br />
<asp:Parameter Name="WaitingOn" Type="String" /><br />
<asp:Parameter Name="DueDate" Type="DateTime" /><br />
<asp:Parameter Name="ExpectedCompletionDate" Type="DateTime" /><br />
<asp:Parameter Name="ActualCompletionDate" Type="DateTime" /><br />
<asp:Parameter Name="Priority" Type="Decimal" /><br />
<asp:Parameter Name="UpdatorID" Type="String" /><br />
<asp:Parameter Name="DivisionID" Type="Decimal" ConvertEmptyStringToNull="False" /><br />
</UpdateParameters><br />
</asp:SqlDataSource><br />
<br />
***************************************************************************<br />
and here is the template and datasource for the Progress(which I want to use a drop down list to display, ProgressID is the value and Progress is the name for the drop down list)<br />
<br />
<asp:TemplateField HeaderText="Progress" SortExpression="Progress"><br />
<EditItemTemplate><br />
<asp:DropDownList ID="ddlProgress" runat="server" DataSourceID="SqlDataSource3" DataTextField="Progress" DataValueField="ProgressID" SelectedValue='<%#Bind("Progress")%>'><br />
</asp:DropDownList><br />
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$connectionStrings:cs1 %>"<br />
SelectCommand="SELECT [ProgressID], [Progress] FROM [Progress]"></asp:SqlDataSource><br />
</EditItemTemplate><br />
<ItemTemplate><br />
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Progress") %>'></asp:Label><br />
</ItemTemplate><br />
</asp:TemplateField><br />
<br />
<br />
*****************************************************************************
Thank you so much for your help!
Alex
<
-- modified at 11:49 Friday 11th May, 2007
|
|
|
|
|
Hi All...
I have a form which inserts customers data in SQL Server database, and I add a submit button to add the data on event on_Click, I want the submit button to be fired always either when the user or when the user clicks by mouse(which is not a problem) or when he presses enter(here is the problem)...
Have a nice day
|
|
|
|
|
What error you get (if you get any error)? Otherwise first set focus in button then press enter
|
|
|
|
|
The solution is to put all the controls that accepts user input and your submit button into the same panel control. On the panel control, there is a default button property. Set the default button property with the ID of your submit button. This will take care the problem.
Rookie Programmer
|
|
|
|
|
hi Dear...
I cannot find the default button property for the button
Thanks alot...
|
|
|
|
|
Hi Dear...
I did that, but i didn't find the default button property..
Regards
|
|
|
|
|
Thanks dear...
It worked
Have a nice day
|
|
|
|
|
Do you have more than one textbox on the page? Is the submit button the first button in line? Is this 1.1 or 2.0?
Cleako
|
|
|
|
|
Dear
It's 2.0 problem, and I have many textboxes and a single submit button, the submit is the last control in the form..
Regards
|
|
|
|
|
hi friend
I too faced the same problem(posted in the forum too) but i couldnt make up by assigning any properties or coding.
What i did is, just cut all the other buttons(in case of WebControl button) leaving the button to be clicked while hitting 'Enter' and again pasted the other buttons in their position. This worked(meaning that Submit button has the prior tab index=0)
Or
In the textbox's KeyPress Event,check for the KeyCode(say 13 for Enter Key) and if so, call the button's click.
Try and let me know if you have any problem.
|
|
|
|
|
Try the Following code:-
Page.RegisterHiddenField("__EVENTTARGET", "btnClick")
Everything Is Possible!
|
|
|
|
|
What Is a master page?
and how to deat with?
Does every page in the project inherit from it?
Regards
Nour Abdel-Salam
|
|
|
|
|
|
Am try to deploy the ASP.NET Application using Web Setup(With Out VS.NET IDE Machine)
the following issuues are comming 1.Not able to view the DataGrid with Web Controls?
Tell me what are all required, while build the web Setup? Development machine its working fine(After setup).
Advance Thanks
Anandan k
|
|
|
|
|
hi,
i have an application where i need to provide prompt to the user if it click on the browser close button...
how can i do this? please reply soon its urgent
|
|
|
|
|
Probably you would like to have a look at this.[^]
Best Regards,
Apurva Kaushal
|
|
|
|
|
no not like that in this case you will get the prompt for the any postback and reload also
i need only prompt for the close button
|
|
|
|
|
No it is working fine in the postbacks and in refreshing the page also.
Best Regards,
Apurva Kaushal
|
|
|
|
|
i think for that you need to catch each cleck event ........
wait i try first
|
|
|
|
|
What you are asking for is not possible.
What you can do is to catch the onunload event in the body tag. This event is triggered whenever the page is unloaded, which happens if the window is closed, but also if the user navigates to a different page, or reloads the same page.
You can't directly determine the reason for the event, however, so you have to keep track of how the user navigates so that you can tell when he's leaving the page for some other reason.
---
single minded; short sighted; long gone;
|
|
|
|