 |

|
Hai Parsad Khandekar,
I am using this Data grid. It is very attractive. but I have small concern please solve my issue.
Iam using MySql database when i pass the select query .It show all possible records with pagination.But as per my requirement i need first 150 records so I set the limit 150 to Query.At this time Records are not shown in datagrid but pagination is done for all Possible records .Here not taking the limit.When I select page from Drop down list or next button after 150 th record onwords it showing empty rows in datagrid. So please do need full for me..
Thanks & Regards,
Santosh Kumar Kola
|
|
|
|

|
Hello,
Thank's a lot for finding this control useful. The grid control can take List as it's input. What you can do is to create the list by yourself and call the setTotalRecords with value as the size of the list. The grid will show the records correctly.
If you are specifying the Connection and SQL then the control generates count query internally by appending substring after FROM keyword of your specified query to "SELECT COUNT(1)". I feel this query should also return correct count 150 in this case assuming there are more than 150 records in the table.
regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.
|
|
|
|

|
Hi,
If I store objects in List then what in tag dataField="???" ...>....
Thanhks
|
|
|
|

|
For object list the dataField should contain the name of the getter method without get prefix.
Prasad P. Khandekar
Knowledge exists, man only discovers it.
|
|
|
|

|
Can you please tell me how to export datagrid data to excel and pdf?
|
|
|
|

|
Can rows be color coded based on values of a dataField and how do you capture and conditionally test the dataField within the dbGrid?
Thanks
Matilda
|
|
|
|

|
Hi,
I need to display different images in same column.
I have done the following thing for that.
I am using List as datasource. My list contains objects of a class. In my class there is status attribute and imageURL. On the basis of status I getImageURL() method returns the a string of image url. But when I use imageURL as imageSrc. Find below code
But when my I access the page I get following error on server console
There is no Action mapped for namespace / and action name imageUrl. - [unknown location]
I am using struts2 and Weblogic.
|
|
|
|

|
Hi All,
Please tell me how can I bind the image column in the dbgid with datafield(images changes according to the values saved in database table)
Thanks
Manish
|
|
|
|

|
Is it possible to rearrange size of columns of result page using mouse
|
|
|
|

|
I tried to implement the datagrid in my netbeans project. Initially I was getting package org.apache.tools.ant.* does not exist in com.freeware.anttasks package of ManifestReader class. I later remove this class from the source and now am getting exception in apache java.lang.RuntimeException: Uncompilable source code com.freeware.gridtag.GridSorter.doEndTag(GridSorter.java:94).... What can I do to solve this error and make the datagrid run properly. If the problem is from source compile error, how can I compile the source.
Thank you.
Thayhor
|
|
|
|

|
It has been resolved. Thank you.
|
|
|
|

|
I have set up the code in Eclipse. And it is not showing any error but I am not able to Run the program. How do I execute this code.
|
|
|
|

|
I want to print whole data from datagrid. Is it possible? Plz give me solution.
I want print it like report.
|
|
|
|

|
Please help me if i can edit the grid directly.
|
|
|
|
|

|
hi,
my problem is as follows:
i have a database in mysql as professor.
in this database i have 2 tables :
1)professor
2)student
professor table contains following fields:
1)professorid
2)firstName
3)lastName
4)email.
student table contains following fields:
1)studentid
2)firstName
3)lastName
4)email.
now i have to delete the records from the professor and student table
with the help of jsp file.
i want to create a datagrid in jsp file which will retrieve all the records of student from the student table.
now this datagrid should display the record from the student tabel as follows:
studentid firstName lastName email
1 aa aaa aa@gmail.com Delete
2 bb bbb bb@gmail.com Delete
where Delete is a button.
when user selects any one of the Delete button,
the record should be deleted from the datagrid and database also.
it should reflect the changes in datagrid.
if anyone can help me please send me the code.
please also write the proper comments so that it will be easy to understand the code.
thanks and regards
nishi kishore
|
|
|
|

