c# - JQuery Flexigrid plug-in in ASP.Net -


I have an ASP.NET project with C # and ASPX page has a repeater control that creates an HTML table Walking on the Data Source I want to use the JQuery Flexigrid plug-in to scroll the table, but due to the lack of documentation on the plug-in it is unable to know how it works. Know how to do this, or share it Is the sample code for the field?

I've never used Felsilgrid though after viewing the samples on the site, I made my suggestions I will offer.

It looks like what you need to do with your repeater, properly formatted HTML table has at least one hasd and tab section.

  & lt; Table id = "mytable" & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th & gt; Header1 & lt; / Th & gt; & Lt; Th & gt; Header2 & lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; & Lt; Tbody & gt; & Lt; TR & gt; & Lt; Td> Table data 1 & lt; / Td> & Lt; Td> Table data 2 & lt; / Td> & Lt; TR & gt; & Lt; / Tbody & gt; & Lt; / Table & gt;  

Once done, make a simple call to make the splashgrid table with the default settings:

  $ ("# mytable"). Flexigrid ();  

From wherever you want, you can choose from many options to make as beautiful as you want.

For repeater, only a bunch of ways to set it up depending on its requirement. Perhaps the easiest way is as follows:

  & lt; Table & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th & gt; & Lt; Asp: label id = "header1" runat = "server" & gt; & Lt; / Asp: label & gt; & Lt; / Th & gt; & Lt; Th & gt; & Lt; Asp: label id = "header2" runat = "server" & gt; & Lt; / Asp: label & gt; & Lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; & Lt; Tbody & gt; & Lt; Asp: Repeater id = "myrepeater" runat = "server" OnItemDataBound = "myrepeater_ItemDataBound" & gt; & Lt; ItemTemplate & gt; & Lt; TR & gt; & Lt; Td> & Lt; Asp: label id = "data1" runat = "server" & gt; & Lt; / Asp: label & gt; & Lt; / Td> & Lt; Td> & Lt; Asp: label id = "data2" runat = "server" & gt; & Lt; / Asp: label & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; / ItemTemplate & gt; & Lt; / ASP: Repeater & gt; & Lt; / Tbody & gt; & Lt; / Table & gt;  

and your data bind event will look something like this:

  Public zero myrepeater_ItemDataBound (Object Sender, Repeater Event Evers E) {myDataObject = e. Item.DataItem; Label data1 = e.Item.FindControl ("data1"); Label data2 = e.Item.FindControl ("data2"); Data1.Text = myDataObject.data1; Data2.Text = myDataObject.data2; }  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -