|
Bind the gridview again after adding the record
|
|
|
|
|
i made the following code.but not working.
string sqlConnectString = "DataSource=ABHI\\SQLEXPRESS;Initial Catalog=empDB;Integrated Security=True";
string sqlSelect = "SELECT [emp_id], [first_name], [last_name], [dept_name], [class_name], [emp_joiningdate] FROM [empTB]";
SqlDataAdapter da = new SqlDataAdapter(sqlSelect, sqlConnectString);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
conn.close();
so where can i place this code.i placed after the data inserted.
Thankx in advance.
|
|
|
|
|
i have defined the Following Template Column
<telerik:GridTemplateColumn UniqueName="Select">
<ItemTemplate>
</ItemTemplate>
</telerik:GridTemplateColumn>
and i want to hide this Column on the clientside like this
<telerik:GridTemplateColumn UniqueName="Select" Visible='<%# CheckboxVisibleCheck(Eval("Column3").ToString)%>'>
<ItemTemplate>
</ItemTemplate>
</telerik:GridTemplateColumn>
How can i achieve this
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
Same as below: when working with 3rd party code always best to contact the author in the first instance.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
I agree with Mark. I have used Telerik and they have dedicated support people because even *gasp* wizardzz needs help sometimes.
http://www.telerik.com/community/forums.aspx[^]
"I have a theory that the truth is never told during the nine-to-five hours. "
— Hunter S. Thompson
|
|
|
|
|
Thanks for your reply. i have posted the Question in Telerik Forums , i will patiently wait.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
For some reason, I see Telerik forums delaying responses at least by a turn-around time of 24 hours.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
i saw that, i have found the solution, though it was not exactly what i wanted, so i had to do it on the server side on "ItemDatabound" event.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
Good Morning All
I am Opening a Page as a Popup i am using Telerik WIndow which has similar functionality when opening a Popup like this
function OpenPopUp(val_real, vis) {
var myWidth = 0, myHeight = 0;
if (typeof (window.innerWidth) ==
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
//IE 6+ in
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
myWidth = myWidth / 2 - 150;
myHeight = myHeight / 2 - 50;
window.open(
return false;
}
this "myPage.aspx" page has a button that person some updates to the Database on the server side. This is opened as a popup and there is a grid below , so what i want to do after the Update to the Database has happened , i want to refresh the Grid, i have this code
//This code is used to provide a reference to the radwindow "wrapper"
function GetRadWindow() {
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz az well)
return oWindow;
}
function CloseOnReload() {
//alert("Dialog is about to close itself");
GetRadWindow().close();
RefreshParentPage();
}
function RefreshParentPage() {
//alert("Dialog is about to reload parent page");
GetRadWindow().BrowserWindow.location.reload();
}
function RedirectParentPage(newUrl) {
alert("Dialog is about to redirect parent page to " + newUrl);
GetRadWindow().BrowserWindow.document.location.href = newUrl;
}
function CallFunctionOnParentPage(fnName) {
alert("Calling the function " + fnName + " defined on the parent page");
var oWindow = GetRadWindow();
if (oWindow.BrowserWindow[fnName] && typeof (oWindow.BrowserWindow[fnName]) == "function") {
oWindow.BrowserWindow[fnName](oWindow);
}
}
function RefreshParentPageWithoutWarning() {
GetRadWindow().BrowserWindow.document.forms[0].submit();
}
and on the server side i have this
Response.Write("<Script>return RefreshParentPageWithoutWarning();</script>")
or
SavetoDB(Values)
ScriptManager.RegisterStartupScript(Page, Me.GetType(), "", "RefreshParentPageWithoutWarning()", True)
My problem here is that it Refresh the page before it does a Database Update, and if it refreshes the page , the Database update ends up not being done.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
You might be better posting this and your other query on the Telerik forums or mail them drect: I always found them pretty responsive.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Thanks for your reply, the asnwer wasa generic asnwer, because it was not only the third party forum that can asnwer this question , i resolved it the following way
Dim page As Page = HttpContext.Current.Handler
ScriptManager.RegisterStartupScript(page, page.GetType(), "err_msg", "CloseOnReload();", True)
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
Hi experts,
I would like to ask why does I'm getting an error when I am deploying my web application to my server.When I'm developing the application it works smoothly in the visual studio IDE but when I'm deploying it to my web server which is my local computer also it produce an error.I've done google and following some advice on other website as well still I can't managed to run it. I've also install the 64/32 bit redistributable of the crystal report but still I did not manage to make it work.My workstation is in 64 bit and I've done changing the target platform from 32 to 64 or vice versa but still no luck again. So much confused now about this error.
Below is the error produce
Server Error in '/' Application.
--------------------------------------------------------------------------------
Could not load file or assembly 'webReportTester' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly 'webReportTester' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'webReportTester' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[BadImageFormatException: Could not load file or assembly 'webReportTester' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +567
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +192
System.Reflection.Assembly.Load(String assemblyString) +35
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +147
[ConfigurationErrorsException: Could not load file or assembly 'webReportTester' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +1298
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +373
System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +104
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +293
System.Web.Compilation.BuildManager.CallPreStartInitMethods() +240
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +961
[HttpException (0x80004005): Could not load file or assembly 'webReportTester' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +614
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +896
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Any help would be so much appreciated.
Thanks,
Dan
|
|
|
|
|
Enable 32 bit support in Asp.Net pool setting and then try.
|
|
|
|
|
Hi,
I've a datagrid populating around 8000 records. The query is excuted quickly in SQL Server but the webpage is being timeout.
Any idea how to solve this?
Regards
Berba
|
|
|
|
|
Why would you do that? Who can possibly look through 8000+ rows and get anything meaningful? You need to return a meaningful subset (maybe the first 100 records) and then let the user request by filtering or bringing more back as needed when paging through the data.
Anyway, when you say quickly, how quick is quickly, exactly? Are you sure the query is indexed correctly? Have you gone through the execution plan? Are there any other bottlenecks?
Really need more info to sort this out but I'd start with the stored procedure.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
8000 records at a time? It's horrible. Use Paging & Filters in your Grid.
SQL Server 2005 Paging Results[^]
thatrajaNobody remains a virgin, Life screws everyone
|
|
|
|
|
hi
can i update/insert record directly from markup if i use UpdatePanel inside asp.net GridControls (GridView, DetailsView, FormView...) using SqlDataSource
this is what i am trying to do
<asp:GridView runat="server" ID="gv"
DataSourceID="mySqlDataSource"
DataKeyNames="id"
AutoGenerateEditButton="true"
AutoGenerateColumns="false">
<Columns>
<asp:BoundField DataField="Naziv" />
<asp:BoundField DataField="Opis" />
<asp:TemplateField>
<ItemTemplate>
<%#Eval("html") %>
</ItemTemplate>
<EditItemTemplate>
<asp:UpdatePanel runat="server" ID="up">
<ContentTemplate>
<asp:TextBox Text='<%#Bind("html") %>' runat="server" ID="tb" />
</ContentTemplate>
</asp:UpdatePanel>
</EditItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
i can bind "html" field to "tb" TextBox, but executing update or insert command of "gv" i cant update/insert "html" field as long as it is inside UpdatePanel.
i can dynamicly find control ("tb" TextBox) using RowUpdating event and set value that way, but i am just wondering if this can be done with no extra code?
|
|
|
|
|
Hi
I have an Access table with a field that has the names of JPG pictures. I want a Datagrid to display these pictures (which are stored in the image directory).
I can use this line:
|
|
|
|
|
hi guys
how can i create subdomain in the asp.net and read it
thanks a lot
|
|
|
|
|
Don't really understand the question. Can you rephrase?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
i use iis7 with asp.net 2005
on win server 2008 r2 64bit
and my printer it is network printer
and use server side to print
this code work correct from visual studio but when publish application and make print from url i get this error:
.Invalid printer specified.><><>< at CrystalDecisions.ReportAppServer.Controllers.PrintOutputControllerClass.ModifyPrinterName(String newVal).. at CrystalDecisions.CrystalReports.Engine.PrintOptions.set_PrinterName(String value).. at VisitRegister.PrintDirectlyFromServer(String idIndex)
|
|
|
|
|
Hi ,
Here is my requirement .
Want to create a button in Outlook in the Toolbar
After i click that button want to open a outlook form without To and CC ,only show BCC.Want it to do programatically Using Outlook Add in Template .
Urgent Please help me.
iam a software engineer working for varisis technologies bangalore
|
|
|
|
|
hi everyone,
how do I make emails deliver to inbox not junk box.
i am using a pickup directory.
please help!
|
|
|
|
|
See answer below.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
hi everyone,
how do I make emails deliver to inbox not junk box.
i am using a pickup directory.
please help!
|
|
|
|