|
Hi,
I have facing a problem while using this datagrid.
Suppose i have used
<grd:textcolumn:textcolumn dataField="poolId" headerText="Pool Id" width="30" sortable="true"></grd:textcolumn>
If i want to set the value of poolId in a variable and want to compare that value, how can i do it?
Please help..
Thanks
Dhiman
dhiman debnath
|
|
|
|

|
I am having the exact same problem!!!!
any help would be appreciated.
|
|
|
|

|
Can anyone tell me how to edit a record of this data grid? Please reply me.I need it its very urgent....
Thanks
|
|
|
|

|
AnchorColumn How to use dataField as linkText
|
|
|
|

|
is it possible to use radio button inside this
data grid..?
i would like to onclick the radio button which will bind the respective data
to a textbox..
by the way..the code work wonders..thanks alot..
|
|
|
|

|
Hello,
Please Help
I get an error "java.lang.NullPointerException"
Could i get updated dbgrid.jar file coz i think there is a diffrence in my DBGrid.class that i have and i don't know how to decompile it and correct it and compile it again in the jar file.. so i think it better to get the updated dbgrid.jar.
|
|
|
|

|
Got the following:
This column shows the text {realTeam1} in all rows. I want to display the content of the realTeam1 item from my List.
What is wrong?
Thanks in advance.
|
|
|
|

|
Hi There,
I ran into the same issue. You are doing it right but the "linktext" property and imageSrc property do not resolve data field value they only accept plain text. I have fixed the code and built a new jar to resolve this issue please provide your email address I can send the jar if required.
Thanks for Mr.Prasad for a wonderful grid control and source code. Helped me to customize easily. Hope you don't mind me providing customized jar.
Thanks,
Ramya
modified on Tuesday, May 19, 2009 8:15 PM
|
|
|
|

|
I have same problem please send me the jar file on this email id :
skatakdhond@gmail.com
|
|
|
|

|
I have the same problem ,I am not able to bind Anchor text with datafield
please send me the solution
Thanks
Manish
|
|
|
|

|
I am trying to figure out how i can get a handle to the fields. For example, I want to do update the data. How would I be able to edit the data and then do updates against them.
Thanks,
Boon
|
|
|
|

|
Hi Prasad,
The tool looks great. Just wanted to know if it would be OK to use this code and the associated jar files in commercial applications? Are there any legal/licensing/GPL issues ? Is there any kind of licensing at all associated with this?
Regards
PSD
|
|
|
|

|
Hello Prabhjit ,
You can use the code in commercial applications without any problem. The code is totally free. The DBGrid code does not fall under GPL.
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.
|
|
|
|

|
can you tell me how to use it ??
what are the configurations must be done at first??
|
|
|
|

|
have to implement CheckBox Column in JSP DataGrid?
have new version ?
|
|
|
|

|
can anyone help me ,how the doEdit function works and what are the parameters passed in.......
Regards
Raj
|
|
|
|

|
As I am new for java developement and read this code, Finally I try to implement this code and got success also.
Only one problem I am facing that the alterText on Image Column is not working.
<grd:imagecolumn headerText="" width="5" HAlign="center" imageSrc="images/Edit.gif"
linkUrl="javascript:doEdit('{CLICORPORATION}', '{CLICLIENT}')" imageBorder="0"
imageWidth="16" imageHeight="16" alterText="Click to edit"></grd:imagecolumn>
Can some one help me why the tool tips is not showing...
Regards
|
|
|
|

|
Hi, I have to implement CheckBox Column in JSP DataGrid. Anyone knowing solution please do reply. Thanks in advance. Aman
|
|
|
|

|
Hi All,
How can I get the Pagination with Numbers(1 2 3 4 5 6 7 8 9 10 Next) instead of First,Prvious,Next,Last.
Can anyone help to get the pagination in above format.
Thanks
|
|
|
|

|
sir,
i am nw to jsp and java .I am in very much need of a data grid like this, but i cant implement it in my application.. sir please give me step by step implementation of this grid.. i had reffered to the previous post but im getting some error when i did it like that..
org.apache.jasper.JasperException: File "/WEB-INF/datagrid.tld" not found
plzz help me...
|
|
|
|

|
This tld File is in config folder
so please put this config folders file in to your web-inf folder
its work then
|
|
|
|

