|
good day guyz, greetings to all...
need help again from you....
my problem was:
how to adjust the datagrid row height?
in runtime/ codes...
.. sample codes or links are highly appreciated.
thank you again
start a new beginning in every ending; thats what life for......
|
|
|
|
|
You can set the itemstyle height="". You should assign a certain height to each row in your datagrid,absolutly position not relatively position,so that the datagrid will be located in a certain position as you wish
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
How to change Datagrid Header Text through programming in C#.net.
and how to set colunm width and height. How to format date in datagrid column.
and I want to highlight row where cell fee value = 0;
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
The following is the Javascript i used for selecting all the checkboxex in a Datagrid,using this code i could select all the checkbox.
function CheckAllDataGridCheckBoxes(aspCheckBoxID, checkVal)
{
re = new RegExp(':' + aspCheckBoxID + '$') //generated control name starts with a colon
for(i = 0; i < form1.elements.length; i++)
{
elm = document.forms[0].elements[i]
if (elm.type == 'checkbox')
{
if (elm.name=aspCheckBoxID)
{
elm.checked = checkVal;
}
}
}
}
but my problem is i want to take the selected rows cells value,the button event as follows
foreach (DataGridItem item in dgPhotos.Items)
{
CheckBox chkBox = (CheckBox)item.FindControl("chkItem");
if (chkBox.Checked)
{
File.Delete(item.Cells[2].Text);
}
}
in this event chkbox.Checked is showing false,checkboxex are checked even though am getting chkBox.Checked=false.
but if i select the checkbox one by one am getting correctly
then chkbox.Checkbox=true only the problem is if i use Javascript.what is the problem.How can i solve this problem.
|
|
|
|
|
Write if (elm.name==aspCheckBoxID) intead of if (elm.name=aspCheckBoxID)
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
I used, if (elm.name==aspCheckBoxID) then it will not check.
|
|
|
|
|
==Microsoft visual studio .NET 2003
==Asp.net With C#, Web appliation
==Create Crystal Report
What is the problem ? How to solve it? Can you help me, Please........
Input::
private void Page_Load(object sender, System.EventArgs e)
{
CrystalReportViewer1.ReportSource=Server.MapPath("")+"\\CrystalReport1.rpt";
}
=========================================================================================
Output::
Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.
|
|
|
|
|
Sounds like you need log on credentials.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hello again,
I need help trying to get this to work.
I want to disable a button when clicked, so that the user doesn’t clicking it again.
<script language="javascript" type="text/javascript">
function Form1_onSubmit() {
Form1.btnSaveBudget.disabled=true;
}
...
However, when the button gets disabled then the click event won’t work.
Protected Sub btn_Click(...) Handles btn.Click
I need the click event to fire to do something.
Thank you
|
|
|
|
|
Hey I am not a JS expert but here are some suggestions:
Is the on_submit function not meant to return a value? Does returning true make it work. Does it post back at all?
If this doesnt sort it how about instead of disabling it just ignoring it so you would set a bool to true on first press then on further presses check this value and ignore the event.
Hope this helps
Dan
|
|
|
|
|
You are capturing Form OnSubmit event, which happens before the page postback. Form submit must return true.
Add a line return true, so that it will postback.
Martin_ wrote: Form1.btnSaveBudget.disabled=true;
Another suggestion, this type of object identification will not work on all browsers. Start using document.getElementById('<OBJECT_NAME>').
|
|
|
|
|
Have a javascript registered through page.registerstartupscript and enable the button through that
|
|
|
|
|
Hi All
First of all wish you very happy Ice Cream day (this sunday)...
I am using ASP.Net 2.0 Menu control and which needs to be enable and disable based on user roles. In my web site, I am also using membership API to add users, roles and assigning roles to users.
Now my query : Is there any built in support is available for doing enabling and disabling of menus based on above roles. Or I need to write fancy code for this?
Thanks
Amit
|
|
|
|
|
Hey guys,
I'm writing an ASP.NET C# web application that needs to quickly (as possible) display trees that are on the order of thousands of nodes. I know there are commercial solutions out there but have been directed that they are off limits. I have also been told that freeware versions are also a no go. This is partly due to the legalities of using them as well as customer direction.
I've tried building the nodes on the fly but my implementation didn't seem to speed up the rendering of the tree. It just seems like the tree control that is included is very bloated and was not built for VERY large trees.
If you can point me into the right direction I would appreciate it.
Thanks to everyone! This site rocks!
- Darroll
|
|
|
|
|
http://www.obout.com/t2/eServerSideEvents.aspx[^]
I've used it, and it works well. They say it's the fastest on the market, but then, they would
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How deep are you going with your nodes? It's common to just retrieve nodes down to the next depth and then when expanding a node, get the nodes two layers down from that. This means that the user sees the nodes that can be expanded. Here's a quick example:
RootNode
|-Level 1
|-Level 2
|-Level 2
|-Level 2
|-Level 1
|-Level 2
Now, imagine that you are expanding the first Level 1 node, you retrieve the nodes below Level 2 so that the user sees the appropriate visual cues:
RootNode
|-Level 1
|-Level 2
|-Level 3
|-Level 3
|-Level 2
|-Level 2
|-Level 3
|-Level 3
|-Level 3
|-Level 1
|-Level 2
As you can see, you only get the information that you need so that you can keep the user happy. I hope that helps.
|
|
|
|
|
I have a gridview that displays about 2-50 records. While the stored procedure in SQL Query analyzer or the sqldatasource takes less than a couple seconds to run it takes forever for the gridview to display the data. At a difference instance I have tried to display the data with a repeater. It seems that there is no improvement. Has anybody experienced something like this?
|
|
|
|
|
What are you doing in the stored procedure to make it take several seconds to fetch so little data? I would expect at least less than 0.1 seconds.
Similarly, what are you doing with the gridview to make it take any time to display so little data?
Any code that you can show might help shed some light...
---
single minded; short sighted; long gone;
|
|
|
|
|
Well the stored procedure summarizes the sales for product(s) sold to customers for every month by salesman. The SQL is quiet complex and I do not think that this relevant though. It just passes back 27 columns"
Shipping company, Curent Year Sales By Month(12 columns), Total, Last Year Sales By Month(12 columns), Total.
But the rest of the code I think that is pretty straight forward:
SqlDataSource1.SelectParameters.Clear();
SqlDataSource1.SelectParameters.Add("Year", year.ToString());
SqlDataSource1.SelectParameters.Add("Prod", prod.ToString().Trim());
SqlDataSource1.SelectParameters.Add("Salesman", salesman.ToString());
SqlDataSource1.DataBind();
GridView1.DataSource = SqlDataSource1;
GridView1.DataBind();
It is the Gridview1.DataBind() that takes forever. The SQL profiler shows that the stored procedure(s) have been executed.
|
|
|
|
|
Is the SqlDataSource1.DataBind() necessary? Is the stored proc being executed twice by any chance?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
No is not necessary. The stored procedure is not executed twice. I wonder if in IIS there is a limit on the page size.
|
|
|
|
|
VickyC# wrote: I wonder if in IIS there is a limit on the page size
Are you running your web app and database on the same machine or are you fetching the data over the network? Since your stored proc is only pulling out 27 records, it shouldn't be close to any page size limit.
How quick does the stored proc run by itself when shot through query analyzer?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
No they are on different machines. It is 27 columns 2-50 rows. But this is a part of a fairly sizable page. The stored procedure in SQL Query analyzer takes less than 2 seconds in the worst case.
|
|
|
|
|
It has a performance index of .69.
|
|
|
|
|
Since it is only 27 columns with 2-50 rows, that shouldn't be very heavy weight at all.
If you don't mind me asking, what are the other things going on in the page since you say it is a fairly sizable page?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|