|
I had put the codes as per need, and it works fine.
But Unfortunately the fields of type Number/Int not being shown in grid.
Please fix the error and give the solution immeditely.
Thanking you,
Bisweswar
|
|
|
|

|
Number Field are showing correctly.
But you must include the dataFormat property to the column.
ex.
To know about format, visit :
http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html
|
|
|
|

|
Hi,
Is it possible to enter values and update them in the grid? If so can anyone give me a sample of the code
Regards
Anil
|
|
|
|

|
Dear sir,
Grid for java is really a great job and it will help us (the developers) a lot.
I want to use it in my college project where i am presenting information in form of table. the scenario is that I am getting value from data base using bean method which returns List. the List contains Array of string.
Now I want to use your grid to show the data in tabular format. but i am facing problem. in fact i am not how to use the list. When i go through the queries related to it i found a reply by you in this regard that is
The request attribute named 'DATALIST' stores a reference to pojo List.
In case of pojos the attribute 'dataField' of any grid column holds the name of the getter method excluding the prefix 'get'.
e.g. If you hava a getter method named 'getDescription' coded for your pojo then specify value 'Description' in 'dataField' attribute of the grid column.
In this reply you have metioned pojo List. Can you help me to understand pojo list. what it is or how can i create a pojo list. if you provie any link in this regard it will help a lot.
Plz help me.
waiting for your valuable information
Thanks
sumouser
sumouser
|
|
|
|

|
| I have tried using jsp code to generate the |
|
|
|

|
Hai friend send me generating rows using JSP code plz..
|
|
|
|

|
Hello - Is Dave Lilley's code for displaying multiple grids on a page available? It wasn't in the download project or demo. I figured I would ask before I reinvent the wheel and do it myself. Thanks!
|
|
|
|

|
Hey
hi
i tried to print the grid data...but no success
pls is ther any solution???
There's never a Wronge Time To Do The Right Thing !!
|
|
|
|

|
What error you are getting
|
|
|
|

|
vishaldsh,
Thanks for your reply..although I dont remember what was the error as I had posted this problem way back in 2007...
There's never a Wronge Time To Do The Right Thing !!
|
|
|
|

|
Hi, when i am scrolling the mouse in the data grid, i am getting a security alert popup. This is in https env. works fine in http env. Any issues in the css?
can anyone help on this?
|
|
|
|

|
Ok, what I want to do is to print this data sheet, how would you recommend I do that?
In exchange, I'll talk about my editing procedure. I have done a couple of things, none great but pretty cool.
I got to a point where my rows look like this.
|
<img SRC="images/Edit.gif" WIDTH=16 HEIGHT=16 BORDER=0 ALTER="null"> | 06/07/2000 00:00 | 01/01/1960 01:22 | 01/01/1960 01:42 | T - 173,973.36 Sq. Ft. | | Charles Harris | 3rd - 2200 - 0600 | |
you can see there are things in the 'doedit' fields, these are strictly to tell me what row number and column number I am on. by clicking on any of the fields it will send that particular string back to the rendering class. How?
These tag library variables work as setters and getters, google what that means. But basically, add a variable to the .tld file, and then you got to make a setter and getter function wherever the rendering is going on, I put it in DBGrid.java.
So I added
editAction
true
true
java.lang.String
editBoolean
true
true
java.lang.Boolean
to the tld file, and then
/**
* Sets editAction.
*
*/
public String getEditAction()
{
return this.mstrEditAction;
}
/**
* Sets editAction.
*
*/
public boolean getEditBoolean()
{
return this.mstrEditBoolean;
}
along witht he get functions as well. This is passed in by stating in the call to the dbgrid tag library when trying to render it.
Now, depending on what type of value is being retrieved, you basically trap these statements in either the text column, image column, number column classes and so forth. Here is an example of what I did on my text columns.
private void setFlags() throws JspException
{
isRowEdit=false;
isCellEdit=false;
isEditAction=false;
editRow=-1;
editCol=-1;
try {
objTmp = (DBGrid) getParent();
rowNum=objTmp.rowNum;
colNum=objTmp.colNum;
editAction=objTmp.getEditAction();
if (editAction.indexOf("rowNum=")>-1){
isEditAction=true;
isRowEdit=true;
editRow=Integer.parseInt(editAction.substring(7));
}
if (editAction.indexOf("mouseClick=")>-1){
isEditAction=true;
isCellEdit=true;
editRow=Integer.parseInt(editAction.substring(11,editAction.indexOf("|")));
editCol=Integer.parseInt(editAction.substring(editAction.indexOf("|")+1));
}
} catch (Exception e) {
throw new JspException(e.getMessage());
}
}
That is actually called early in render detail, this snippet is done later on.
try
{
objBuf = new StringBuffer();
objBuf.append(" 0)
objBuf.append(" WIDTH=\"" + this.mintWidth + "%\"");
if (this.mintHeight > 0)
objBuf.append(" HEIGHT=\"" + this.mintHeight + "\"");
if (this.mstrCssClass != null)
objBuf.append(" CLASS=\"" + this.mstrCssClass + "\"");
else
objBuf.append(" CLASS=\"gridColumn\"");
if (this.mstrHAlign != null)
objBuf.append(" ALIGN=\"" + this.mstrHAlign.toLowerCase() + "\"");
if (this.mstrVAlign != null)
objBuf.append(" VALIGN=\"" + this.mstrVAlign.toLowerCase() + "\"");
if (this.mstrBgColor != null)
objBuf.append(" BGCOLOR=\"" + this.mstrBgColor + "\"");
if (this.mstrForeColor != null)
objBuf.append(" COLOR=\"" + this.mstrForeColor + "\"");
objBuf.append(">");
if (isEditAction){
if (rowNum==editRow){
if ((editCol==colNum)){
//block for single cell to be edited
strVal = formatField(pobjValue, this.mstrDataFormat);
if (strVal != null && this.mintMaxLength > 0)
if (strVal.length() > this.mintMaxLength)
strVal = strVal.substring(0, this.mintMaxLength) + "...";
objBuf.append("<input type=\"text\" name=\"field"+colNum+"\" value='"+strVal+"'>");
objBuf.append("</input> | ");
} else if (editCol==-1) {
//block for whole row to be edited
strVal = formatField(pobjValue, this.mstrDataFormat);
if (strVal != null && this.mintMaxLength > 0)
if (strVal.length() > this.mintMaxLength)
strVal = strVal.substring(0, this.mintMaxLength) + "...";
objBuf.append("<input type=\"text\" name=\"field"+colNum+"\" value='"+strVal+"'>");
objBuf.append("</input>");
} else
{
//non edited rows when edit requested
strVal = formatField(pobjValue, this.mstrDataFormat);
if (strVal != null && this.mintMaxLength > 0)
if (strVal.length() > this.mintMaxLength)
strVal = strVal.substring(0, this.mintMaxLength) + "...";
objBuf.append(strVal);
}
} else {
objBuf.append("");
strVal = formatField(pobjValue, this.mstrDataFormat);
if (strVal != null && this.mintMaxLength > 0)
if (strVal.length() > this.mintMaxLength)
strVal = strVal.substring(0, this.mintMaxLength) + "...";
objBuf.append(strVal);
objBuf.append("");
}
}else {
objBuf.append("");
strVal = formatField(pobjValue, this.mstrDataFormat);
if (strVal != null && this.mintMaxLength > 0)
if (strVal.length() > this.mintMaxLength)
strVal = strVal.substring(0, this.mintMaxLength) + "...";
objBuf.append(strVal);
objBuf.append("");
}
// Write created HTML to output stream.
this.pageContext.getOut().print(objBuf.toString());
}
Ok, that should suffice for now. Figure out the rest (notice that I am getting a jsp datepopup to come out for the date columns?) as I am not fielding questions on this.
But someone tell me how to print this in specfic formats!!
lamarjones@nc.rr.com
|
|
|

|
"i am not able to configure this demo project...actually i changed database from oracle to mysql...and i put this all application into my context path...so which URL i have to type in my address bar for accessing this application...let me know your suggections... context path "
- johnson joseph
|
|
|
|
 |